A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: call ExternalInterface and javascripts

  1. #1
    Join Date
    May 2006

    call ExternalInterface and javascripts

    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:

    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"); }

    in the HTML page I have:

    <script language="JavaScript"> function contact (){ document.write("<a href="#contact"></a>") } function about (){ document.write("<a href="#about"></a>") } function news (){ document.write("<a href="#news"></a>") } function collections (){ document.write("<a href = "#collections"></a>") } </script>
    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?


  2. #2
    Senior Member donaldparkerii's Avatar
    Join Date
    May 2005
    San Diego
    this could be accomplished with the getURL("#about");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center