⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 remotecontroller.mxml

📁 flexplayer_source自己写的flex播放器
💻 MXML
字号:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();" width="300" height="300">
	<mx:Script>
		<![CDATA[
			private var count:int = 0;
			private var cmdClient:LocalConnection = null;
			
			private function sendCommand(cmd:String):int{
				this.txt_cmds.text = cmd + ' @'+ '\n' + this.txt_cmds.text;
				
				try{
					cmdClient.send('player_command','onMessage',cmd);
				}catch(ex:ArgumentError){
					return -1;
				}
				//count++;
				return 0;
			}
			
			private function init():void{
				ExternalInterface.addCallback('sendCommand',sendCommand);
				this.cmdClient = new LocalConnection();
				cmdClient.addEventListener(StatusEvent.STATUS,this._onStatusEvent);
			}
			
			private function _onStatusEvent(evt:StatusEvent):void{
			
				this.txt_cmds.text = 'StatusEvent:'+evt.level + ' @'+ '\n' + this.txt_cmds.text;
				if(evt.level == 'error'){
					ExternalInterface.call('_cmdFailed_callback','');
				}
			}
		]]>
	</mx:Script>
	<mx:TextArea x="10" y="10" width="275" height="109" id="txt_cmds" />
	
</mx:Application>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -