A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [CS3] Apply actions after added to stage

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    22

    [CS3] Apply actions after added to stage

    Hello again everyone...

    Really appreciate all the help I've been getting here! Hoping I can rely on you guys for one more:

    I have a menu Movie Clip (embedded) that consists of a keyframed animation. Once you click a main button, the animation plays and the other buttons reveal themselves within the embedded menu MC. The issue is that the buttons don't exist on the stage until it's their turn to animate, so I can't figure out a way to apply my button actions from the main timeline (as their respective targets don't exist yet).

    Does anyone have a suggestion on how to add the button actions as the button MC's are added?

  2. #2
    Member
    Join Date
    Sep 2008
    Posts
    95
    You can add a KeyFrame to add actions after buttons reveal themselves.

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Posts
    22
    Quote Originally Posted by softhink
    You can add a KeyFrame to add actions after buttons reveal themselves.
    Hi softhink,

    Thanks for the reply! I've tried what you've suggested before, but I also know that putting AS code in nested MC's (when dealing with AS 3) is a big no no, which is why I don't want to get in the practice of it

    Is there a way to do this programmatically? So that the button actions are assessed as they are placed on the stage at compile-time? This is a much more desirable solution, I'm sure.

    If anyone could offer insight, it would be very much appreciated!

  4. #4
    Junior Member
    Join Date
    Apr 2008
    Posts
    22
    BUMP. Anyone have anything here? Really at a loss.

    So far I've tried ENTER_FRAME actions that attempt to call functions that apply the MouseEvent listeners to the button MCs, and also applying the listeners on the nested menu MC after the buttons appear on stage ala AS 2.

    I've also tried to venture into creating custom classes, but being new to AS 3 I don't really understand these yet, so I'm trying to keep my code on frames.

    This is the error I typically get when NOT using the custom classes:

    TypeError: Error #1010: A term is undefined and has no properties.

    Help!
    Last edited by JW412; 11-20-2008 at 07:52 PM.

  5. #5
    Member
    Join Date
    Sep 2008
    Posts
    95
    attach your file
    I can help you.

  6. #6
    Junior Member
    Join Date
    Apr 2008
    Posts
    22
    Hi softhink,

    File is attached to this link.

    rbD1.fla

    Let me know if you have any questions. Thank you!

  7. #7
    Member
    Join Date
    Sep 2008
    Posts
    95
    Can not connect

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center