# \[FMX\] loadmovie with variables

**URL:** <https://forum.kirupa.com/t/fmx-loadmovie-with-variables/98232>\
**Category:** Uncategorized\
**Created:** [January 4, 2004, 11:12pm UTC](https://forum.kirupa.com/t/fmx-loadmovie-with-variables/98232 "2004-01-04T23:12:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maizoon](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@Maizoon](https://forum.kirupa.com/u/Maizoon)\
**Post date:** [January 4, 2004, 11:12pm UTC](https://forum.kirupa.com/t/fmx-loadmovie-with-variables/98232/1 "2004-01-04T23:12:38Z")

</div>

Hi,

I have this script on my main timeline:  
[AS]  
stop();  
this.createEmptyMovieClip(“tntHolder”, 2000);  
this.tntHolder.\_x = 0;  
this.tntHolder.\_y = 100;  
onEnterFrame = function() {  
if (MyTalent != CrtTalent) {  
tntHolder.loadMovie(“talent/talent”+MyTalent".swf");  
CrtTalent = MyTalent;  
}  
};  
[/AS]  
and on a button:  
[AS]  
on (release) {  
MyTalent = “0”;  
}  
now…this doesn’t do anything, if i change the line reading:  
tntHolder.loadMovie(“talent/talent”+MyTalent".swf");  
to read:  
tntHolder.loadMovie(MyTalent);  
and change:  
MyTalent = “0”;  
to  
Mytalent = “talent/talent0.swf”;  
[/AS]  
it works, but alas I can’t have it done like this. It needs to be variable driven so I can do things like “next” or “previous” and whatnot. I know my loadMovie code is butchered, but I have no idea how to incorporate something dynamic (MyTalent) into something static (talent/talent(variable).swf) I tried basing this code off a for loop, but as you can see that didn’t get me very far 😛

Thanks
