dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Rollout not fool proof

  1. #1
    Junior Member
    Join Date
    Dec 2003
    Posts
    26

    Rollout not fool proof

    I have a rollout specified for some MCs that I have working as buttons. Problem is, if you rollout from the button really quickly, it'll remain stuck on the Over state. You have to rollover again and more slowly rollout in order to trigger the rollout mechanism to make the Over stage vanish.

  2. #2
    Senior Member
    Join Date
    Oct 2003
    Posts
    388

    Re: Rollout not fool proof

    true

  3. #3
    Senior Member
    Join Date
    Sep 2002
    Posts
    265
    post the FLA,
    I've never had this problem and making a quick file (roll out of the green box to change the other box's color) i've not been able to make it not change.

    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Oct 2005
    Posts
    66
    I'm having this same issue...is there a workaround for this?

  5. #5
    Member
    Join Date
    Oct 2005
    Posts
    66
    been searching the forums and seems like hit test should be used so it doesnt hang in the rollover...i cant seem to find any example code of hit test used on a button.
    The ones i've found have all been used on MC's...can anyone provide some info on doing a hit test on a button?
    thx

  6. #6
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    it seems lastboss has a full-proof method.
    If you don't think you're going to like the answer, then don't ask the question.

  7. #7
    flashmo.com
    Join Date
    Sep 2003
    Posts
    115
    interesting! can you post the FLA which has that problem?

  8. #8
    Member
    Join Date
    Oct 2005
    Posts
    66
    still doesnt work for me....here is the code
    what i have is an mc which is playing (smoke_right) when you rollover it goes to the label "fade" which fades out the MC, when you rollout it should fade back in, but when you mouse over it quickly it remains faded out...

    on (rollOver) {
    _root.smoke_right.gotoAndPlay("fade");

    }
    on (rollOut) {
    count++;
    if (count==2){
    _root.smoke_right.gotoAndPlay("fade");
    count=0;
    } else {
    _root.smoke_right.gotoAndPlay("fadein");
    }


    }


    ...so what is the hit test method on a button?
    Last edited by airbrush; 04-03-2008 at 08:33 AM.

  9. #9
    Member
    Join Date
    Oct 2005
    Posts
    66
    it seems hit test only works on MC's....
    So how would i convert my button to an MC that functions as a button? Here is the code I currently have on the button: also i would need the hit test added in there somewhere so it doesn hang on the roll over if you mouse over it quickly...which is currently the problem with the button.

    on (rollOver) {
    righteye.gotoAndPlay("eyeover");
    mc1._visible=false;
    smoke_right.gotoAndPlay("fade");

    }
    on (rollOut) {
    righteye.gotoAndPlay("eyeoff");
    mc1._visible=true;
    smoke_right.gotoAndPlay("fadein");

    }
    on (press) {
    ++ndupdepth;
    rightnose.duplicateMovieClip("dup"+ndupdepth, ndupdepth);
    this["dup"+ndupdepth].gotoAndPlay("nosesmoke");
    var minHeight = 10;
    var maxHeight = 25;
    setProperty("dup"+ndupdepth, _height, (minHeight+(Math.random()*(maxHeight-minHeight))));
    var maxRot = 30;
    var minRot = -10;
    setProperty("dup"+ndupdepth, _rotation, (minrot+(Math.random()*(maxRot-minRot))));
    var minAlpha = 20;
    var maxAlpha = 100;
    setProperty("dup"+ndupdepth, _alpha, (minAlpha+(Math.random()*(maxAlpha-minAlpha))));
    }
    on (press) {
    righteye.gotoAndPlay("eyehit");
    }

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