External Interface of the devil

7 3 29th 2009 § 1 comment

I’m not a fan of ExternalInterface, but it is good to have in your pocket.
I have another post for AS2 External Interface [ here ]…

<script language="JavaScript">
	var jsReady = true;

	function thisMovie(movieName) {
		 if (navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName];
		} else {
			return document[movieName];
		}
	}

	//-- is EXT INT ready?
	function EXactive()
	{
		return jsReady;
	}
	//-- fetch id
	function GetID()
	{
		return thisMovie("ExternalInterfaceExample");
	}
</script>


I will clean this up and re-post

// check for value from JS
function GetID():String
{
	var id:String;
	if( ExternalInterface.call("EXactive") )
	{
		id = ExternalInterface.call("GetID");
	} else {
		id = "GetID not found";
	}
	id += String( " " + ExternalInterface.call("EXactive") );
	return id;
}

Tagged

§ One Response to External Interface of the devil

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

What's this?

You are currently reading External Interface of the devil at DrPunchBlog.

meta

  •  

    July 2009
    M T W T F S S
    « Apr   Aug »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Archives

  • The Uber-Mannerist ...
    By Van Arno
  • RSS mtr.me

  • Translator