Skip to content

Instantly share code, notes, and snippets.

@adamgoucher
Created August 31, 2012 00:20
Show Gist options
  • Save adamgoucher/3546293 to your computer and use it in GitHub Desktop.
Save adamgoucher/3546293 to your computer and use it in GitHub Desktop.
latches in flex
<fx:Script>
import flash.external.*;
public function initApp():void {
// flexpilot
FPBootstrap.flex_pilotLibPath = 'FlexPilot.swf';
FPBootstrap.init(stage);
// latch stuff
var latches:Object = new Object();
ExternalInterface.addCallback("WebDriverLatch", getLatchStatus);
}
// what's called via the external interface
public function getLatchStatus(s:String):String {
return latches[s];
}
public function setLatchStatus(l:String, v:String):void {
latches[l] = v;
}
</fx:Script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment