# Javascript calls in actionscript

**URL:** <https://forum.kirupa.com/t/javascript-calls-in-actionscript/242631>\
**Category:** Uncategorized\
**Created:** [October 28, 2007, 9:15pm UTC](https://forum.kirupa.com/t/javascript-calls-in-actionscript/242631 "2007-10-28T21:15:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![celticvfx](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@celticvfx](https://forum.kirupa.com/u/celticvfx)\
**Post date:** [October 28, 2007, 9:15pm UTC](https://forum.kirupa.com/t/javascript-calls-in-actionscript/242631/1 "2007-10-28T21:15:36Z")

</div>

Im havinga hard time finding the right approach to call some Javascript functions inside actionscript…I hope to explain this correctly.

I have a index.html that starts the flash pages. I have some basic java functions that turn off print screen and printer functions (to protect my artwork online)

at one point I open a new browser to play a .swf file, which I call directly via getURL (“flash.swf”,"\_blank"). When the new browser is opened, it looses all the prior java functions from the earlier index.html (Im sure its because its a new window).

What I want to do is re-reference those function from the original index.html…and I dont want to create a new index.html for this one .swf in the new browser window.

Can anyone help me with the proper way to reference those functions? or a better strategy?

TIA  
celticvfx
