我正在尝试为 Blackberry Playbook 做一个类似解压缩的应用程序,这意味着当用户单击注册了应用程序的文件时,该应用程序通常会启动。
我用谷歌搜索了一下,我发现关闭的是这个,但是 MobileApplication 没有调用参数。
<?xml version="1.0" encoding="utf-8"?>
<s:MobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.TestHome"
invoke="onAppInvoke(event)">
<fx:Declarations>
</fx:Declarations>
<fx:Script>
<![CDATA[
private function onAppInvoke(event:InvokeEvent):void {
if (event.arguments.length>0) {
// ok app call with an arguments
var fileName:String=event.arguments[0];
trace("app open with : "+fileName);
} else {
// app open normally
trace("normal launch");
}
}
]]>
</fx:Script>
</s:MobileApplication>