PDA

View Full Version : button script help



markhegz
November 6th, 2003, 07:17 PM
I have the following code on a button that i am using to load movies into content_mc:

on (release) {
if (_root.section != "link1") {
_root.content_mc.gotoAndPlay("unload");
_root.section = "link1";
_root.loader.gotoAndPlay("load");
}
}

I want the content_mc to fully finish the exit transition before loading in the new section. Maybe an if statement would work

on (release) {
if (_root.section != "link1") {
_root.content_mc.gotoAndPlay("unload");
}
if (_root.content_mc == the last frame---frame label "end") *help with syntax
_root.section = "link1";
_root.loader.gotoAndPlay("load");
}
}

im just having trouble with syntax, any ideas?

paradox244
November 8th, 2003, 01:40 AM
on the last frame of the content_mc have it set a variable in the root equal to true. Then just look for the variable.
Would look like this:

//on last frame of content_mc
_root.done = true;
//whereever the heck your other code is
on (release) {
if (_root.section != "link1") {
_root.content_mc.gotoAndPlay("unload");
}
if (_root.done){
_root.done = false;
_root.section = "link1";
_root.loader.gotoAndPlay("load");
}
}


Hope that helps,
Shawn