A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: fade external image

Threaded View

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    15

    fade external image

    Hi

    Can anyone help me with fading in external images into the movie clip please?

    Here is my code:

    Code:
     function loadImage(url:String):void {
                        imageLoader = new Loader();
                        imageLoader.load(new URLRequest(url));
                        imageLoader.contentLoaderInfo.addEventListener(ProgressEven t.PROGRESS, imageLoading);
                        imageLoader.contentLoaderInfo.addEventListener(Event.COMPLE TE, imageLoaded);
              }
              loadImage("imgs/" + pic + ".jpg");
     
     
             function imageLoaded(e:Event):void {
                        if (pic_mc.loadedImage) {
                        pic_mc.removeChild( pic_mc.loadedImage );
                        }
                        pic_mc.loadedImage=imageLoader;
                        pic_mc.addChild(imageLoader);
              }

    Many thanks
    Last edited by pcmac; 02-27-2013 at 06:41 AM.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center