469,612 Members | 2,222 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

show/hide css divs with flash actionscripting

techtherapy
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:
Expand|Select|Wrap|Line Numbers
  1. onClipEvent (load) {
  2.     this.onRollOver = function() {
  3.         this.gotoAndPlay("over");
  4.     };
  5.     this.onRollOut = function() {
  6.         this.gotoAndPlay("out");
  7.     };
  8.     this.onRelease = function() {
  9. getURL("javascript:showdiv('swap')");
  10. getURL("javascript:hideDiv('bob');hideDiv('steve');hideDiv('john');hideDiv('tim')");
  11. };
  12. }
  13.  

Heres the related embeded js:

Expand|Select|Wrap|Line Numbers
  1. <script language=javascript type='text/javascript'> 
  2. function hideDiv(id)
  3. {
  4.    document.getElementById(id).style.display = 'none';
  5. }
  6. function showdiv(id)
  7. {
  8.    document.getElementById(id).style.display = 'block';
  9. }
  10. </script>
  11.  
Please view the page below and hopefully it will clarify what I mean:

http://nailinc.com/New/web/flash2.html


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!
Jul 30 '08 #1
0 2492

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by jerryyang_la1 | last post: by
5 posts views Thread by dje | last post: by
4 posts views Thread by bridgemanusa | last post: by
5 posts views Thread by ali | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.