Hi, I tried putting the if...else statement into a frame for a button, and it
doesn't work. This is the AS:
if (_root.main_mc._currentframe == 1) {
on (_root.top_mc.web_btn.onRelease) {
_root.main_mc.play();
}
}
Why doesn't this work? It says that mouse conditions are only for buttons,
when web_btn is a button. I would really appreciate any help. Thanks
Devdoc - 30 Apr 2007 10:13 GMT
Hi!
Anything placed on a button must be within a event handler of some sort (such
as on() or onLoadClip())
Just placeing you if statement inside the on() handler should do the trick!
on (_root.top_mc.web_btn.onRelease) {
if (_root.main_mc._currentframe == 1) {
_root.main_mc.play();
}
}
ggshow - 30 Apr 2007 11:02 GMT
_root.top_mc.web_btn.onRelease=function(){
if (_root.main_mc._currentframe==1) {
_root.main_mc.play();
}
}