|
-
help with for ( )
I have 7 movieclips that I called command1, command2, command3, ...
for each of them, I want to set their alpha value to 0
so, I use the command for()
for(i=1; i<8; i++){
???._alpha = 0;
but I don't know how to write the statement, I need help please
thanks
MaX_BoY
-
Senior Member
Hi,
If the for loop is in the same timeline as the movie clips you can use,
code:
for (var i = 1; i < 8; ++i) {
this["command" + i]._alpha = 0;
}
if the clips are in a different timeline you just need to replace "this" with the path to the timeline that contains them so for example if the clips were in a movie clip named myClip which was on the same timeline as the code for the for loop you could use,
code:
for (var i = 1; i < 8; ++i) {
this.myClip["command" + i]._alpha = 0; // this version looks inside the clip myClip to find the command clips
}
-
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
|