passing parameters to a function in a for loop
how pass values of loop (for example increment count) onrelease function inside loop? in example below movie clip go "whatever.php?var=10" because value of when click 10. want value of included each run of loop. how do that? i'm guessing maybe listener, can't work.
try so:
var home:movieclip = this;
(var = 1; < 10; i++) {
var t = home.attachmovie("mymovie", "mymovie" + i, i);
t.myi = i;
t.onrelease = function() {
geturl("whatever.php?var=" + this.myi);
}
}
--
dave -
head developer
http://www.blurredistinction.com
adobe community expert
http://www.adobe.com/communities/experts/
var home:movieclip = this;
(var = 1; < 10; i++) {
var t = home.attachmovie("mymovie", "mymovie" + i, i);
t.myi = i;
t.onrelease = function() {
geturl("whatever.php?var=" + this.myi);
}
}
--
dave -
head developer
http://www.blurredistinction.com
adobe community expert
http://www.adobe.com/communities/experts/
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment