How to take advantage of Alcon
来源:互联网 发布:企业协作软件 编辑:程序博客网 时间:2024/04/30 09:19
After unzipping the compressed file, the folder looks like:
Copy the folder into Adobe Flash installation directory. And add the lib path in 'Actionscript3.0 Setting Panel':
Go to Flash CS5.5, create a new ActionScript3.0 fla file, put the code on the timeline:
import com.hexagonstar.util.debug.Debug;Debug.trace("hello Vincent");Debug.traceObj(stage);Debug.monitor(stage, 1000);
Publish the fla, to generate SWF and html files. Then run Alcon.exe, and open the html in Firefox, almost at the meantime, we can see the window of Alcon populating data:
How to use it in Flex environment
Download the latest version from official site: http://www.hexagonstar.com/project/alcon/#download
And install it. Then in Flash Builder 4.5, select the project right-click mouse, select properties in the context menu, in the pop up panel, find the swc file under Alcon installation directory, and set as shown:
The following steps may be tricky, in Flex program, the reference 'stage' is not available immediately after the program initiated, if you access the stage in applicationComplete handler, it will be null. There are two workarounds.
1. To use callLaterfunction:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*" creationComplete="callLater(init)">... <fx:Script><![CDATA[import com.hexagonstar.util.debug.Debug;import mx.events.FlexEvent; private function init():void{ Debug.monitor(stage, 1000);}]]></fx:Script>...
Within the above block, the method init() will be invoked for more than one times untill it eventually be executed.
2. To use ADD_TO_STAGE event:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*" addedToStage="application1_addedToStageHandler(event)">...<fx:Script><![CDATA[import com.hexagonstar.util.debug.Debug;import mx.events.FlexEvent;protected function application1_addedToStageHandler(event:Event):void{Debug.monitor(stage, 1000);}]]></fx:Script>...
Within the snippet, the handling function will be invoked after the applicatipn instance be added to the stage, at that moment the stage must be aready to use.
Added at 4th-Dec-2012
Alcon.exe file can run without the as files under /debug/ path, the sources codes are only for the enviroment what you are publishing your swf. It is not necessary in product enviroment.
refs:
http://hi.baidu.com/caijx/blog/item/ad474c23c22c745a9922edac.html
Official Site of Alcon
- How to take advantage of Alcon
- take-advantage-of-redis-adding-it-to-your-stack.html
- Take advantage of TCP/IP options to optimize data transmission
- Take Advantage of Code Analysis Tools
- Take Advantage of Code Analysis Tools
- Effective Objective-C 2.0: Item 44: Use Dispatch Groups to Take Advantage of Platform Scaling
- Update your app to take advantage of the larger aspect ratio on new Android flagship devices
- How to take screenshot (thumbnail) of a web site with ASP.NET 2.0?
- How to Take ‘Snapshot of Logical Volume and Restore’ in LVM
- Take Advantage of 3D Touch 利用3D的优势
- How.To.Bypass.Windows.Genuine.Advantage.GUIDE.Win2kXP
- How To Take Control Over Your Life
- How To Avoid Disk Full Issues Because OPatch Backups Take Big Amount Of Disk Space. (文档 ID 550522.1)
- How to Take Ownership of a File/Folder Using Command-Line in Windows 7 or newer version System
- Advantage of CSharp
- How to do take snapshot image as binary data?
- How to take Thread Dumps from a JVM
- How to save a picture (take screenshot) from a camera
- IE8下vs2005启动调试不执行
- javascript详解 01
- IntWritable, int
- C++ Primer Plus学习:第四章 复合类型(3)
- Objective-C 2.0 with Cocoa Foundation--- 6,NSObject的奥秘
- How to take advantage of Alcon
- 读写配置文件
- jacob操作API
- 搭建共享IP虚拟机
- JQuery 技巧总结
- iphone 控制tableviewcell的宽度
- Google出的《 C++ 风格指南》中文版
- java访问权限控制
- Linux下通过lib导出类