【发布时间】:2013-12-22 09:26:31
【问题描述】:
我正在尝试在 FlashDevelop IDE 中遵循 Adobe 的 this 博客为我的 SIP 库 Adobe AIR 本机扩展构建一个 ActionScript 端库。当我构建项目时,出现以下编译时错误:
C:\Users\Osama Mohammed\Documents\AndroidSIPManager\src\in\innovative\androidsipmanager\AndroidSIPManager.as(1): col:9 错误:语法错误:在 in 之前需要标识符。
我不知道为什么会出现这个错误,尽管我的语法是正确的。当我在 ActionScript 文件中的任何 ActionScript 3 项目中的 package 关键字之后写入包名称时,我收到此错误,例如。 package my.package { ...,但是在 package 关键字后面没有写包名的时候不明白。以下是我的 AndroidSIPManager.as 代码:
package in.innovative.androidsipmanager //getting error here
{
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
/**
* ...
* @author Osama Mohammed Shaikh
*/
public class AndroidSIPManager extends EventDispatcher
{
private var extContext:ExtensionContext;
public function AndroidSIPManager(target:IEventDispatcher=null)
{
super(target);
extContext = ExtensionContext.createExtensionContext("in.innovative.SIPLibExtension", "sip");
if (!extContext)
{
throw new Error("SIP Library extension is not supported on this platform");
}
}
public function initialize(enum_transport:int, agent:String, STUNServer:String, STUNServerPort:int):int
{
return int (extContext.call("initialize", enum_transport, agent, STUNServer, STUNServerPort));
}
public function setUserInfo(userName:String, displayName:String, authName:String, password:String, localSIPPort:int, userDomain:String, SIPServer:String, SIPServerPort:int, outboundServer:String, outboundServerPort:int):int
{
return int (extContext.call("setUserInfo", userName, displayName, authName, password, localSIPPort, userDomain, SIPServer, SIPServerPort, outboundServer, outboundServerPort));
}
public function portSipCall(callee:String, enum_mediaType:int):Number
{
return Number (extContext.call("portSipCall", callee, enum_mediaType));
}
}
}
请帮我解决问题。
【问题讨论】:
标签: actionscript-3 air flashdevelop air-native-extension