loadMovie with variables

hi,

I’m working on a site where i want to pass around some variables to determine which external swf is loaded.

i’m having sooo many problems, hopefully someone can help.

on the most basic level, i did a test as follows:

i made a mc on the stage named holder

i also made a button and a controller mc (where the code is kept)

on the button i put:

on(release ){
_root.loaditup=1;
}

then on the controller mc i put:

onClipEvent(enterFrame){
if(_root.loaditup==1){

_root.holder.loadMovie(“movie6.swf” );
}
}

Why does this not work?!

I can’t believe i’m so stuck on this. What i’m actually trying to do is more complicated but at the most basic level i need to understand how to make this code load the external movie “movie6.swf” by referencing a variable.

The files are all in the same folder and i’ve done diriect testing and it works fine. i.e.

on (release ){
_root.holder.loadMovie(“movie6.swf” );
}

so i know all the paths are fine.

Please can someone help me with this?

thanks so much

kd

sorry pom,

this is a flash mx problem

There’s a problem in your code. Because you load onEnterFrame, so you load over and over and over and over (and over). Just change the variable once the loading begins:

onClipEvent(enterFrame){
  if(_root.loaditup==1){
    _root.holder.loadMovie("movie6.swf" );
    _root.loaditup--;
  }
}

pom :trout:

cheers!

I figured it out at 3 in the morning last night!

You know when u have one of those days?!

Anyway thanks very much for your help, it is greatly appreciated.

laters,

kd