Flash Button Question
- Started
- Last post
- 4 Responses
- Robo
I have created a smooth flash rollover button mov which is controlled by a blank button.
I have about eight buttons. How do i make a button stay "on" when it is clicked and subsequenrly go back to it's "off" state when another button is clicked?
- unfittoprint0
don't uese buttons. use movies.
make three states (label the frames "off", "over", "down").
use movie events like onMouseOver, onMouseOut, on Release...
make a variable named active to get the 'active' movie name when pressed and disable the previous active movie.
- Robo0
Yeah I am using the following code for the rollover movie:
on (rollOver) {
b1.gotoAndPlay("on");
}
on (rollOut) {
b1.gotoAndPlay("off");
}How do I set the variable?
- dehryll0
if i understand correctly, how about the following:
on (rollOver) {
b1.gotoAndPlay("on");
}
on (rollOut) {
if (_root.active_button !=1){
b1.gotoAndPlay("off");
}
}
on (release){
_root.active_button=1
b1.gotoAndPlay("on")
}just change the "1" to a different number for each button
- unfittoprint0
ok. As I stated before don't use buttons. do movie clips with:
this.onPress=function(){
dothis
}
this.onRollOver=function(){
dothis
}
this.onRollOut=function(){
dothis
}for example dothis on the onPress event could be:
active.gotoAndStop("off")
active=this
this.gotoAndStop("on")