I am trying to make text in my project fade in/out when a test button is pressed. I have gotten as far as writing the basics (I think so at least), however every time I try I click the test button, I get the following error message:
Error Message:
TypeError: Error #1034: Type Coercion failed: cannot convert fl.text::TLFTextField@2de22479 to flash.display.MovieClip. at Products_fla::Products_1/fader()
The code for the button is as follows:
Code:
test.addEventListener(MouseEvent.CLICK, fader);
//Function: fade text
function fader(apple) :void{
clear();
TransitionManager.start(Text.Rubens, {type:Fade, direction:Transition.IN, duration:9,easing:Strong.easeOut});
}
I've been searching for hours now, but I only found that code from a copy/paste from the Adobe website: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/transitions/Fade.html
P.S. This is my first time using stackoverflow (as I'm a newbie :) and any help will be greatly appreciated.