|
-
Using conditions to control button actions
I used a tutorial to attempt to set up my code so that after a button is released and an external .swf is loaded the same button can't be activated again (on release or on rollover) until a different button is released.
Here is an example of my actionscript. What I'm trying to do here is just have the button not replay the mc in the over state if it's movie clip is already loaded in:
var canrelease:Boolean = false;
can_mc.can_btn.onRelease = function() {
if (canrelease == false) {
_root.empty_mc.loadMovie("paper1.swf",0);
} else {
can_mc.can_btn.spray_mc.gotoAndStop(25);
}
};
I've tried numerous times to get this to work but nothing is happening.
I'd also like the button to not reload the movie clip alreasy being played if it is currently loaded.
Thanks!
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
|