4 Replies Latest reply on May 28, 2008 6:29 AM by cbhgraphics

    Dynamically call movie clips

      I am creating an animation that has a rotating globe that then fades out and that is attached dynamically. I created 3 movie clips that I need to bring in while the globe animation is going and before it fades out. I need the movie clips to come in AFTER the globe has started spinning, and then one at a time play. Then once the last logo has come in, the globe should fade out. I need to do this all dynamically in AS. I have the globe animation but it fades out automatically not when the logos are done, and I figured out how to bring in the movie clips but not at the right time. I'm very new to Flash and AS and I just can't figure out how to do it. Can anyone point me in the right direction?

      The script for the globe is as follows:
        • 1. Re: Dynamically call movie clips
          Ned Murphy Adobe Community Professional & MVP
          Can you explain what is going on in the earthRotate function as far as what the slice#'s are and what they are doing?

          What triggers fadeEarth Tween to occur?

          Is there any way you can maintain the earth rotation without triggering the tween, such as having the earthRotate function work in a continuous loop? Then you may be able to set a timer that triggers the fadeEarth tween when the last logo appears, giving the whole scene a few seconds of visibility before the earth fades out (?).
          • 2. Re: Dynamically call movie clips
            cbhgraphics Level 1
            As far as the rotating Earth, what's happening is there is a flat image of the earth scrolling across under a mask that creates a circular shape.
            Right now what triggers the fadeEarth tween to occur is nothing. I have it set to just run and I increased the time to make it happen later and later. The earthRotate is running on a continuous loop right now. I want to do exactly what you said...make a timer to trigger the tween when the last logo comes in. I also want to set timers to make the logos appear later in the animation rather then right at the beginning. But I don't know how to make these timers.
            • 3. Dynamically call movie clips
              Ned Murphy Adobe Community Professional & MVP
              If there is a loop function somewhere for the motion, then you could probably delay the logos loading by setting a counter that triggers their loading when it reaches x number of rotations, say counter = 1, load first logo, counter = 2, load second logo, etc... counter = 4, fade the earth.

              By the code you show above, the logos would be appearing instantly, so what you could do is have them added thru a function instead. That function gets called based on the counter value in the earth looping code.

              If the file is reasonably small, I'd be willing to give it a looking over to see if I can offer some suggestions specific to what you already have.
              • 4. Re: Dynamically call movie clips
                cbhgraphics Level 1
                I was able to figure out a way to do what I want, but I'm not sure it was the best way. What I did was create movie clips with the fade in animation for each logo. I then set intervals for each one to enter and changed the seconds to come in when I wanted. Is that the long way, or is your way a better practice? How would I enter the counter for the rotations?
                I appreciate your help so far!!