Welcome to WebmasterWorld Guest from 54.162.168.187

Forum Moderators: open

Message Too Old, No Replies

Image Fade in and out on Rollover

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

New User

5+ Year Member

joined:May 4, 2008
posts: 13
votes: 0


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 July 19, 2008 (gmt 0)

New User

5+ Year Member

joined:May 4, 2008
posts: 13
votes: 0


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{
text1.gotoAndPlay("over");
}
function text1Out(event:MouseEvent):void{
text1.gotoAndPlay("out");
}

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 July 19, 2008 (gmt 0)

Senior Member

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

joined:Nov 28, 2004
posts:7999
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members