There is an old version Felx SDK bug(in my case it's Flex SDK v3.3.0.4852) that when TextField.selectable is set to false , link event on the textfield will be blocked. So if you have added html text including a link into the textfield, e.g.: var textField:TextField = new TextField(); textField.htm…
2013-11-13 10:50 · ActionScript 3 · Flex · Flash
使用ActionScript 3时,在当前的Container中需要加载外部的SWF文件,并给其中的button等组件添加监听事件。通常在ActionScript中加载SWF文件有有两种方式:一是通过Embed将外部SWF文件作为新类注册到当前类;二是通过Loader将SWF文件加载到当前Stage,通过该显示对象的root调用其中的组件。本文将介绍第二种使用方式。 在本文中,当前Stage的类为ExampleWrapper.as,需要加载的SWF文件名为custom.swf,与编译后生成的ExampleWrapper.swf放在同一文件夹下。 步骤为: 新创建一个Loader对象,加载cu…
2013-02-05 16:30 · ActionScript 3