views:

23

answers:

1

I'm new to Flash/AS3 and I have been trying to display objects from class files and methods.

Now I was looking at the source of this project here http://www.nocircleno.com/graffiti/examples/2.x/simple_text_demo.html

To learn how to do this from AS3, main question I have how is the Main() class being called there? There is no actionscript in the frames of the FLAs so where is the call coming from to the Main class to initialize display? Is there something special about the Main() class that has it called when a swf is loaded.

I tried to duplicate it by making a simple Main which extends MovieClip and simply placing it in the root folder of the project but it isn't being auto called and it hasn't worked.

+1  A: 

Are you using the Flash IDE? If so, you need to set Properties -> Document Class to your main class file.

ThatSteveGuy
Thanks, it makes it a lot easier now. Another hint for the newbs out there do not enter the file name of the class i.e Display.as just enter the name i.e. Display.
Emil