Having trouble with a Button in flash AS 2.0 staying on the hit state when clicked
I have created a flash file and it seems to work when i export the swf file. But once i upload the swf into an html file and onto the server something goes wrong.
What i was trying to do is have a button stay highlighted once you've clicked. I'm using movie clips instead of buttons.
activebutton = 0;
activeanimation = 0
contract.onRollOver = function(){
if (activebutton == this._name){
return;
} else {
contract.gotoAndPlay("rollover");
}
};
contract.onRollOut = function(){
if (activebutton == this._name){
return;
} else {
contract.gotoAndPlay("rollout");
}
};
contract.onPress = function(){
activeanimation.gotoAndPlay("rollout");
activebutton = this._name;
activeanimation = contract;
contract.gotoAndStop("active");
};
marmar.onRollOver = function(){
if (activebutton == this._name){
return;
} else {
marmar.gotoAndPlay("rollover");
}
};
marmar.onRollOut = function(){
if (activebutton == this._name){
return;
} else {
marmar.gotoAndPlay("rollout");
}
};
marmar.onPress = function(){
activeanimation.gotoAndPlay("rollout");
activebutton = this._name;
activeanimation = marmar;
marmar.gotoAndStop("active");
};
btn8.onRollOver = function(){
if (activebutton == this._name){
return;
} else {
btn8.gotoAndPlay("rollover");
}
};
btn8.onRollOut = function(){
if (activebutton == this._name){
return;
} else {
btn8.gotoAndPlay("rollout");
}
};
btn8.onPress = function(){
activeanimation.gotoAndPlay("rollout");
activebutton = this._name;
activeanimation = btn8;
btn8.gotoAndStop("active");
};
btn9.onRollOver = function(){
if (activebutton == this._name){
return;
} else {
btn9.gotoAndPlay("rollover");
}
};
btn9.onRollOut = function(){
if (activebutton == this._name){
return;
} else {
btn9.gotoAndPlay("rollout");
}
};
btn9.onPress = function(){
activeanimation.gotoAndPlay("rollout");
activebutton = this._name;
activeanimation = btn9;
btn9.gotoAndStop("active");
};
btn10.onRollOver = function(){
if (activebutton == this._name){
return;
} else {
btn10.gotoAndPlay("rollover");
}
};
btn10.onRollOut = function(){
if (activebutton == this._name){
return;
} else {
btn10.gotoAndPlay("rollout");
}
};
btn10.onPress = function(){
activeanimation.gotoAndPlay("rollout");
activebutton = this._name;
activeanimation = btn10;
btn10.gotoAndStop("active");
};
My question is why isnt it working on the server?!? Please help/
I've also attached the fla file. THank you so much.
Attached Files
The button isnt staying highlighted, but it is on the swf file when exported on my desk top.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width