Fade in and fade out
You can achieve a fade in and fade out effect using the _alpha property of movie clips. We can create ActionScript that fades objects automatically or acts in response to an event like a button click. To create the effect, we'll need to know how the fade should occur as well as which direction the fade will occur - fade in or fade out.
Open the starter file fader.fla. You can see the ball instance on the Stage. We’ll fade this in and out.
Select the instance and open the Actions panel with the F9 shortcut key. Add the following code.
onClipEvent(load) {
var alphaDirection = "out";
var changeRate = 5;
}
Hello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business