Groups | Blog | Home
all groups > flash actionscript > september 2004 >

flash actionscript : simple syntax question


Leopold Hastreiter
9/16/2004 10:30:00 PM
Hello folks,

I am using this within a loop and it doesn't seem to work:

myThumb = "thumb_" + i;
myThumb.loadMovie("beauty/thumb_beauty_" + i + ".jpg");

So I can't use variables for instance names in such a manner?

Thanks,
Leopold
NSurveyor
9/16/2004 10:53:58 PM
Try this instead:

function thumbImageLoader(myThumb,counter) {
myThumb.loadMovie("beauty/thumb_beauty_"+counter+".jpg");
}
thumbImageLoader("thumb_"+i,i);
Leopold Hastreiter
9/16/2004 11:07:31 PM
Hmm nope, doesn't work. I am using this script for testing now:

function thumbImageLoader(myThumb, counter) {
myThumb.loadMovie("beauty/thumb_beauty_"+counter+".jpg");
}
thumbImageLoader("thumb_"+1, 1);

This DOES work though, so the problem doesnt lie elsewhere:

thumb_1.loadMovie("beauty/thumb_beauty_1.jpg");
_jrh_
9/16/2004 11:14:49 PM
Try this:

myThumb = this["thumb_"+i]

Leopold Hastreiter
9/16/2004 11:25:58 PM
_jrh_
9/16/2004 11:50:32 PM
AddThis Social Bookmark Button