Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Image Fade in and out on Rollover



12:29 pm on Jul 19, 2008 (gmt 0)

5+ Year Member

Hi guys.

Been trying to find a tutorial on something like this but no luck.

I want to basically learn how to have a movie play on rollover, then on rollout have it reversed. i.e. Rollover an image and it fades out, then rollout and it fades back in.

Many thanks...


1:41 pm on Jul 19, 2008 (gmt 0)

5+ Year Member

Hmmm I found a tutorial and I've worked the code so far to do this...

text1.addEventListener(MouseEvent.ROLL_OVER, text1Over);
text1.addEventListener(MouseEvent.ROLL_OUT, text1Out);

function text1Over(event:MouseEvent):void{
function text1Out(event:MouseEvent):void{

However when I check the syntax, I get....

Scene=Scene 1, Layer=action, Frame=1: Line 4: '{' expected
function text1Over(event:MouseEvent):void{

Scene=Scene 1, Layer=action, Frame=1: Line 6: Unexpected '}' encountered

Any ideas?

[edited by: Rynman47 at 1:47 pm (utc) on July 19, 2008]


6:05 pm on Jul 19, 2008 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Syntax looks right, are your publish setting for this document set to AS 3.0?

Featured Threads

Hot Threads This Week

Hot Threads This Month