# getURL, Javascript and Functions

**URL:** <https://forum.kirupa.com/t/geturl-javascript-and-functions/204179>\
**Category:** flash\
**Created:** [October 17, 2006, 7:05pm UTC](https://forum.kirupa.com/t/geturl-javascript-and-functions/204179 "2006-10-17T19:05:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)\
**Post date:** [October 17, 2006, 7:05pm UTC](https://forum.kirupa.com/t/geturl-javascript-and-functions/204179/1 "2006-10-17T19:05:33Z")

</div>

Hello all,

is it possible to execute a function with getURL? I haven’t been able to find anything. Basically, I need to call a function in one of the SWFs on the landing page. Seems tricky, but looking around it seems like using the Flash Javascript Intergration Kit this might work.

Problem is I know next to nothing about JavaScript. So before I try and figure this out, I want to make sure it works.

So, I have an MC on a page with something like this:  
[AS]  
buttonMC.onPress = function(){  
getURL(“javascript:goto\_a\_URL\_and\_call\_myASfunction();”);  
}[/AS]

There would be a Javascript in the HTML that was something like:

```auto

<script type="text/javascript">
[FONT=Arial, Helvetica][SIZE=2] window.location=" **http://www.mydomain.com/**";[/SIZE][/FONT]
myASfunction();
</script>

```

(yes, I’m making that code up, please hep me here).

So when I click the MC it takes me to [www.mydomain.com](http://www.mydomain.com) and calls myASfunction found in the SWF on that page.

am I on the right track here?
