# Can I interact with JavaScript using ActionScript?

**URL:** <https://forum.kirupa.com/t/can-i-interact-with-javascript-using-actionscript/5086>\
**Category:** flash\
**Created:** [August 30, 2002, 11:54pm UTC](https://forum.kirupa.com/t/can-i-interact-with-javascript-using-actionscript/5086 "2002-08-30T23:54:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeltaJosh](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@DeltaJosh](https://forum.kirupa.com/u/DeltaJosh)\
**Post date:** [August 30, 2002, 11:54pm UTC](https://forum.kirupa.com/t/can-i-interact-with-javascript-using-actionscript/5086/1 "2002-08-30T23:54:30Z")

</div>

I have a splash page designed with Flash MX as an entrance to a website. It is displayed like any other normal HTML page in the browser. What I’d like to do is display the following page as a popup window with no scrollbars, no titlebar, and no menubar.  
Ordinarily, I’d use a JavaScript function that manipulates the browser specific object, Window, to do this.

My question is:  
Can I still create a JavaScript function to do this, then call that function from within my Flash movie using ActionScript?

If not, how else can I handle it?

Thank you for your time,  
Josh

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2002, 1:05pm UTC](https://forum.kirupa.com/t/can-i-interact-with-javascript-using-actionscript/5086/2 "2002-08-31T13:05:48Z")

</div>

If JavaScript can do it you can have this function called from Flash:

## One way to do it:

Basically you create a url containing the javascript reference. Say a button initiates this action. Add in the button object actions window:

//code start  
on(release)  
{  
url = “javascript:…etc”;//use the same syntax as in HTML’s HREF  
getURL(url);//call the JScript function and your done  
}  
// code end

The JavaScript must be on the same page as your Flash movie

## Another way to do it (not preferred):

Use : fscommand(command, arguments)  
command , argument are both strings send to the browser containing the flash movie.

Best regards

Pierre

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2002, 7:24pm UTC](https://forum.kirupa.com/t/can-i-interact-with-javascript-using-actionscript/5086/3 "2002-08-31T19:24:04Z")

</div>

[http://www.kirupa.com/developer/flash5/borderless.asp](http://www.kirupa.com/developer/flash5/borderless.asp)
