3 Replies Latest reply on Mar 30, 2009 7:25 AM by Ned Murphy

    Changing pics in movieclips

    thralthamidor Level 1
      Hello, I have set up an animation that displays icons on a grid. Right now everything is working ok. I have an array of 4 movieclips that are randomly selected to display on the screen. Each has a timeline that brings it from alpha 0 - 100. So far, so good.

      Now I have to add the remaining 200 icons. Now of course I could make 200 more movieclips and add them all to the array but there must be a better way, right?

      I thought I could just have just one movieclip and switch the pic out from an external xml list. But if I import them they won't work with the alpha transition because they aren't movieclips, right? Can Actionscript change them to movieclips? I am stuck. Would appreciate any help. Thanks.

      Sample
        • 1. Re: Changing pics in movieclips
          Ned Murphy Adobe Community Professional & MVP
          Read thru the MovieClipLoader class in the help files and the methods that support it for examples. It has the loadClip method and can incorporate event listeners so that you can take action after the image is loaded.

          Combining that with the creatEmptyMovieClip() method and possibly the Tween class will probably get you where you want to be.
          • 2. Re: Changing pics in movieclips
            thralthamidor Level 1
            Thanks, but that is the problem. You can no longer just go read the manual. Adobe in their infinite wisdom has opted not to give us a manual with Flash CS4. You have to go online and if you don't get a bad link you usually get something irrelevant. I searched for MovieCliploader class and got a single result, 'Trace function'. Plus it is only linked to AS3 as far as I can tell. Is there a place where all the action scripts are in one place instead of being given a sparse couple of lines on a 'need to know' basis?

            I am not asking anyone to do this for me. Just need some help getting past a tough spot. Thanks.
            • 3. Re: Changing pics in movieclips
              Ned Murphy Adobe Community Professional & MVP
              Try Googling those things then. I often have more luck and get better information from sources outside of Adobe, thru Google.