blinkerton
03-28-2007, 05:29 AM
I am trying to use a for loop to create MovieClips, move them over, then load a thumbnail image, but can't seem to get the correct syntax for adding a number variable to a string. ("currentNode" is from XML). Any thoughts?
Thanks
function populateGallery(currentNode)
{
for(x = 0; x < horizonal_dimension * number_of_pics ; x += horizonal_dimension)
{
this.createEmptyMovieClip("dynThumb" + pic_number, pic_number);
"dynThumb" + pic_number._x = horizonal_dimension;
imagePath = currentNode.attributes.jpegURL;
dynThumb + pic_number.loadMovie(imagePath);
currentNode = currentNode.nextSibling;
pic_number++;
}
}
Thanks
function populateGallery(currentNode)
{
for(x = 0; x < horizonal_dimension * number_of_pics ; x += horizonal_dimension)
{
this.createEmptyMovieClip("dynThumb" + pic_number, pic_number);
"dynThumb" + pic_number._x = horizonal_dimension;
imagePath = currentNode.attributes.jpegURL;
dynThumb + pic_number.loadMovie(imagePath);
currentNode = currentNode.nextSibling;
pic_number++;
}
}