View Full Version : Image Link

02-25-2009, 09:43 AM
Dear Friend,

I am new in flash. Can anyone tell me how link a buton to local pc image.
i am making a website. In my images folder i have placed the animation and image both in 1 folder. how i can link a flash button to a jpg image. I want when someone click on my button image will be open.

02-25-2009, 10:12 AM
To load a image in actionscript..

var imageLoader = new Loader();
//listen for the loading of image to be complete
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
// Load the bitmap
imageLoader.load(new URLRequest("photo.jpg"));

function imageLoaded(e:Event):void
//this will add the loaded image to the stage.