0
votes

[[I'm quite new to Flash]]

I'm working with a Flash (CS5) presentation, so I have a "Next Slide" button on my app. Sometimes, I want to be able to fade in certain elements when I hit "Next Slide".

My current way of doing this:

  1. Create a MovieClip from a Rectangle with an opacity tween from 100 to 0 (with ActionScript to stop() at first frame).
  2. Copy and paste the MovieClip over the place where I want it to fade in, and give the instances a unique name.
  3. Add actionscript to the relevant keyframe of the slide with just rectangle1.play()

This works fine when running. The only disadvantage is that once I have one of these rectangle MovieClips on my page, I can't see what's behind it, making it annoying to design the presentation.

Is there a better way I could be doing this?

1
Is this "Rectangle MC" you're adding nested inside another MC, or just on a layer in the root timeline?redhotvengeance

1 Answers

1
votes

I would suggest looking into tweens. Here is a tutorial that might be helpful. It shows an example of using an alpha tweener with the following code:

import fl.transitions.Tween;
import fl.transitions.easing.*;
var myTweenAlpha:Tween = new Tween(rectangle, "alpha", Strong.easeOut, 0, 1, 3, true);

Tweens are pretty straight forward and an easy way to do animation. You could apply the tween directly to whatever you want to fade in and start with it at 0 and go to 100. If you have a bunch of things to fade in, put them all into one single movieclip and apply a single tween to that movieclip.

I think the idea you are using is having a movie clip at 100% on top and fading it out to 0% to show what is behind it. If you want to do this but don't like having it on the screen in the visual editor part, just create the rectangle in actionscript. By making it in actionscript, it won't be visible until you run the program so you can still see everything behind it in the visual editor part. If you need help with this ask and I can show you some simple code to do this.

Hopefully this helps.