A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: a very easy question of rollover/out mc control

  1. #1
    user in A minor
    Join Date
    Jan 2005
    Location
    finland
    Posts
    121

    a not so easy after all question about rollover/out mc control

    hi there!

    i have to edit my question. i finally found 2 threads about this subject - and looks like the thing i thought would be really simple and easy is actually all but! shows how little i know, doesn't it.

    still - if anyone has come up with a solution, would you please let me know? here comes: i've managed to produce a dropdown menu. works ok. it's an mc that i control with on rollover/rollout/press commands.
    question: what would be the AS line to tell the mc_menu to move to a certain frame in timeline if no mouse movements is detected on it, let's say, in 5 seconds?

    i guess i can work my way around it... but is there actually a way to do this?
    Last edited by mrk13; 12-23-2005 at 08:40 AM. Reason: wasn't as easy as i thought...

  2. #2
    www.fmj.sirx.org
    Join Date
    Nov 2005
    Posts
    46
    Lol i just made a drop down myself. I figured this.
    I just name mine...
    on (press) {
    gotoandplay("rocks");
    }

    just be sure to lable the frame..
    and in frame 1 i have stop(); So I have control of where it goes

  3. #3
    user in A minor
    Join Date
    Jan 2005
    Location
    finland
    Posts
    121
    yeah, thanks, but i got that all right
    what i was trying to ask that if there's no mouse clicks on buttons or any movement at all over the mc menu for about 5 seconds, it would collapse, that is, go to a certain frame in time line.

    that's a bit more tricky...

  4. #4
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Hi
    Here is one way....
    Check the FLA below...
    code:
    flag = false;
    mc.onRollOver = function() {
    trace("over");
    flag = false;
    this.gotoAndPlay("over");
    };
    mc.onRollOut = function() {
    trace("back");
    flag = true;
    this.gotoAndPlay("back");
    };
    function myPlay() {
    clearInterval(myInterval);
    if (flag == true) {
    mc.gotoAndStop("yourFrameLabel");
    }
    // trigger the function after 5seconds
    myInterval = setInterval(myPlay, 5*1000);
    }
    myPlay();

    Last edited by hum; 12-23-2005 at 10:29 AM.

  5. #5
    user in A minor
    Join Date
    Jan 2005
    Location
    finland
    Posts
    121
    ohhhhhhhhhhh........
    awesome! *makes waves*
    thank you!!!!

    ...and an extra thanks for the music, btw. loved it!

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