PDA

View Full Version : this wont work


loach
02-04-2006, 04:19 AM
stop ()
arr_movies=['mov_0','mov_1','mov_2','mov_3'];
function d (){
this.attachMovie(arr_movies[random(arr_movies.length)]);
};
test.onPress = d


Trying to get a random attach movie.Man I feel so lost with this actionscript stuff.I do tutorials and thread searches and am still lost.:mad:

Flash Gordon
02-04-2006, 04:35 AM
stop ()
arr_movies=['mov_0','mov_1','mov_2','mov_3'];
function d (){
num = random(arr_movies.length);
trace(num);
depth = 99;
new_name = "balnadflkjasdfjk;asdf";
this.attachMovie(arr_movies[num], new_name, depth);
};
test.onPress = d

loach
02-04-2006, 04:49 AM
Thx flashgordon.It works fine.