A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Internet Explorer Issue

  1. #1
    Junior Member
    Join Date
    Feb 2009
    Posts
    5

    Internet Explorer Issue

    Hi,

    I have an embedded flash movie that runs an AS function that runs a javascript function on the html page when you push a button. However, it only works in Firefox, Safari and Chrome. Is there a workaround for IE 6 & 7?

    My javascript is:
    Code:
    <script>
            navArray = new Array();
    
            navArray["home"] = "../index.aspx";
            navArray["about"] = "../about.aspx";
            navArray["contact"] = "../contact.aspx";
            navArray["portfolio"] = "../portfolio.aspx";
            navArray["services"] = "../services.aspx";
            navArray["photogallery"] = "../photogallery.aspx";
            
            function navigate(which) {
    
                if (window.opener) {
    
                    if (which == "contact" || which == "services")
                    {
    	                window.open (navArray[which], 'newWin')
                    }
                    else if (which == "photogallery" || which == "portfolio")
                    {
    	                window.location = (navArray[which]);
                    }
                    else 
                    {
    	                window.opener.location = navArray[which];
    	                opener.window.focus();
                    }
            	
                }
                else 
                {
                    window.location = (navArray[which]);
                }	
    
            }
    
            function openerlink(url) 
            { 
                opener.location.href = urlbase + url; 
            }
    </script>
    My actionscript is:
    Code:
    import flash.external.ExternalInterface;
    function homeLink(e:MouseEvent)
    {
    	ExternalInterface.call('navigate', 'home');
    	ExternalInterface.call('window.close()');
    	
    }
    Thanks for your help!

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    You should put some debugging checks in. For instance, determine if ExternalInterface.available is returning true for IE. Put an alert in your javascript function so you can tell if it's called at all.

    I suspect it may have to do with the embed/object tags and getting allowScriptAccess on the object tag as well as the embed.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center