onmousemove help please

  • cotolay
  • Born
  • Born
  • cotolay
  • Posts: 1

Post 3+ Months Ago

i'm having trouble with the onMouseMove event.

I have a button working with drag. I want to make it so when u press on the button and drag it then when you release it it doesnt do anything. I want to make the button go to an other frame but only if i dont drag it.

I tried to work it with onmousemove. But it wont work.

I have this... but it doesnt work as i expect it to:

Code: [ Select ]
on (press) {
_root.onEnterFrame = function() {
firstX = _root._xmouse;
updateAfterEvent();
}
startDrag("_root.menu", false, 0, 0, 0, -(480-320));
}

on (release) {

_root.onMouseMove = function() {
if (_root._xmouse==firstX) {

_root.gotoAndStop(2);}
}
}

on (release) {
stopDrag();

}
  1. on (press) {
  2. _root.onEnterFrame = function() {
  3. firstX = _root._xmouse;
  4. updateAfterEvent();
  5. }
  6. startDrag("_root.menu", false, 0, 0, 0, -(480-320));
  7. }
  8. on (release) {
  9. _root.onMouseMove = function() {
  10. if (_root._xmouse==firstX) {
  11. _root.gotoAndStop(2);}
  12. }
  13. }
  14. on (release) {
  15. stopDrag();
  16. }
Moderator Remark: Added [code] tags
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 15 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
 

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