onRollOver actionscript HELP! --- Playing MC on hover

  • nikfiend
  • Novice
  • Novice
  • No Avatar
  • Joined: Nov 09, 2005
  • Posts: 20
  • Status: Offline

Post May 31st, 2007, 11:45 am

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. };
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 31st, 2007, 11:45 am

  • nikfiend
  • Novice
  • Novice
  • No Avatar
  • Joined: Nov 09, 2005
  • Posts: 20
  • Status: Offline

Post May 31st, 2007, 6:00 pm

Are you kidding me - nobody?
  • montyt
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 27, 2007
  • Posts: 275
  • Status: Offline

Post May 31st, 2007, 10:15 pm

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 29 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.