Git Repository Public Repository

CPE_learningsite

URLs

Copy to Clipboard

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package models
{
	import flash.external.ExternalInterface;
	
	public class ExternalInterfaceUtil
	{
		public static function addExternalEventListener( qualifiedEventName:String, callback:Function,callBackAlias:String ):void
		{
			// 1. Expose the callback function via the callBackAlias
			ExternalInterface.addCallback( callBackAlias, callback );
			// 2. Build javascript to execute
			var     jsExecuteCallBack:String = "document.getElementsByName('"+ExternalInterface.objectID+"')[0]."+callBackAlias+"()";
			var jsBindEvent:String = "function(){"+qualifiedEventName+"= function(){"+jsExecuteCallBack+"};}";
			// 3. Execute the composed javascript to perform the binding of the external event to the specified callBack function
			ExternalInterface.call( jsBindEvent );
		}
	}
}

Commits for CPE_learningsiteCPEFlex/EngagementPod/src/models/ExternalInterfaceUtil.as

Diff revisions: vs.
Revision Author Commited Message
4cd176 ... v.shishlov Fri 27 Aug, 2021 14:33:17 +0000

initial commit