Skip to content

Added an Hello World #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/basics/create-an-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@
title: Create an Application
sidebar_position: 5
---
this is an Hello World in ActionScript,each line explains what everything does so that you will a familiarity with the ActionScript Language.
```
package{ //tells where's the script locate which can later be use to import(for example:flash.display.Sprite)

import flash.display.Sprite; //imports the Sprite class(nessecery)

public class Main extends Sprite{
public function say(sentence:String){ //A Comment
trace(sentence); //print() function
}
public function Main(){ //the Main function,needs to have the same name as the class
say("Hello World"); //print the variable
}
}
}
```
#### after you finish writing the code use mxmlc(which come with the AIR SDK) to compile it to a swf

`mxmlc helloworld.as`