Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Image Link

  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    25
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Image Link

    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.

  • #2
    Regular Coder kokjj87's Avatar
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    279
    Thanks
    1
    Thanked 55 Times in 54 Posts
    To load a image in actionscript..
    Code:
     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.
    	 addChild(e.target.content);
     }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •