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/




More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support