加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex 4.5安装调试 Logging API

发布时间:2020-12-15 01:07:28 所属栏目:百科 来源:网络整理
导读:? 在做 flex 开发的时候,为了能够调试?需要安装的是 flashplayer 的 debug 版本,但是要是之前已经安装了其它版本,会提示安装不上,?发生题目上报的这个错误,? 10 的默认的安装目录是这个,? 1.C:WINDOWSsystem32MacromedFlash? 首先需要的是点卸载的

?

在做flex开发的时候,为了能够调试?需要安装的是flashplayerdebug版本,但是要是之前已经安装了其它版本,会提示安装不上,?发生题目上报的这个错误,?10的默认的安装目录是这个,?

1.C:WINDOWSsystem32MacromedFlash?首先需要的是点卸载的uninstall_activeX.exe

2.然后需要的是使用命令regsvr32?-u?注销到两个ocx的控件注册,然后把整个目录删除,?最后一步,删除注册表:?运行键入regedit?回车?hkey_local_machine->software->Macromdia->flashplyer->safeversions->?删除掉10的键值,?再安装就没有问题了。。。。。。。。。。。。

3.安装两个flash?player,

然后用chome浏览器chome://plugins

停用11.3

启用10.2即可

?

?

?

?

?

启用低版本的,而不是高版本的。

?注意:C:Windowssystem32MacromedFlashNPSWF32.dll

?

试例代码,参考别人写的,附上:

<?xml version="1.0" encoding="utf-8"?>  
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"   
			   xmlns:s="library://ns.adobe.com/flex/spark"  creationComplete="init()"  
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">  
	<fx:Declarations>  
		<!-- 将非可视元素(例如服务、值对象)放在此处 -->  

		
	</fx:Declarations>  
	<fx:Script>  
		<![CDATA[  
			import mx.logging.LogLogger;     
			import mx.logging.ILogger;     
			import mx.logging.Log;     
			import mx.logging.LogEventLevel;     
			import mx.logging.targets.TraceTarget;     
			public var logger:ILogger;     
			public function init():void{     
				var logTarget:TraceTarget = new TraceTarget();     
				logger = new LogLogger("testlog");     

				logTarget.filters = ["*"];     
				logTarget.level = LogEventLevel.ALL;     
				logTarget.includeCategory = true;     
				logTarget.includeDate = true;     
				logTarget.includeLevel = true;     
				logTarget.includeTime = true;     
				logTarget.addLogger(logger);     
				Log.addTarget(logTarget);     
				logger.info("It's the debug");   
				//trace("create complete");     
			}     
			public function clickBtn():void{     
				logger.debug("It's the debug");     
				logger.info("It's the info");     
				logger.warn("It's the warn");     
				logger.error("It's the error");     
				logger.fatal("It's the fatal");  
				
				//trace("ceshi dasdasd我来侧四下");  
				//trace("It's the first click on btn");     
			}     
			
		]]>  
	</fx:Script>  
	
	<mx:Button id="btn" label="OK" click="clickBtn()"/>    

</s:Application>  


就可以在在日志文件中打印以下日志了。

(续)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读