View Full Version : Variables exploding my head

11-14-2007, 06:41 PM
I can't make that paradigm shift into understanding how to gain control over a movie clip so it only plays once 'onPress'.

Basically, I have a movieclip that has an onRollover, onRollOut, and onRelease -- simple, but I want the Release to; 1) disable the RollOver and RollOut until the "release" has finished, then 2) disable the onRelease function once "release" has finished -- I have it like so, but I'm obviously doing variables incorrectly because the RollOver and RollOver don't reset after "release" finishes:

var bcB = 0;
var bcBB =0;

this.onRollOver = function (){
gotoAndPlay ("over");}
this.onRollOut = function (){
gotoAndPlay ("out");}

this.onRelease = function (){
gotoAndPlay ("release");}

11-15-2007, 12:44 AM
maybe u can use onEnterframe to have a constant checker for the state of your button. have 3 variables and set them in your button's action on each state. then onENterframe have a bunch of if else statemnts to control the animation?