# Who can help me with javascript in my flash button?

**URL:** <https://forum.kirupa.com/t/who-can-help-me-with-javascript-in-my-flash-button/286924>\
**Category:** Uncategorized\
**Created:** [April 23, 2009, 12:45am UTC](https://forum.kirupa.com/t/who-can-help-me-with-javascript-in-my-flash-button/286924 "2009-04-23T00:45:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoprods](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@leoprods](https://forum.kirupa.com/u/leoprods)\
**Post date:** [April 23, 2009, 12:45am UTC](https://forum.kirupa.com/t/who-can-help-me-with-javascript-in-my-flash-button/286924/1 "2009-04-23T00:45:29Z")

</div>

Hi,  
I have a button that I can embed in html code and it opens a chat software. It works great. Now unfortunately I need to make pop up that same window from my actionscript 3 button …

Here is my html code:  
\<!-- Begin Volusion Live Chat --\>  
\<div align=“center” id=“VolusionLiveChat”\>\<a href=“[http://www.volusion.com/livechat\_software.asp](http://www.volusion.com/livechat_software.asp)”\>Free Live Chat Software\</a\>\</div\>  
\<script defer type=“text/javascript” src=“[https://livechat.volusion.com/script.aspx?id=223591](https://livechat.volusion.com/script.aspx?id=223591)”\>\</script\>  
\<!-- End Volusion Live Chat --\>

This works great.

Now here is my flash code. As you will see I don’t know where to insert the defer type src that loads the soft in the pop up …

If anybody can help I am forever grateful… !!! As I am sweating and do not have the programming skills to make it work:

function jspopupWindow(event:MouseEvent):void {

```
var desiredURL:URLRequest = new URLRequest("javascript:NewWindow=window.open('http://www.volusion.com/livechat_software.asp','newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=Yes,fullscreen=No'); NewWindow.focus(); void(0); src='https://livechat.volusion.com/script.aspx?id=223591',");

navigateToURL(desiredURL, "_self");

```

}  
chat\_btn.addEventListener(MouseEvent.CLICK, jspopupWindow);

The pop up window works of course but the script does not load into it. Please help !!  
Here is the file where my flash button is :

[http://www.eucalifornia.com/flashCar1/inventory/car1/indexChat.html](http://www.eucalifornia.com/flashCar1/inventory/car1/indexChat.html)

in case you want to see it…

Thank you.
