javascriptin'

Out of context: Reply #4

  • Started
  • Last post
  • 11 Responses
  • Cenitgrade0

    Bang bang bang bang... thats my head off the wall...
    I can't get this to work. Here's what I have:

    in the html doc in the head section, movie ID is java:

    <script type="text/javascript">
    function hideRedBox() {
    thisMovie("java").hideRedBox(nul...
    }
    function thisMovie(movieName) {
    if (navigator.appName.indexOf("Micr... != -1) {
    return window[movieName]
    } else {
    return document[movieName]
    }
    }
    </script>
    -------
    Here the button that executes the javascript:

    <a href="#" title="Hide The Box" onclick="hideRedBox();">
    Push here to hide Red Box
    </a>
    -------

    And in the flash file this AS2.0:

    import flash.external.*;
    ExternalInterface.addCallback("h...
    function hideRedBox() {
    my_redBox._alpha = 0;
    }

    agghhhh why won't it work?
    if I simply call the function in flash using
    hideRedBox()
    the box disappears

    but when I click the button in the html it doesn't.

View thread