首页 > Web开发 > 详细

air 调用jsfl 执行对应函数,并传参

时间:2018-11-02 16:22:05      阅读:146      评论:0      收藏:0      [点我收藏+]
jsflPath = "WindowSWF/dt_tool_jsfl/" + event.item.fileName+".jsfl";   
				var element_arr = event.item.element.split(",");
				var element_str:String = "";
				var elementLen_num:Number = element_arr.length;
				if (elementLen_num == 1){
					element_str = event.item.element;
				}else{
					for (var i:int = 0; i < element_arr.length; i++){
						if (i == 0){
							element_str +=  element_arr[i] + "\‘,";
						}else if (i == element_arr.length - 1){
							element_str += "\‘" + element_arr[i];
						}else{
							element_str += "\‘" + element_arr[i] + "\‘,";
						}
					}
				}
				
				doActionByElem(command,jsflPath,element_str);
//执行命令调用jsfl带参数
		private function doActionByElem(command:String,path:String="",element:String=""):void
		{   
		     
			MMExecute("fl.runScript( fl.configURI + ‘" + path + "‘,‘" + command + "‘,‘" + element + "‘);");
			trace("fl.runScript( fl.configURI + ‘" + path + "‘,‘" + command + "‘,‘" + element + "‘);");
		}

  

air 调用jsfl 执行对应函数,并传参

原文:https://www.cnblogs.com/dt1991/p/9896844.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!