|
-
i have an array (this is just a test)
Code:
map = new Array();
map = [[1], [2], [3]];
and i want some code that goes through it and if it = 1 attach movie 1 or if it is 2 attach movie 2 and so on??? how is this done??
-
Try this one:
Code:
for (var k=0;k<=map.length;k++){
if (map[k]==1){
attachMovie(movie1,new_movie1_name,depth); // movie1
} else if (map[k]==2){
attachMovie(movie2,new_movie2_name,depth); // movie2
} else if (map[k]==3){
attachMovie(movie3,new_movie3_name,depth); // movie3
}
}
or you can use other loops...like while() or do{...}while()
Good luck
ZeroIQ
-
sorry it still does not work so could you do me a fla???
-
to attach a clip you need to:
right click it in the library, choose "linkage" , choose to export it and type in an ID for the clip. you use that ID when you call the attcach command. if you're using the symbol name it wont work. Then like zeroiq wrote
attachMovie(ID,new_movie1_name,depth); // movie1
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
|