- 浏览: 105685 次
- 性别:
- 来自: 广州
文章分类
最新评论
在将显示对象直接添加到舞台显示列表或将包含显示对象的子树添加至舞台显示列表中时调度。 以下方法会触发此事件:DE>DisplayObjectContainer.addChild()DE>、DE>DisplayObjectContainer.addChildAt()DE>。
很多时候,可视类初始化的时候,要用到stage属性,则必须使用Event.ADDED_TO_STAGE事件,有的时候,连文档类初始化时,也需要用到Event.ADDED_TO_STAGE,原因是这个swf将被其它的文件加载,如果直接在初始化函数内使用stage属性,单独发布是没问题的,但联调时就会发生问题。
但是,文档类初始化函数内的Event.ADDED_TO_STAGE,当这个swf被其他文件加载时,很有可能被触发两次,如果你将所有真正的初始化代码都写在Event.ADDED_TO_STAGE事件相应函数内,所有的可视化元素,将会被new出来两份,所有的侦听,将会有两份...
这个现象很隐蔽,往往发生了也不报错,从表面上也看不出问题,但一旦发生,轻则降低机器性能,重则会发生很多灵异事件,例如明明把某个元素visible设成false了,但屏幕上还是能看到它,原因就是new出来东西,都将有两份。Event.ADDED_TO_STAGE被广播两次的原因,可能是文档类的特殊性造成的,它自己初始化的时候被触发一次,被加载并显示的时候再触发一次。
发表评论
-
AS3动态获得类名及类的方法
2012-10-26 17:53 17641.获得某个实例对象的类名:getQualifiedClass ... -
Vector初始化的各种写法
2012-10-16 14:56 4803var i:int = 0; var j:int = ... -
as3中数组array与vector的区别
2012-10-15 14:47 1462ActionScript 3.0 中可用的另一种索引数组 ... -
关于读取舞台大小各浏览器之间的差异
2012-08-13 16:38 770因为在做项目的时候遇到的怪异问题 ie下的player会sta ... -
Flash-如何改变动态文本透明度
2012-08-13 16:39 1679因为Flash的系统字体不直接支持透明,所以我们得通过嵌 ... -
教你如何修改FLASH右键菜单
2012-08-14 15:36 2216有些东西只有用到了才会去看,才会去寻找答案。这真的挺有道 ... -
as跨域问题解决总结
2012-08-14 15:36 1602总结一下在工作中遇 ... -
AS3参数的传址与传值
2012-08-14 15:37 1161//as3里面规定,属于基元数据类型(包括 Boolea ... -
AS3 数组深度复制
2012-08-15 09:55 802//简单复制后,修改副本会修改原对象,深度复制后,修改副 ... -
自定义异常类
2012-08-10 15:19 857package { import flash.err ... -
hasEventListener()与willTrigger()区别
2012-08-10 15:17 1245hasEventListener()方法: 检查 Ev ... -
写AS3需要养成好的编码习惯
2012-08-10 15:14 829因为AS3的垃圾回收是自动的,如果你某个对象存在被引用, ... -
as3 代码优化
2012-08-10 14:41 1451var obj:Object = {}; 比 var obj: ... -
as3对象池应用
2012-08-10 12:06 1202为什么使用对象池? 我们先来看一个例子:假 ... -
AS3 复制可视对象
2012-08-09 16:44 1205复制舞台上的影片剪 反射方法: 需要复制的舞台对象 ... -
AS3动态获得类名及类的方法
2012-08-09 16:21 7791.获得某个实例对象的类名:getQualifiedClass ... -
Flash流式视频提示点及回调函数
2012-08-09 16:21 1445流式传输视频文件 若要流式传输 Flash Media Se ... -
深度探索as3的事件机制
2012-08-08 11:57 1822as3的事件机制很好用 ... -
AS3数组转换XML
2012-08-08 11:08 894package { import flash.displa ... -
FLASH自定义组件
2012-08-08 10:43 2083由于工作需要,最近开始学习FLASH自定义组件的开发。在开发过 ...
相关推荐
added several references to each chapter to direct the advanced reader to the source of the material. We also expanded the glossary to assist the novice in understanding and relating to a new ...
- fixed image size calculation when AutoSize is enabled in the preparation stage - fixed RichText lists format - fixed a bug when font changed in parent report were not changed in inherited report * ...
The model resolution is very flexible, and system level techniques are easily added. A matlab script for processing the data is also included. pipelined_adc_model.mdl pipelined_adc_model_testscript.m...
The model resolution is very flexible, and system level techniques are easily added. A matlab script for processing the data is also included. pipelined_adc_model.mdl pipelined_adc_model_testscript.m...
g) The VsGui program was modified to add sweep function, and the associated files were added to the file manifest. The new functions are assigned higher ordinal numbers than the earlier commands, so ...
- Added additional USB 2.0 Loopback plug test initialization to ensure plugs are in a 'clean' state when starting the USB tests. This was added due to reported USB data verification errors after ...
Finalizes DPLL registration process. In case a failure (clk-ref or clk-bypass is missing), the clock is added to retry list and the initialization is retried on later stage.
With version 4.0, the language has been further refined to provide programmers with greater flexibility, and additional features have been added such as an entirely new stage called the tessellation ...
To compress: PAQ6 -3 archive file file... (1 or more file names), or or (MSDOS): dir/b | PAQ6 -3 archive (read file names from input) or (UNIX): ls | PAQ6 -3 archive To decompress: PAQ6 archive (no ...
It's a chance to challenge your brain, solve a real world math problem, and get recognition for it on an international stage. It's an excellent opportunity to develop your interpersonal skills ...
It is based on David Elliott's fake EFI implementation added to Apple's boot-132 project. Chameleon is extended with the following key features: - Device Property Injection via device-properties ...
located at the side of a theatre stage. Furthermore, the 8-buss link can be used to distribute signals around a complex network where iDR units communicate via TCP/IP - here, interbox paging and ...
Support for static meshes is also planned, but will be added later, due to the complexity of the mesh data. There's no GUI for the tool yet, since it's still in an early experimental stage. So if ...
Login to [iface: default, target: iqn.2012-09.com.example:server.target4, portal: 192.168.10.10,3260]: successful 查看磁盘信息 [root@node1 /]# fdisk -l Node2端: [root@node2 ~]# yum install *scsi* ...
使 common.c、stage2.c 中的代码与 0.4.5c 保持一致(除 0.4.6a 有意改动的)。 2014-07-9(yaya) 修正软盘搜索。 支持 16 插槽映射。 2014-06-23(yaya) 1.完善了有碎片的文件仿真。最多 32 段碎片。若全部采用...
Number of ports added between 1996 and 2005 Foreword Up until now, the FreeBSD project has released a number of described techniques to do different parts of work. However, a project model ...
Configuration is added to choose which MS Agent to use and the Time interval use to check for mails<END><br>30 , wsc_ftp_client.zip FTP Client Sample Application. It was built with MS Winsock ...
It's a chance to challenge your brain, solve a real world math problem, and get recognition for it on an international stage. It's an excellent opportunity to develop your interpersonal skills through...
Added heightReference and extrudedHeightReference properties to CorridorGraphics, EllipseGraphics, PolygonGraphics and RectangleGraphics. #6717 PostProcessStage has a selected property which is an ...
(克隆后)单击: git checkout -b "ft-username" (to create your branch) 步骤4.(添加代码后)使用git add .添加您的贡献git add . 步骤5.使用git commit -m "feat: username added"来提交您的更改 步骤6.使用...