when link a movieclip using linkage in an as 2.0 movie, it doesn't fill in anything in the field for "class"
Yet in AS 3.0 it automatically fills in:
flash.display.MovieClip
under "class"
AS 2 likes "_root"
when link a movieclip using linkage in an as 2.0 movie, it doesn't fill in anything in the field for "class"
Yet in AS 3.0 it automatically fills in:
flash.display.MovieClip
under "class"
AS 2 likes "_root"
Last edited by evan; 05-30-2008 at 08:42 PM. Reason: simplified -found most of the answers re:Disp. Obj.
AS3 basically revolves around classes, and OOP, every time you set up a linkage in AS3 flash is actually righting a class file for you. the flash.display.MovieClip is the inheritance for what your creating. its basically saying this has all the properties of the MovieClip class. That is why it will have a time line and all that, you could easily say flash.display.Sprite there, and it will automatically be changed to an instance of a Sprite in flash, even if you said movie clip when creating your symbol.
hope that explains what you were stating.
evan (06-02-2008)
The _root depth shouldn't be used in AS2 or AS3. For your basic 1 level Flash project, it'll work. But as soon as you start getting into multi-level applications (.swf inside of .swf), it's gets horribly complicated.
Plus, if you're switching to AS3, it's good habit to get away from it.
Last edited by Medyman; 06-02-2008 at 04:48 PM. Reason: clarification
evan (06-02-2008)
If you want to learn how flash buttons and links work in actionscript 3.0, this video explains perfectly. It's pretty straight forward:
http://www.howvids.com/Computer/Acti...king-Flash.ad2
evan (06-02-2008)
I use event listeners allot and I never needed to use:
and my code runs fine.import.flash.events.MOUSE_EVENT
before my code, why is it used in this example?
and what is the benefit?
The author of that tutorial is wrong in this aspect. It seems (based on other tutorials on his site), that he's more of a timeline-based Flash user than an ActionScript-er.
The flash.event class package does not need to be explicitly imported when you're coding within the Flash IDE. If you were creating an OOP application, and had external AS files which were referenced, then you would need to explicitly import the flash.events into that AS file. The same applies for the flash.display package.
evan (06-02-2008)
this is good to know since after I make the first version of my project, then I plan on changing it around to suit external .as files so as to break up the job into components and share it with other people.
Bookmarks