View Single Post
Old 03-12-2009, 11:20 AM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
You can only import as a string like that, so you cannot load a function through a file. This is a security precaution. So you can load a string to the swf you wish to load, and have a function ready in the flash file to accept it.
Also I don't think you can put a function inside of an if statement. variable1 isn't a variable in this situation, its the name of a function which has to be called for the code to execute.

Code:
makeNew = function () {
this.createEmptyMovieClip("container",1);
container._x =0;
container._y =0;
container.loadMovie("loaded.swf");
}

if (_root.firstvariable==5){
makeNew();
}
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote