A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help with behaviors/actions

  1. #1
    Junior Member
    Join Date
    May 2007
    Posts
    12

    Help with behaviors/actions

    I'm working on this animated menu, and I'm in need of some help...

    Here's what I've got basically.


    The tweens are the menu animating up or down, and the keyframes in between the tweens are the seperate sub-menus under each item (DVR,PTZ,Bullet etc). The second tween is the one where it goes back to main menu (all options collapsed).

    I'm using behaviors to move around the timeline for the animated sub menus.

    What I need is like another line or behavior, that acts like or is an If Then statement. so like basically what I need is this kind of command in actionscript, or a method.

    Press button, gotoandPlay ending_animation (DVRend etc)

    then at the end of that action
    if button=PTZ then gotoandplay PTZstart
    if button=Dome then gotoandplay Domestart

    So, any help? There's gotta be some method of doing this.

  2. #2
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,929
    Just set a variable with the current section and one with the new section, have the button go to the current section+"out" and, when it hits the end, have another script telling it to go to the new section+"start", or whatever your label names are...

    Here's a sample movie that I think is close to what you're looking for.

    Hope that helps!!
    Last edited by flashpipe1; 09-10-2007 at 01:31 PM.
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  3. #3
    Junior Member
    Join Date
    May 2007
    Posts
    12
    I ended up making a variable named LastButton, and on the last frame of the closing animations I used If and Else If statements to tell it which animation to play next. Works flawlessly.

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