(views: 12826)ActionScriptBridge is a project that aims to fill the gap between AS2 and AS3. It gives the possibility for two Flash movies, one created using AS2 and the other using AS3, to communicate with one another (at least regarding function calls). This means that the AS3 clip will be able to call functions found in the AS2 clip loaded in it, and the AS2 clip will be able to call functions found in its’ parent, the AS3 clip. All this, by using two components: ASBContainer, for Flash CS3 and AS3, and ASBTerminal, for Flash MX 2004 or later and AS2.
ASBTerminal.addEventListener - method doesn't exist
(2007-10-29 - views: 10921)Q:For example, the Help docs say to use:
But in my AS2.0 class I have a variable that is of type ASBTerminal and I get an error saying the addEventListener method doesn't exist.
[code]class com.eaxis.ReadingPane extends MovieClip
private var _asbTerminal:ASBTerminal;
_asbTerminal.addEventListener( "status", this );
_asbTerminal.addEventListener( "ASBReturn", this );
private function status( evtObj:Object ):Void
if( evtObj.level == "status" ) trace( "Connection succeeded…" );
if( evtObj.level == "error" ) trace( "Connection failed…" );
private function ASBReturn( evtObj:Object ):Void
trace( "The AS3 function " + evtObj.functionName + " returned "+evtObj.value );
How should I accomplish this? If I remove the var type I avoid the error but the listener still doesn't work.
Thanks in advance for any help!
P.S. besides this little hiccup (which is most likely my lack of knowledge about the component), I've been pretty pleased with ASB!