首页 Soft PlugIn RAN乱 Dev开发 Info资料 English WAP 留言 登陆 注册
-
Posted by Yippee | 评论(0) | 引用(0) | 阅读216次
20080719 flex debug trace

20080719 flex debug trace
http://www.shengfang.org

1/Download the Windows Flash Player 9 Projector content debugger (EXE, 3.69 MB)
2/打开Project-Properties(快捷键alt+p-p),在ActionScript Compiler里把Generate HTML wrapper file的勾勾去掉就行了:


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" horizontalAlign="center" verticalAlign="middle"
    >
    <mx:Script>
     <![CDATA[
     
     import mx.controls.Alert; 
       public function eventtest():void
{
lll.text="sdfsdf";
}
     ]]>
    </mx:Script>
 <mx:Panel
        paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"
        title="My Applicationsdfsdf" 
     width="700" height="418">

        <mx:Label id="lll" text="Hello World!" fontWeight="bold" fontSize="24"/>
        <mx:Button label="Click Me" click="eventtest();"/>
    </mx:Panel>
 
</mx:Application>

FLEX中如何快速注释?
shift+ctrl+c / shift+ctrl+d 加AS3代码注解块

 Flex不能使用调试问题解决[原]
原因:新的Flashplayer9.0去掉了调试功能
解决:
      1.下载uninstallflashplayer,调试版的player for IE,player for other,执行文件
      2.依次运行,将执行文件放在Flex2/player/debuger下
      3.文件类型swf指向该执行文件

      除了air外,ActionScript Project和Flex Project默认都是在浏览器里调试的,有时候比较麻烦,特别是机器比较烂的时候(比如我)。

可以设置成在播放器里调试,这样比较快。打开Project-Properties(快捷键alt+p-p),在ActionScript Compiler里把Generate HTML wrapper file的勾勾去掉就行了:

Download the Windows Flash Player 9 ActiveX control content debugger (for IE) (EXE, 1.59 MB)

Download the Windows Flash Player 9 Plugin content debugger (for Netscape-compatible browsers) (EXE, 1.56 MB)

Download the Windows Flash Player 9 Projector content debugger (EXE, 3.69 MB)

Trace的重要性不必我强调,但是在最新的Flex Builder 3 中并不能轻松的实现这个功能,今天参考了《Flex 3 Cookbook》,总算解决了这一问题:

一、下载安装带DEBUG版本的Flash Player;

注意下载Firefox可用的:

Windows Flash Player 9 Plugin content debugger (for Netscape-compatible browsers) (EXE, 1.52 MB)

二、按F11运行工程,即可以在控制台看到Trace输出。

如果想体验高级功能,可以安装 sephiroth 发布的的Firefox插件FlashTracer。

二、trace命令

1.启动调试。单击[Debug Tracing]按钮即可。

2.结束调试。打开调试Web浏览器窗口以前,控制台窗口和调试窗口上部[Terminate]按钮是不可用的。当浏览器窗口打开后,它们就被激活了,单击它们即可终结调试进程,我们也可以通过关闭Web浏览器窗口来结束调试。

3.查看调试结果。调试结束后,就可以在控制台窗口中查看调试结果了。哪怕是没有任何附加代码,Flex Builder 至少可以返回被调试程序编译成swf文件后的大小。

TRACE的问题是要装debug版,而且FLASH PLAYER也是要除错版,也就是DEBUG版,下载地址是:

http://www.adobe.com/support/flashplayer/downloads.html

该版本可以把追踪的内容写入文件,flash player 所用的文件是由mm.cfg决定的,mm.cfg 储存在:

windows xp      c:\Documents and settings\[user name]\mm.cfg
windows 2000 c:\mm.cfg
mac os x          machd:library:Application support:macromedia:mm.cfg(第一次知道其它系统是用

其中,TraceOutputFileEnable 可以是0(不写入文件)或是1(写入文件)

TraceOutputFilename是要写入文件的路径


字体:

Permanant URI永久地址 http://www.shengfang.org/blog/p/20080719flexdebugtrace.php
Trackback URI引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1236225737

2009年3月5日12:02星期四  [Dev开发] 追踪此文的RSS
提示:
此文还没有评论。

称呼:    登陆   注册
   不注册,但记住我的信息
邮件:
(非必须)
评论: [UBB代码帮助]
粗体 斜体 下划线 链接 水平线 引用



验证码: 请输入你看见的数字
关闭UBB      提交时自动将内容复制到剪贴板

公告
Fire and Motion!

统计信息
[Yippee]||[统计]||日志:1887
在线: 20||用户: 2579 [列表]
今日:641||到访:2931359
Rss:||评论:1609

最新日志

最新评论

友情链接

日历
2008 - 08
     12
3456789
10111213141516
17181920212223
24252627282930
31      

最新引用

搜索

归档

杂项
Get RSS Feed (Version 2.0)
Get Atom Feed (Version 0.3)
编码:  UTF-8