A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Preloader with image

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Hey guys,

    Im trying to create a preload from two images. the shape of these images are the same but the colors differ. one is blak and the other has a chrome fill.

    now what do I want..

    based on the precentage i want to display pixels of the crome image over the other image. so that when it begins loading the black image is shown and when the loading is done the crome image is show.

    an example is at http://www.meltmedia.com

    Thanks a lot!


  2. #2
    9th Grade WC
    Join Date
    Sep 2000
    i can't give you the exact code but i can give you some pseudo code

    then make a movie clip that has a mask layer, masked layer, and a layer on the bottom
    put the bottom image in the bottom layer
    the top image in the masked layer in the exact same position as the bottom pic
    and then put a square that covers both pics in the mask layer
    make the movie clip 100 frames long
    do a motion tween that has the square start from the top and end up underneath the pics in the last frame

    in the first frame of the main movie
    do _root.loader.gotoAndStop(1);
    then in the second frame put

    set a variable called percentLoaded in the first frame of the movie
    percentLoaded = int(numberOfFramesLoaded/_totalFrames)*100;

    put in frame three gotoAndPlay(2); to loop the preloader
    then in frame four put _root.play();

    it was a bit more than pseudo code wasn't it
    hope it helps

  3. #3
    Junior Member
    Join Date
    Mar 2001


    Kewl, that pseudo code is yust what i needed.. Thanks a lot!!


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