Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 15th, 2007, 03:03 PM
Authorized User
 
Join Date: Aug 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Flash - fade in then stay

Im creating a bit of flash which fades in tag words onto the screen one at a time. Is there some actionscript i can add which will tell the transition effect, that once it has faded in the word to keep the word displayed rather than disappearing once the effect has lasted its duration. I am familiar with stop(); but this is not what im after as it would prevent future fades from working.

Your help would be greatly recieved as i am new to flash and am finding it rather difficult!

Cheers, Will

 
Old August 15th, 2007, 03:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you could look into the setInterval function and clearinterval function. This calls a function after a set amount of time then you clear it to stop.
 
Old August 16th, 2007, 02:57 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

fading in is very similar to a fade out, just a little more difficult to comprehend. By your description it sounds like you know how to fade out, but just to recap.

To fade OUT, you create your text, then one by one you fade each word. If the word (or whatever element you are fading out) is not a symbol you will need to convert it to a symbol. Set two key frames, one where you want it to begin to fade out and the other where the fade should end. Select the ending key frame, change the alpha value to 0%. Finally select a frame in between and create a motion tween. The word will fade out. When the playhead reaches the first key frame your word begins to disappear until it reaches 0% alpha at the final keyframe. Pretty obvious.

To fade IN, is simply the reverse process. Create your text, and convert each element that will fade as a unit into a symbol. You will also create two key frames. The first key frame is where it beggins to fade in and the second is where it has fully appeared. But this time select the FIRST of the two key frames, and set it's alpha value to 0%. Select a frame in between and create a motion tween. NOW when the playhead first reaches the word it's alpha value is at 0% and it gradually becomes visible. It will remain so unless you later add a fade out.


-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
fade in not working in FF but does in IE crmpicco Javascript How-To 1 November 8th, 2005 12:49 PM
fade in/fade out on a div with JavaScript crmpicco Javascript How-To 1 September 23rd, 2005 04:27 AM
javascript image fade in fade out crmpicco Javascript How-To 0 September 12th, 2005 11:02 AM
stay on the new record - don't roll to next Sjackson Access 2 May 25th, 2005 09:25 AM
ASP.NET 1.0 fade out ccnoaccnoa BOOK: Beginning ASP.NET 1.0 1 October 17th, 2003 02:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.