-
So if you duplicate a movieclip...
Hey All,
If you duplicate a movieclip as such....
for(a=0; a < photoThemes.length; a++){
_root.dupClip.duplicateMovieClip("dupClip" + a, a);
_root["dupClip" + a]._x = _root["dupClip" + a]._x + a*13;
}
You'll get instance names as such......
dupClip1
dupClip2
dupClip3
dupClip4
dupClip5
correct?
Within those clips how do you reference their own value of "a"?
this[a]?
-jub-
-
Senior Member
You would have to use something like
depth=0
for(a=0; a < photoThemes.length; a++){
var a="dupClip"+depth
_root.dupClip.duplicateMovieClip(a, depth);
// usage is _root[a]
_root[a]._x = _root[a]._x + a*13;
}
Just a guess, but try something like that.
-
Hey Corky,
My for loop seems to be functioning fine, as the clips are displayed as I had hoped. But within each duplicated clip I would like to use it's unique value [1,2,3,4,5,etc] as a variable to target back at the root.
How would you reference the instance name I guess is the question?
-
Hey Corky,
My for loop seems to be functioning fine, as the clips are displayed as I had hoped. But within each duplicated clip I would like to use it's unique value [1,2,3,4,5,etc] as a variable to target back at the root.
How would you reference the instance name [within that instance] I guess is the question?
-
this._name!!!!!!
Figured it out, Thanks All!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|