# Problem Initializing loadMovie variables

**URL:** <https://forum.kirupa.com/t/problem-initializing-loadmovie-variables/107555>\
**Category:** Uncategorized\
**Created:** [April 16, 2004, 3:46pm UTC](https://forum.kirupa.com/t/problem-initializing-loadmovie-variables/107555 "2004-04-16T15:46:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thewade](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@thewade](https://forum.kirupa.com/u/thewade)\
**Post date:** [April 16, 2004, 3:46pm UTC](https://forum.kirupa.com/t/problem-initializing-loadmovie-variables/107555/1 "2004-04-16T15:46:30Z")

</div>

Hello,  
Im having trouble loading a clip through **loadMovie** and setting some **properties** of that newly loaded movie at the same time. For example I have an XML object loading data from a php page. The **onLoad** for that XML object loads a basic table movie, and tries to set the title and body fields of that movie. The problem is that I can load the movie, but I cannot set the properties of that movie until much later.

Below are the examples of the failing code. Thanks for the help, I just cant figure out how to load data into a loaded movie. Ive even tried to include the table movie in the library of the main movie, so theres no loading latency. Even preloading the movie and jut duplicating that preloaded movie. This is driving me insane!

[color=black]Thanks for the help[/color]!  
-thewade

[size=1]//frame actionscript[/size]  
this.info.onLoad=function(success) {  
if (success) {  
dat=this.toString().split("  
",1000);  
dat.pop(); [size=1]//remove trailing newline[/size]  
for(i=0;i\<dat.length;i+=5) {  
count=i/5;  
filename=“filter”+count;  
depth=11+count;  
\_root.createEmptyMovieClip(filename,depth);  
\_root[filename].loadMovie(myURL);  
[size=1]//this part works[/size]  
\_root[filename].\_x=283_Math.cos(dat_)+322;  
\_root[filename].\_y=283_Math.sin(dat_)+322;  
\_root[filename].\_rotation=dat\*-180;  
[size=1]//this part doesnt[/size]  
\_root[filename].Topic=dat[i+1];  
\_root[filename].Body=dat[i+2];  
\_root[filename].ImgA=dat[i+3];  
\_root[filename].ImgB=dat[i+4];  
}  
}  
}

[size=1]//load event function for the movie Im loading:[/size]  
onClipEvent(load) {  
this.setTopic=function(Topic) {  
TopicWindow.Topic=Topic;  
}  
this.setBody=function(Body) {  
BodyWindow.Body=Body;  
}  
this.setImageA=function(ImgA) {  
BodyWindow.ImageA.loadMovie(ImgA);  
}  
this.setImageB=function(ImgB) {  
BodyWindow.ImageB.loadMovie(ImgB);  
}  
this.dud=function() {}  
this.addProperty(“Topic”,this.dud,this.setTopic);  
this.addProperty(“Body”,this.dud,this.setBody);  
this.addProperty(“ImgA”,this.dud,this.setImageA);  
this.addProperty(“ImgB”,this.dud,this.setImageB);  
}
