A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: buttons need to control movie clips

  1. #1
    Member
    Join Date
    Aug 2002
    Posts
    30
    Here is what I want to happen:
    When you rollover button 1, a menu 1 slides in and stays out. When you rollover button 2, menu 1 slides out and menu 2 slides in. When you rollover button 3 menu 2 slides out and menu 3 slides in.

    I need the buttons to recognize which menu is out so it can slide it out and bring in the correct menu. I have made seperate movie clips of each menu sliding out and in. Just need to know how to control them. I am new to action scripting. So if you post the code could you please explain what each thing is? Make sense?

    Thanks, I really appreciate it.

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    237
    new file
    one button
    one slide [use movie clip]

    & one mainmc.

    mainmc which containg button & slide mc

    action for button

    Code:
    on(rollover){_root.mov = 1;}
    on(rollout(_root.mov =0 ;}
    action for slide

    Code:
    onClipEvent(enterframe){if(_root.mov == 1){_x=_x+(100-_x)/6);}else(_x=_x+(10-_x)/6;}

    check this


  3. #3
    Junior Member
    Join Date
    Aug 2002
    Posts
    3
    Busy with the same idea; different approach and one issue unsolved:

    In one movieclip I have layers for labels, actions, buttons, background and info blocks. Movie starts just with background and buttons and is stopped in the first frame. The first info block starts in frame 10, where it slides in and stops in frame 70. From frame 71 till 130 the menu slides back. The second info block slides in at frame 131, stops in frame 180 and slides back in 181 (and so on...)

    At this moment the following actionscript is attached to one of the buttons:

    on (press) {
    play();
    }
    on (release) {
    gotoAndPlay("2");
    }

    However if you release quickly you don't see the infoblock retract fully; the new one slides in right away.

    This could work if I knew how to get sort of a timer event in between or do someting like this;

    On (press) play <and when the timeline hits the next "stop-event" gotoAndPlay label 2

    Maybe someone can tell how to achieve this ?

    BTW; I did't get the answer of kamblemilind to work (or I just didn't understand...)

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