# Using ActionScript to call JS

**URL:** <https://forum.kirupa.com/t/using-actionscript-to-call-js/170703>\
**Category:** flash\
**Created:** [November 28, 2005, 11:48pm UTC](https://forum.kirupa.com/t/using-actionscript-to-call-js/170703 "2005-11-28T23:48:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hechtic](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@hechtic](https://forum.kirupa.com/u/hechtic)\
**Post date:** [November 28, 2005, 11:48pm UTC](https://forum.kirupa.com/t/using-actionscript-to-call-js/170703/1 "2005-11-28T23:48:29Z")

</div>

I’m trying to replace a static jpeg banner on my site with a dynamic flash banner. I’m running into problem getting the link, which is a JS call, to work inside the flash movie.

The JS code is called to the page with external link, something like this:

```auto
<script type="text/javascript" src="../js/link.js">

```

then the link around the current banner is something like this:

```auto
<a href="#" onClick="return EPCM.doNavigate('long.url');">jpeg banner</a>

```

So is it possible to write an ActionScript code that will replace the href above? If so, can you please give me an idea of what it will look like.

thanks,

Andrew
