1 Reply Latest reply on Jun 19, 2008 4:40 PM by Newsgroup_User

    Perplexed

      I know this is one of the easiest things to do in flash, but for some reason I can't see the forest for the trees on this one I guess.... I'm trying to hide a div in a page via a call to javascript from flash... e.g.;

      Javascript in page:
      function hideDiv() {
      document.getElementById('flash_container').style.display = 'none';
      }


      AS on button in flash:
      on(press) {
      getURL("javascript:hideDiv()");
      }

      I tested the function in the page with a href just to be sure there wasn't any problems with the fact that the div was z-indexed and it works fine.

      What am I overlooking!?!?!

      As always any help would be GREATLY appreciated.

      jH
        • 1. Re: Perplexed
          Level 7
          JHight61 wrote:
          > I know this is one of the easiest things to do in flash, but for some reason I
          > can't see the forest for the trees on this one I guess.... I'm trying to hide a
          > div in a page via a call to javascript from flash... e.g.;
          >
          > Javascript in page:
          > function hideDiv() {
          > document.getElementById('flash_container').style.display = 'none';
          > }
          >
          >
          > AS on button in flash:
          > on(press) {
          > getURL("javascript:hideDiv()");
          > }
          >
          > I tested the function in the page with a href just to be sure there wasn't any
          > problems with the fact that the div was z-indexed and it works fine.
          >
          > What am I overlooking!?!?!
          >
          > As always any help would be GREATLY appreciated.

          Did you test it on line ?
          These kind of functions won't work locally from flash.
          You need to upload your content to server and test in real time.
          That's due to changes in Flash player and browser security.


          --
          Best Regards

          Urami


          --
          "Never play Leap-Frog with a Unicorn."


          <urami>
          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
          </urami>