A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Code translation please

Threaded View

  1. #2
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    Well, basically it's because the onPress/onRelease event only happens once.

    I recommend doing something like this (NOTE: I'm assuming this code is from a button inside of a movie clip):

    code:

    on(press){
    startDrag(this);
    this.onMouseMove = function(){
    if(_root.pin.hitTest(_root.balloon)){
    _root.balloon.balloon2.gotoAndPlay("popped");
    }
    }
    }

    on(release){
    stopDrag();
    this.onMouseMove = undefined
    }




    EDIT: Oh yeah. / = _root
    Last edited by WilloughbyJackson; 06-22-2006 at 12:30 PM.

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