onRollOver actionscript HELP! --- Playing MC on hover

  • nikfiend
  • Novice
  • Novice
  • nikfiend
  • Posts: 20

Post 3+ Months Ago

Ok so i have a button and when you hover over it a MC pops out with more buttons in it, and when you roll out it plays the MC in reverse popping it back in. How would I get it to stay in the hover state (popped out) until I move the mouse away from the pop out MC. Here is the code i am using.

Code: [ Select ]
btn99.stop();
btn99.onRollOver = function() {
  _root.pop.onEnterFrame = function() {
    if (this._currentframe<this._totalframes) {
      this.nextFrame();
    } else {
      delete this.onEnterFrame;
            
    }
  };
};
btn99.onRollOut = function() {
  _root.pop.onEnterFrame = function() {
    if (this._currentframe > 1) {
      this.prevFrame();
    } else {
      delete this.onEnterFrame;
    }
  };
};
  1. btn99.stop();
  2. btn99.onRollOver = function() {
  3.   _root.pop.onEnterFrame = function() {
  4.     if (this._currentframe<this._totalframes) {
  5.       this.nextFrame();
  6.     } else {
  7.       delete this.onEnterFrame;
  8.             
  9.     }
  10.   };
  11. };
  12. btn99.onRollOut = function() {
  13.   _root.pop.onEnterFrame = function() {
  14.     if (this._currentframe > 1) {
  15.       this.prevFrame();
  16.     } else {
  17.       delete this.onEnterFrame;
  18.     }
  19.   };
  20. };
  • nikfiend
  • Novice
  • Novice
  • nikfiend
  • Posts: 20

Post 3+ Months Ago

Are you kidding me - nobody?
  • montyt
  • Proficient
  • Proficient
  • User avatar
  • Posts: 275

Post 3+ Months Ago

u have used the too much script for the simple work animation.

I guess u r lookin for the drop down menu and drop down popups.
here is the solution.

make a movie clip with the 2frame. On 1 frame put ur button and on 2nd frame put rest of the drop down button.

outside that MC. put this code on the frame not over the movieClip

Code: [ Select ]
var mouselistener:Object = new Object();
mouselistener.onMouseMove = function() {
    if (menu_mc.hitTest(_xmouse, _ymouse)) {
        menu_mc.gotoAndStop(2);
    } else {
        menu_mc.gotoAndStop(1);
    }
};
Mouse.addListener(mouselistener);
  1. var mouselistener:Object = new Object();
  2. mouselistener.onMouseMove = function() {
  3.     if (menu_mc.hitTest(_xmouse, _ymouse)) {
  4.         menu_mc.gotoAndStop(2);
  5.     } else {
  6.         menu_mc.gotoAndStop(1);
  7.     }
  8. };
  9. Mouse.addListener(mouselistener);


hoep this works for u.

:)

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.