PDA

View Full Version : Creating Variables



QBA
July 14th, 2003, 02:27 PM
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 :)

Thanks

Alex

Digitalosophy
July 14th, 2003, 02:38 PM
mytext.variable = myVar


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

mindfriction
July 15th, 2003, 01:12 PM
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[i] = this.createEmptyMovieClip("mc"+i,i);
}




blah...

Digitalosophy
July 15th, 2003, 01:16 PM
nice call :) i thought he wanted to give atextbox a variable name

mindfriction
July 16th, 2003, 01:08 AM
:) 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 :P

Digitalosophy
July 16th, 2003, 01:12 AM
cool :)