Flash Question

Status
Not open for further replies.

bos

New member
Sep 15, 2006
11
0
0
TX
this.button1.onRollOver = function() {
button1.gotoAndPlay("_over");
}

this.button1.onRollOut = function() {
button1.gotoAndPlay("_out");
}

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

i'm using this actionscripting to control my button. ( made with a MC ) button1 being the instance name in the example, and "_over" & "_out" being the effect. "bam" is the frame label. I can't get the onRelease to call that label and load the content within it's parameters, that's one problem, another being that I'm seeing it only works if I place it after a certain frame. Why is this? Also, my other buttons won't do any sort of animation, I used the exact same method as my first button which animates fine. This is giving me a headache any input is appreciated. :2gunsfiring_v1:
 


Try changing your onRelease to onClick or onPress. Actionscript is a pain in the balls sometimes, that's why I switched to Swish. it may be a cop out but god damn it saves so much time.
 
well, i figured out the onRelease probelm, I still can't figure out why none of my other buttons want to work. I did the exact same process, there is nothing different with the them ~.~
 
You can try this instead, it's a slightly 'cleaner' Actionscript 2.0 method:

Code:
buttonInstanceName.onRelease = funciton():Void {
gotoAndPlay("name");
};

Give that a try...
 
yeah, the onRelease problem was fixed, I just dont understand why none of my other buttons want to work. i've used this technique before with no problems.
 
Status
Not open for further replies.