I have successfully dynamically loaded Jpegs into my flash document(using PHP), but then I have another small problem…
When I dynamically load the image (example: image_icon_bluesky.jpg) I then need to tell the MC that is holding the loaded image that it needs to do this…
on (release) {
_root.image_bluesky.alpha = 100;
}
SO basically every time a new image is loaded in my sort of “loop” script. I need to tell the image that it needs to put specific code onto the MC using specific “image” details for that specific image.
I hope this is clear. Basically what I’m trying to do…
On my flash stage I already have MC’s that have their alpha properties set to “0”. Lets say there are 3 images. One MC is called Blue, other is called Red and the last one is called Yellow.
Now using AS + PHP I have dynamically loaded 3 Jpeg’s …
myData = new LoadVars()
myData.load(“theitems.php”)
myData.ref = this
myData.onLoad = function(succes){
if(succes){
for(var i=0; i<this.cant; i++){
this.ref[“holder_mc”+i].loadMovie(this[“item”+i])
}
} else trace(“Error loading data”)
}
In the PHP script a query takes the info from a database. In this case there are 3 images to load. Let’s say they are called ‘Blue.jpg’, ‘Red.jpg’ and ‘Yellow.jpg’.
Okay now ideally I need to find someway of sending the “link” with the image. So that when ‘Blue.jpg’ loads on the stage it knows it’s AS needs to be
on (release) {
_root.blue.alpha = 100;
}
and so on for each image…I have tried to explain this as well as I possibly can. I just wanna know if this is possible or if there is a simple way of doing it. I am so stressed by this that I might not even be thinking clearly. I appreciate any replies on the subject!