# Actionscript 3.0 click event listeners

**URL:** <https://forum.kirupa.com/t/actionscript-3-0-click-event-listeners/294604>\
**Category:** Uncategorized\
**Created:** [August 17, 2009, 2:18pm UTC](https://forum.kirupa.com/t/actionscript-3-0-click-event-listeners/294604 "2009-08-17T14:18:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asest](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@asest](https://forum.kirupa.com/u/asest)\
**Post date:** [August 17, 2009, 2:18pm UTC](https://forum.kirupa.com/t/actionscript-3-0-click-event-listeners/294604/1 "2009-08-17T14:18:14Z")

</div>

[SIZE=3]Hi people.[/SIZE]  
[SIZE=3]I am stuck. Any help would be most appreciated.[/SIZE]  
[SIZE=3][/SIZE]  
[SIZE=3]I need to change the following opensourced ActionScript3.0:[/SIZE]

[SIZE=1]import gs.\*;[/SIZE]  
[SIZE=1]TweenMax.to(this, 0.5, {alpha: 0.4});[/SIZE]  
[SIZE=1]this.addEventListener(MouseEvent.MOUSE\_OVER, mouseOverHandler);  
this.addEventListener(MouseEvent.MOUSE\_OUT, mouseOutHandler);  
[COLOR=red]this.addEventListener(MouseEvent.CLICK, click);[/COLOR][/SIZE]  
[SIZE=1][COLOR=red]function click(event:MouseEvent):void  
{  
var [/COLOR][/SIZE][[SIZE=1][COLOR=red]URL:URLRequest[/COLOR][/SIZE][SIZE=1][COLOR=red] = new URLRequest([/COLOR][/SIZE][URL=“http://www.iss-web.co.uk”][SIZE=1][COLOR=red]http://www.iss-web.co.uk[/COLOR][/SIZE]](http://www.kirupa.com/forum/URLRequest)[SIZE=1][COLOR=red]);  
navigateToURL(URL);  
}  
[/COLOR]  
function mouseOverHandler(e:Event):void {  
TweenMax.to(this, 0.5, {alpha: 1});  
}[/SIZE]  
[SIZE=1]function mouseOutHandler(e:Event):void {  
TweenMax.to(this, 0.5, {alpha: 0.4});  
}[/SIZE]  
[SIZE=1][/SIZE]  
[SIZE=3]Specifically I need to change the click event listener to ‘gotoAndPlay’ from the timeline in my flash file, rather than have it as a link to a URL.[/SIZE]  
[SIZE=3][/SIZE]  
I have tried several ways around this and had my actionscript in place without any compile errors; however the click event did not function as instructed.  
Does anyone have a quick solution to this?

Many thanks in anticipation,

Aaron
