www.webdeveloper.com
Results 1 to 3 of 3

Thread: Js and Flash

  1. #1
    Join Date
    Feb 2006
    Location
    Ft Lauderdale
    Posts
    299

    Js and Flash

    I have been trying to get my Java Script talk to my Flash file and i am not sure what the problem is.


    Code:
    <script language="javascript" type="text/javascript">
                        
                   function callFlash(){
                        if (navigator.appName.indexOf("Microsoft") != -1) {
                             window["FlashVars"].test();
                        }else{ 
                              document["FlashVars"].test();
                        }
                 }
    
                 callFlash();
    </script>

    In Flash

    Code:
    function test(){
    	getURL("http://www.yahoo.com")
    }

  2. #2
    Join Date
    Aug 2008
    Location
    Olean, NY
    Posts
    40
    You should look into one of the excellent flash communication libraries provided by JS toolkits like MooTools or Dojo. There are many thorny issues associated with talking to Flash, why not learn from the experience of others who have done it before you?

  3. #3
    Join Date
    Aug 2007
    Posts
    3,767
    And by the look of it, you are trying to access an element directly by its id, don't do that. Use document.getElementById, and take David's advice.
    Great wit and madness are near allied, and fine a line their bounds divide.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles