Hey
If i have a MC which contains a textbox say with variable myTEXT assigned to it, when i duplicate this text box how do i call the variable for each textbox there after?
Thanks
Hey
If i have a MC which contains a textbox say with variable myTEXT assigned to it, when i duplicate this text box how do i call the variable for each textbox there after?
Thanks
Well it all depends on how you are duplicating the clip (just using duplicateMovieClip(), or maybe using a for loop).
[AS]clipInstanceName.duplicateMovieClip(newName, level)[/AS]
That is the basic set up of duplicate movie clip. You need the newName attribute so that you don’t have clips with the same instance name. So your duplicated clips instance name is the name you put in the newName attribute.
So lets say I use…
[AS]myClip.duplicateMovieClip(“myClip2”, 1000);[/AS]
That duplicates myClip and makes a myClip2 I can then take this farther by targeting myClip2.
[AS]myClip.duplicateMovieClip(“myClip2”, 1000);
myClip2._x = 200;
myClip2._y = 100;[/AS]
That will position your duplicated clip at (200, 100).
So now about targeting the variable inside…
[AS]myClip.duplicateMovieClip(“myClip2”, 1000);
myClip2.myTEXT = “value”;[/AS]
if your mc contains a textbox with variable myTEXT, u have obviously named the duplicated text box, say myTEXT2,
Say you want the text2 box to say words on rollover, use;
on (rollOver) {
_root.movieclipname.myTEXT2 = “hello”;
}
on (rollOut) {
_root.movieclipname.myTEXT2 = “”;
}
on (release) {
_root.movieclipname.myTEXT = “U are here”;
}
Does this help, or am I missing th point?. =)
maybe i should leave this 2 the pro’s hey ‘lostinbeta’ =)
I think i understand now, i’ll experiment with it thanks
*Originally posted by .:®:. *
**maybe i should leave this 2 the pro’s hey ‘lostinbeta’ =) **
HAHAHA, I am no pro, not even close! I will get there eventually though… :run:
Baggio: Cool, good luck man
:: Copyright KIRUPA 2024 //--