I am a relative begginer with ActionScript so please bare with me.
I have a button within a movie clip. I have the following code assign to it:
on (release) {
_root.gotoAndPlay(1);
startMovie = "intro";
}
I have a conditional statement at root frame 1 that will load movieClip
"intro" if startMovie = "intro"
The script executes as is if startMovie is undeclared.
I have tried declaring the value as _root.startMovie = "intro"; as well.
I know I must be missing something simple here.
Any help would be appreciated
kglad - 11 Jul 2008 20:13 GMT
startMovie on the _root timeline and inside that movieclip are two different variables.
try:
on (release) {
_root.gotoAndPlay(1);
_root.startMovie = "intro";
}
brendanr - 11 Jul 2008 20:27 GMT
Thanks kglad.
I did try _root.startMovie = "intro"
Maybe I am missing something else. Here is the code for root timeline:
myProgressBarListener = new Object();
myProgressBarListener = function (eventObject) {
myProgressBar._visible = false;
};
if (!_level0.startMovie) {
myLoader.contentPath = "home.swf";
}
if (_level0.startMovie == "intro") {
myLoader.contentPath = "intro.swf";
}
if (_level0.startMovie == "marketing_print") {
myLoader.contentPath = "marketing_print.swf";
}
myLoader.scaleContent = false;
myProgressBar.addEventListener("complete", myProgressBarListener);
myProgressBar.mode = "polled";
myProgressBar.source = "myLoader";
myProgressBar.conversion = "1";
myProgressBar.label = "LOADING %3%%";
myProgressBar.direction = "right";
myProgressBar.labelPlacement = "bottom";
kglad - 11 Jul 2008 20:46 GMT
if you're loading that swf into another swf, _root may not refer to the main timeline. use _level0.startMovie in your on(release) handler.