Results 1 to 7 of 7

Thread: Linkage in AS2.0 vs 3.0

  1. #1
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default Linkage in AS2.0 vs 3.0

    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.

  2. #2
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    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.

  3. The Following User Says Thank You to punstc For This Useful Post:

    evan (06-02-2008)

  4. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by evan View Post
    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"
    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

  5. The Following User Says Thank You to Medyman For This Useful Post:

    evan (06-02-2008)

  6. #4
    Join Date
    May 2008
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default flash buttons using actionscript 3.0

    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

  7. The Following User Says Thank You to 75samsonite For This Useful Post:

    evan (06-02-2008)

  8. #5
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    I use event listeners allot and I never needed to use:

    import.flash.events.MOUSE_EVENT
    and my code runs fine.

    before my code, why is it used in this example?

    and what is the benefit?

  9. #6
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    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.

  10. The Following User Says Thank You to Medyman For This Useful Post:

    evan (06-02-2008)

  11. #7
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •