How to successfully integrate AppWarp to ActionScript 3 code?

我怕爱的太早我们不能终老 提交于 2019-12-02 03:17:21

You have to define a listener class to listen to responses and notifications. But in flash CC you can not define a class inside actions. You need to create an external action-script file and there define your listener class. Then go to File -> ActionScript Settings. There under source path section, add the path of the location where you have saved your new action script file.

You should add appwarp .swc by clicking Preferences (CTRL + U) > Code Editor > Action Script 3.0 Settings > Library path (I put here path to swc) only.

The sample was made using older version of appwarp, but the new version includes some new methods and listeners.

All you need to do is to implement the missing listeners.

public function onInitUDPDone(res:int):void{}
public function onUserPaused(locid:String, isLobby:Boolean, username:String):void{}
public function onUserResumed(locid:String, isLobby:Boolean, username:String):void{}
public function onGameStarted(sender:String, roomid:String, nextTurn:String):void{}
public function onGameStopped(sender:String, roomid:String):void{}
public function onUpdatePeersReceived(update:ByteArray, isUDP:Boolean):void{}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!