# Call ExternalInterface and the html script

**URL:** https://forum.kirupa.com/t/call-externalinterface-and-the-html-script/204032
**Category:** Uncategorized
**Created:** [October 16, 2006, 4:42pm UTC](https://forum.kirupa.com/t/call-externalinterface-and-the-html-script/204032 "2006-10-16T16:42:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![listarella](https://avatars.discourse-cdn.com/v4/letter/l/6de8d8/32.png) [@listarella](https://forum.kirupa.com/u/listarella)
#### Post date: [October 16, 2006, 4:42pm UTC](https://forum.kirupa.com/t/call-externalinterface-and-the-html-script/204032/1 "2006-10-16T16:42:11Z")

</div>

Hì everybody,  
I’m tring to build a page in html that consists of 4 differents swf file (embed in the page).  
In those swf file I have some buttons that are calling - with the call ExternalInterface- some javascripts functions written in the html. Those javascript functions are ancors that should bring you to a point of the page - let’s say it moves the page up or down to a specific point.

My action scripts is:

```
Code:
[LEFT]import flash.external.ExternalInterface;

```

contact.onRelease=function(){  
ExternalInterface.call(“contact”);  
}  
about.onRelease=function(){  
ExternalInterface.call(“about”);  
}  
news.onRelease=function(){  
ExternalInterface.call(“news”);  
}  
collections.onRelease=function(){  
ExternalInterface.call(“collections”);  
}  
extra.onRelease=function(){  
ExternalInterface.call(“extra”);  
}[/LEFT]

in the HTML page I have:

```
Code:
[LEFT]&lt;script language="JavaScript"&gt;
function contact (){
document.write("&lt;a href="#contact"&gt;&lt;/a&gt;")
}
function about (){
document.write("&lt;a href="#about"&gt;&lt;/a&gt;")
}
function news (){
document.write("&lt;a href="#news"&gt;&lt;/a&gt;")
}
function collections (){
document.write("&lt;a href = "#collections"&gt;&lt;/a&gt;")
}

```

\</script\>[/LEFT]

and at the right point of the HTML page (corrisponding with the top of each swf file) I have

\<a name=“contact”\>\</a\>  
…  
\<a name=“about”\>\</a\>  
…  
\<a name=“news”\>\</a\>  
…  
\<a name=“collections”\>\</a\>  
…

This doesn’t work, sure because I know quite nothing about javascript… there is anybody that could suggest me somenthing or give me a link to an tutorial or a similar example please?

thanks
