homepage Welcome to WebmasterWorld Guest from 54.242.85.89
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
Image Fade in and out on Rollover
Rynman47




msg:3702424
 12:29 pm on Jul 19, 2008 (gmt 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...

 

Rynman47




msg:3702443
 1:41 pm on Jul 19, 2008 (gmt 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]

rocknbil




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved