airsdk.dev icon indicating copy to clipboard operation
airsdk.dev copied to clipboard

Update create-an-app.md

Open tohar777 opened this issue 1 year ago • 2 comments

how to create a basic AS3/Air Application

tohar777 avatar Jan 04 '25 11:01 tohar777

The code in this PR doesn't look valid to me.

  • The main class should extend flash.display.Sprite or flash.display.MovieClip. It currently has no superclass.
  • AS3 doesn't use a main() function as its entry point. Instead, code starts executing in the constructor of the main class. So function main should probably be function HelloAir to match the name of the class.
  • The main class constructor isn't allowed to accept arguments, unless they're optional, because the AIR runtime instantiates it automatically. If you intended to make the app read command line arguments, you need to listen for InvokeEvent.INVOKE instead. However, command line arguments are more of an advanced topic for AIR applications, so I'd actually omit that from this tutorial.

joshtynjala avatar Jan 09 '25 21:01 joshtynjala

Hello Josh, Yeah I know that I didn't add any superclass like flash.display,Sprite or make the function function HelloAir() but what I'm trying/tried to do is show how to write a simple Hello World program. if is there anything I can/need to fix,I'll write and test it again

tohar777 avatar Jan 09 '25 21:01 tohar777