show/hide css divs with flash actionscripting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • techtherapy
    New Member
    • Jan 2008
    • 13

    show/hide css divs with flash actionscripting

    Hello All!

    This ones a little different as I'm using flash actionscripting to control some javascript swaping.

    The following page uses a hideDiv, ShowDiv Javascript and the following actionscript that is working flawlessly in Firefox/PC, Firefox/Mac, Safari/PC, and Safari/Mac but not ie6 or 7. They both have the same issue. They will hide/show divs once but afterwards all divs are set to hide.

    Heres an example of the actionscript:
    Code:
    onClipEvent (load) {
    	this.onRollOver = function() {
    		this.gotoAndPlay("over");
    	};
    	this.onRollOut = function() {
    		this.gotoAndPlay("out");
    	};
    	this.onRelease = function() {
    getURL("javascript:showdiv('swap')");
    getURL("javascript:hideDiv('bob');hideDiv('steve');hideDiv('john');hideDiv('tim')");
    };
    }

    Heres the related embeded js:

    Code:
    <script language=javascript type='text/javascript'> 
    function hideDiv(id)
    {
       document.getElementById(id).style.display = 'none';
    }
    function showdiv(id)
    {
       document.getElementById(id).style.display = 'block';
    }
    </script>
    Please view the page below and hopefully it will clarify what I mean:




    Although I originally thought the issue lied with the javascript, I've tried multiple scripts and keep getting the same result.

    Any thoughts would be excellent and much appreciated!

    Thanks!
Working...