Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / April 2007



Tip: Looking for answers? Try searching our database.

No if...else on buttons?????

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nonybd - 30 Apr 2007 00:39 GMT
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();
}
}
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.