AS2 External Interface

1 3 20th 2010 § 1 comment

I have another post for AS3 External Interface [ here ]… but AS2 is the hot shit right now so…
I have a blank “tracking button” on the stage (no I’m not building this out) and on roll over it vanishes. Turning of visibility was enough, but… just in case I knock it down 1000 pixels , well off the stage area.

import flash.external.ExternalInterface;

tracking_btn.onRollOver = function ():Void
{
 trace( "!" );

 tracking_btn._visible = false;
 tracking_btn._y = 1000;

 var clickTag:String = "A";
 var result:Object = ExternalInterface.call ("sendInfo", clickTag );
 trace( result );

};

So this code calls “sendInfo( var )” and replaces “var” with the clickTag. In this case “A”.

// set up functions for each tracking event
sendInfo = function( var )
{
	alert( "TEST: " + var );	

	switch( var )
	{
		// -- TRACKING
		case( 'A' ): // Box A
			www = 'LINK TO TRACKING SITE (A) GOES HERE';
			break;
	}

	//send data
	window.open = ( "http://" + www );
	alert( " " + www );
}

Tagged ,

§ One Response to AS2 External Interface

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 AS2 External Interface at DrPunchBlog.

meta

  •  

    January 2010
    M T W T F S S
    « Dec   Feb »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  • Archives

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

    • ‘Up In The Air’ Producer Launches The Allegiance Shingle With IM Global-Funded ‘Money Monster’
      EXCLUSIVE: Daniel Dubiecki has launched The Allegiance Theater, a association designed to emanate a breakwater where talent and financiers can induce film and TV projects. The association gets off a belligerent with a privately-backed beyond and growth account to beget character-driven, commercially appealing stories, pronounced Dubiecki. As Jason Reitman’s […]
    • New Oils
      James and Esao both published oil paintings to their blogs recently, James’s work on tip is titled, “Pauline Prieto“, and Esao’s investigate underneath it is substantially eleven or thirteen years aged now from art propagandize and he writes about because it is called “Grumpy Study”. Article source: http://meathaus.com/2012/02/06/new-oils/ […]
    • Video Game Character Facebook Profiles
      This is a array of cinema from a Facebook profiles of video diversion characters. Obviously they’re fake, that we wish we would’ve famous before spending a half hour perplexing to find and crony Nathan Drake and Solid Snake. OMG, how cold would it be to know those dual guys in genuine life? “Wow,GW — man-crush […]
  • Translator