all groups > flash data integration > march 2007 >
You're in the

flash data integration

group:

Referencing what is in a movieclip


Re: Referencing what is in a movieclip BorosAdam
3/12/2007 12:00:00 AM
flash data integration:
you may put a variable in each mc containing the name, id, or path to the
image. afterwards as the user clicks the mc you can get from that variable wich
image to load. i hope it's clear. :) something like:



// let's say you have an array called imageArray containing filesystem paths
to the images
for (i=0; i<imageArray.length; i++){
//here you create the mc for the image, position it and load the image into
it. let's say you are naming these mcs like: image1, image2, and so on and they
all are in a mc called thumbnails
current = thumbnails["image"+i]
current.imagePath = imageArray[i];
//now you have the path to the image in every mc, so you can refer to it if
the user clicks, like:
current.onRelease = function(){
imageToLoad = this.imagePath;
gotoAndPlay("bigsize");
}
}
Referencing what is in a movieclip thahip
3/12/2007 1:22:25 AM
Hi,

I am calling an image from a server to be displayed in flash using php, mySQL.
If the image is in part of a browsing gallery where there are eight images on
screen all in movieclips how do I get it so when a movieclip is clicked it
recognises what image it contains and then goes to another frame where it can
have just that one image?

thanks

Gavin
AddThis Social Bookmark Button