📄 applicationclass.as
字号:
package Class
{
import flash.events.Event;
import flash.events.MouseEvent;
import flash.external.ExternalInterface;
import mx.containers.*;
import mx.controls.*;
import mx.core.Application;
import mx.events.FlexEvent;
public class ApplicationClass extends Application
{
public var contentPanel:Panel;
public var fileUrl:TextInput;
public var selectButton:Button;
private var uploadFileUrl:String;
public function ApplicationClass()
{
super();
addEventListener (FlexEvent.CREATION_COMPLETE, OnLoad);
}
private function OnLoad(event:Event):void{
ExternalInterface.addCallback("sendToActionScript", receivedFromJavaScript);
this.selectButton.addEventListener(MouseEvent.CLICK,clickHandel);
}
private function receivedFromJavaScript(fileUrl:String):void{
this.uploadFileUrl=fileUrl;
this.fileUrl.text=fileUrl;
}
private function clickHandel(event:MouseEvent):void{
ExternalInterface.call("openBrowse");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -