4 Replies Latest reply on Jan 12, 2009 9:25 PM by Newsgroup_User

    animated rollover

    Level 7
      What's the best way to achieve the following:
      I'd like the user to move the cursor over part of the screen, then a
      small animation pops up (not the same size as the 'hot' area). Then when
      you move your cursor off the hot area, and the animation fades out. And
      I'd like it to fade out from the point it's at in the animation.

      Hope that makes sense.


      And happy new year to all.

        • 1. Re: animated rollover
          James Newton, ACP Level 3
          Here's how to swap the member of a sprite for an animated member: Rollover. Here's how to make the animation fade: Fade. Here's how to swap the member of one sprite when you the mouse over another: Swap Sprite.

          Does this help?
          • 2. Re: animated rollover
            Level 7
            Thanks for the reply and samples.

            I actually thought of using a film loop and exchanging cast members like:

            What I was thinking (comparing to the above example), is you move the cursor over
            the black, and then the 'wipe right' appears and then starts animating. I guess the
            film loop could be made to include the black (larger background).

            I didn't know you could fade a film loop. I've tried changing the Blend in the
            Property Inspector. It doesn't work can you explain how your film loop fade works?
            I'm not very Lingo savvy. I don't know what 'the actorList' is that you used.
            What's the difference between 'blend' and 'blendLevel'?

            On your last example, swapping one sprite when you rollover another, from what I
            understand, you're switching the cast member associated with the sprite right? The
            problems I've seen when trying to switch say an invisible shape member with a film
            loop is
            - sometimes you don't get alignment right
            - sometimes the film loop stretches so does not maintain its correct proportions.

            Anyway, with your demos, I think I can get the rollover animation happening. Could
            probably make the fade happen on a rollover off, but still not all the way yet.
            What I want to happen is
            - you rollover, and the film loop animation starts I can do this.
            - you move off and it starts fading out. Guess I could have a static version behind
            the film loop and make it fade out to that.
            - Once it's fully faded out, it switches to the static version. This is needed so
            you don't have a looping faded out animation happening.

            Maybe, the best way would be to somehow have the film loop on screen but paused on
            the first frame. First frame would not show animated part. Then when you rollover
            it, it unpauses, animation appears and starts playing. When you move off, the film
            loop fades out. Then I guess I'd need a static version of the graphic behind so it
            fades to the right background. Once it is faded out, pauses. Once you rollover the
            film loop a second time, it jumps to frame 1, resets (not faded out) and starts
            playing again.

            Is it possible to pause and play and jump to a frame in a film loop? If so, how?

            Sorry my reply was long. Was thinking and testing your files while writing. Thanks
            again for your help.

            • 3. Re: animated rollover
              James Newton, ACP Level 3
              1. You can't fade a film loop directly. You need to set the blend or blendLevel of the sprites within the film loop.
              2. BlendLevel gives you 255 steps. Blend uses only 100 of the 255 steps, so it makes you feel that it works in 100 steps, but they are of unequal sizes. I recommend that you always use blendLevel.
              3. Look up the actorList in the on-line documentation.
              4. The registration point of a shape sprite is at its top left. The registration point of a film loop is at its centre. This would explain your alignment issues. You could make your shape sprite 1x1 pixel.
              5. You can't pause a film loop at the beginning. It will always play all the way through at least once. That's why you need to swap out a static bitmap member.
              6. If you want more control, you should look at using an externally-linked #movie member (Linked Director Movie or LDM) rather than a film loop.
              • 4. Re: animated rollover
                Level 7

                That 'actorlist' link was very confusing. Sounded like it was written for people who
                are already quite advanced in programming. It was very technical and hard to

                With your fade demo, would it be possible to do something when the fade has
                completed? So, you move the cursor off the area, it fades out, once done, switches
                to a static sprite. Maybe I'll try that.

                Are LDMs used much for thinsg liek this - aimated buttons and other interface