Skip to main content
August 8, 2006
Question

actionscript doesn't load with movie

  • August 8, 2006
  • 1 reply
  • 334 views
I created a flash movie to be loaded into another movie using:
on (release) {

//load Movie Behavior
if(this.holder2 == Number(this.holder2)){
loadMovieNum("theRetro.swf",this.holder2);
} else {
this.holder2.loadMovie("theRetro.swf");
}
//End Behavior

}

when I play the "theRetro.swf" by itself it works great, when I load it into another movie, it plays but the actionscript doesn't work. Both are done and published in Flash 8.

Anyone have this problem.

Thank you in advance for your help.

Keith
This topic has been closed for replies.

1 reply

Inspiring
August 8, 2006
Check if you use the _root in your event or other code. When your import swf in aonther one, the _root is then the main movie. May be just a scope problem.

To test if your code exist, try to put just a trace("A TEST"); on the first frame of your second movie. Go in the first one an test it.

Hope that can help
August 10, 2006
I tried the trace and it worked in the original movie, but not when it loaded. I am using _root in the code that is loading,
code:
onClipEvent(enterFrame){
_root.line._x=random(700);
for(i=0; i<=2; i++)
//I left the < symbol off
{
_root.dot.duplicateMovieClip("dot"+i,i+1);
}
if (i=2){
i=0;

}
}
<end code>
I tried using "this" instead of root and I also tried placing "this._lockroot =true;" in the first frame of the movie that is being loaded into the placeholder movieclip. I am sure it is something with the root and I believe I am on the right track, but would not bet money on it. The movie clip that is loaded plays fine, it just doesn't play the actionscript.

Anyone have any thoughts...

Thank you in advance for any help.

Keith