Skip to content
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

Update create-an-app.md #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update create-an-app.md #146

wants to merge 1 commit into from

Conversation

tohar777
Copy link

@tohar777 tohar777 commented Jan 4, 2025

how to create a basic AS3/Air Application

how to create a basic AS3/Air Application
@joshtynjala
Copy link

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.

@tohar777
Copy link
Author

tohar777 commented Jan 9, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants