Loading Images upon button clicks in CS4
I have a map of a building and I have buttons that I can angle that I wish to load up images to show a friend. I'd ideally like to manually set each picture for each button.
Can anyone please help me with this code? I would very much appreciate it.
You will have to make a movie clip to load your images in. A button for each image item you will like to load. After that, make sure to name all your movie clips. For this example I will name the movie clip which will load my images (image). I will name each button (btn1, btn2, btn3, btn4). No we start scripting, this is the simplest code to load my images:
Now each button will load a different image. If more images are to be loaded, just add more buttons and copy and paste more scripts.
//copy and paste code
function imageLoad ( file:String )
var req:URLRequest = new URLRequest( file );
var myLoader:Loader = new Loader();
I have attached the FLA file for a better reference.
Click Here to Expand Forum to Full Width
Poll by Flashkit.com