Hi, I’m trying to get a custom[COLOR=Black] flash gallery g[COLOR=blue ! important][FONT=verdana][COLOR=blue ! important][/FONT][/COLOR][URL=“http://board.flashkit.com/board/showthread.php?t=816949#”][/COLOR][/COLOR]oing by using the loadMovie command with Jpeg’s. I must use this method as it’s what is required by our project. I am trying to figure out some way to make an array to keep all of my image names and then detect which button is being pressed and have it call the corresponding number within the array.
Currently I have some code that is working quite well but not fully
stop();
var thumbArray:Array = ["i1", "i2", "i3", "i4", "i5"];
thumbArray[0] = "MedievalCrossbowDiffuse.jpg";
thumbArray[1] = "InGameScreenShot9.jpg";
//Button Objects
Button.prototype.onPress = function() { //function to detect the instance name of the button
var clickedNumber:String = this._name; //when traced returns i1 or i2 depending on which button is clicked.
imgContainer.loadMovie(clickedNumber); //trying to load i2 but just comes up as undefined.
}
Also i’m going to need to be able to unload the opened jpeg by clicking anywhere off of the jpeg’s area, help with that too would be highly appreciated, i know how to unload a jpeg but I don’t know how to detect when you click any surrounding area of it.