So im trying to use delegates for my functions in AS3/Scaleform4. I did this all the time in AS2/Scaleform3
In actionscriptCode:public function setup() { // Actionscript delegates SetupASRequestSomeDelegate(none); SetupASRequestSomeDelegate(RequestSome); (...) } (...) /************************** * The watch delegate * **************************/ delegate RequestSomeDelegate(); public function RequestSome() { (...) } (...) /////////////////////////////////////////////////////////// // Delegate registry /////////////////////////////////////////////////////////// public function SetupASRequestSomeDelegate( delegate<RequestSomeDelegate> _delagate) { ActionScriptSetFunction("RequestSome"); }
I believe this should work, however im getting the following cryptic error when I try and do an ActionScriptSetFunctionCode:... button.addEventListener(MouseEvent.CLICK, RequestSome); ... public function RequestSome() :void { trace( "Request Some Delegate, should never see at runtime!"); }
If I click on my 'button' object, I get the "should never see at runtime" message. Anyone have a clue?Code:DevGFxUI: ReferenceError: Error #1037



Reply With Quote

Bookmarks