Page is a not externally linkable
- Code, Content, and Presentation
-- Flash and Shockwave
---- Actionscript 3 error "1120: Access of undefined property replay"


kidd6441 - 8:16 pm on Jun 9, 2009 (gmt 0)


VERY new to Flash.

I wanted to insert a simple replay button at the end of a flash animation. The button name and instance name is "replay", and this is the AS3 code I'm using:

stop();

replay.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void
{
gotoAndPlay(1);
}

When I try to test it I get this error:

1120: Access of undefined property replay.

What am I doing wrong? Thanks.


Thread source:: http://www.webmasterworld.com/flash/3929869.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com