# Toolkit for CreateJS Buttons

**URL:** <https://forum.kirupa.com/t/toolkit-for-createjs-buttons/579514>\
**Category:** flash\
**Created:** [March 14, 2015, 9:24pm UTC](https://forum.kirupa.com/t/toolkit-for-createjs-buttons/579514 "2015-03-14T21:24:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmsgrdnr](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jmsgrdnr](https://forum.kirupa.com/u/jmsgrdnr)\
**Post date:** [March 14, 2015, 9:24pm UTC](https://forum.kirupa.com/t/toolkit-for-createjs-buttons/579514/1 "2015-03-14T21:24:04Z")

</div>

Hello all,  
I am currently working on a website that has a flash animation that includes a button. The button directs the user who clicks the button to a new web page. I am able to get the button to work within the .swf using

button\_1.addEventListener(MouseEvent.CLICK, fl\_ClickToGoToWebPage\_4);

function fl\_ClickToGoToWebPage\_4(event:MouseEvent):void  
{  
navigateToURL(new URLRequest(“[http://www.cnn.com](http://www.cnn.com)”), “\_blank”);  
}

The problem comes when I export the file out as an .html document using Toolkit for CreateJS… The button does not work. It is my understanding that if I included Javascript within the AS3 panel then it would work.

Does anyone know the Javascript equivalent to the above AS3?

Any help would be great!

Thanks,

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [March 15, 2015, 12:05pm UTC](https://forum.kirupa.com/t/toolkit-for-createjs-buttons/579514/2 "2015-03-15T12:05:08Z")

</div>

it should look something like:

```auto
button_1.onClick = function() {
   document.location = "http://www.cnn.com";
}

```
