p0c
02-25-2008, 10:39 AM
I recently had this problem but decided to make a new thread seeing as though I have fixed my original problem but in the typical flash way, ran straight into another
I have this function that is called fairly often throughout my animation...
function pauseMovieClips(pauseAll) {
stop();
if (stage.contains(skimmerWorker)){
trace("Skimmer Worker Stopped");
skimmerWorker.stop();
}
if (stage.contains(cloud)){
trace("Cloud Stopped");
cloud.stop();
}
if (stage.contains(wholeScreen)){
trace("Skimmer Worker Nested Stopped");
wholeScreen.skimmerWorker.stop();
}
if (stage.contains(warmAnim)){
trace("Warm Animation Stopped");
warmAnim.stop();
}
}
However it seems if the first movie clip isn't contained on the stage at that moment in time it seems to ignore all other contiguous if statements!? Almost like it has a break in it. Am I structuring this correctly to run one if statment whether it is true or false, i need it to go onto the next ones.
This is an example of what I get, when skimmerWorker is present and cloud (the next one) isn't...
Skimmer Worker Stopped
TypeError: Error #2007: Parameter child must be non-null.
at flash.display:: DisplayObjectContainer/contains()
at SiteSetUp_fla::MainTimeline/pauseMovieClips()
at SiteSetUp_fla::MainTimeline/cBarPause()
Even if warmAnim is present it will not stop.
Can anyone help me here, cheers!
I have this function that is called fairly often throughout my animation...
function pauseMovieClips(pauseAll) {
stop();
if (stage.contains(skimmerWorker)){
trace("Skimmer Worker Stopped");
skimmerWorker.stop();
}
if (stage.contains(cloud)){
trace("Cloud Stopped");
cloud.stop();
}
if (stage.contains(wholeScreen)){
trace("Skimmer Worker Nested Stopped");
wholeScreen.skimmerWorker.stop();
}
if (stage.contains(warmAnim)){
trace("Warm Animation Stopped");
warmAnim.stop();
}
}
However it seems if the first movie clip isn't contained on the stage at that moment in time it seems to ignore all other contiguous if statements!? Almost like it has a break in it. Am I structuring this correctly to run one if statment whether it is true or false, i need it to go onto the next ones.
This is an example of what I get, when skimmerWorker is present and cloud (the next one) isn't...
Skimmer Worker Stopped
TypeError: Error #2007: Parameter child must be non-null.
at flash.display:: DisplayObjectContainer/contains()
at SiteSetUp_fla::MainTimeline/pauseMovieClips()
at SiteSetUp_fla::MainTimeline/cBarPause()
Even if warmAnim is present it will not stop.
Can anyone help me here, cheers!