Creating Variables

Hi
How flash setup a variable to handle the newly created movieclip?
Example:

this.createEmptyMovieClip(“mymovie”,2);
this.clientscroller.setScrollContent(mymovie);

Where did I set it up as a variable? I tried this and didn’t work either:

his.createEmptyMovieClip(“mymovie”,0);
mymovie.createTextField(“mytext”,1,100,100,300,100);

Hope some one can help me out with this :slight_smile:

Thanks

Alex

[AS]
mytext.variable = myVar
[/AS]

that will give the textbox with the instance name mytext a variable named myVar

Sorry Dig if im crashing this thread but…

just thought I would add something for QBA


//set myMovie var to equal path to new clip
myMovie = this.createEmptyMovieClip("mymovie",0);

Sometimes when creating more than one movie you may want to keep track of their instance names dynamically


mcCol = new Array(20);

for(i=0;i<20;i++)
{
    mcCol* = this.createEmptyMovieClip("mc"+i,i);
}

blah…

nice call :slight_smile: i thought he wanted to give atextbox a variable name

:slight_smile: ty Dig, I reread the post and I thought maybe QBA was asking about that instead of what you put in, funny though you’re post has given me some ideas for what Im working on :stuck_out_tongue:

cool :slight_smile: