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
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!
_asbTerminal = this.attachMovie("ASBTerminal", "_asbTerminal", this.getNextHighestDepth());
By creating the ASBTerminal object this way, your class should be working just fine.