A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Linking buttons to frames

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    15

    Linking buttons to frames

    Hello, so this is my first post and i want to thank anyone who has some knowledge on this, in that case i'm sure there are lots of people to thank.

    First I would like to clarify if its a recommended direction to take by making a button which leads to an animation that also has buttons on it.
    Those 2nd buttons in turn lead to anther animation when clicked.

    The issue i'm having is on the 2nd set of buttons/animations.

    I've tried to use the same code :
    on (release) {
    gotoAndPlay(21);
    stop();
    }
    which I used on the first set, but this time it doesn't seem to be working at all.

    I'm wondering if this approach of creating multiple buttons and animations on what is initially just one animation a good approach.
    Could anyone recommend some solution as to how I might get the 2nd button to work?
    Thanks

  2. #2
    The G5 SP N_R_D's Avatar
    Join Date
    Apr 2004
    Posts
    1,118
    There could be many things going on.

    Firstly, it is good practice to put your code all on the main timeline, makes debugging easier. Second, it is fine to have buttons starting animations that contain buttons, that is hwo most sites work Thirdly, is the code listed the one that works or the one that doesnt?

  3. #3
    Junior Member
    Join Date
    Jun 2007
    Posts
    15
    Hi Mike,
    So your saying that I should just have one layer which is dedicated to actions?
    This is the code that doesn't work, but i copied it directly from the code that does work.
    the only thing that is different is the frame number (here 21, on the working one 15)
    At both of the dedicated frames I also added a stop().
    Thanks for your reply!

  4. #4
    The G5 SP N_R_D's Avatar
    Join Date
    Apr 2004
    Posts
    1,118
    At this point would it be possible to cut out things that are not needed to trim down the FLA, and post it up so I can see it?

  5. #5
    Junior Member
    Join Date
    Jun 2007
    Posts
    15
    how about i email it to you?

  6. #6
    The G5 SP N_R_D's Avatar
    Join Date
    Apr 2004
    Posts
    1,118
    That will work just fine.

    mike -at - 177media -dot- calm

  7. #7
    Ivor1 ivor1's Avatar
    Join Date
    Aug 2006
    Location
    Dundee, Scotland
    Posts
    478
    Try making frame labels instead of numbers.

  8. #8
    Junior Member
    Join Date
    Jun 2007
    Posts
    15
    ahh yeah i started to name them (the frames), thanks.
    and mike, thanks for the help but i found out the problem wasn't the button but a mask on the previous animation that was blocking masking all my animations hahahh.
    Thanks though!

  9. #9
    Member
    Join Date
    Dec 2005
    Location
    san diego
    Posts
    65
    you also need to make sure the the actions you want performed by any of the buttons are native to their timeline. If your trying to control main timeline with buttons located in a movie clip, then you will have to call out:

    _root.

    or use:

    _parent

  10. #10

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