惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - David Fan

JigLib类简介 3DS 文件格式 AGAL2 how to use UVAnimator to animate my mesh uv? 顶点着色器&像素着色器 AGAL OBJ文件格式 md5mesh&md5anim 矩阵、欧拉角、轴-角对、四元数随笔 Box2D&Away3D结合的例子 光照模型 仿照实现的away3d4示例应用 利用away3d,jiglibflash在android实现的投骰子 虚拟手柄控制的小车 air3.4 Android IPones4s 下运行正常 实现了一个简单的AS3 MVC框架,希望对大家有所帮助! 负责的一个项目上线了,还有Flex捐给apache是好事! ExternalInterface在Flex Project中C#,C++通信使用上的不同 - David Fan vs2008beta2 javascript 智能感知,语法着色不工作。付解决办法。 我正在读和已经读过的书(随时更新心得,欢迎交流)
转-flex自定义组件
David Fan · 2011-03-31 · via 博客园 - David Fan

原文:http://blog.sina.com.cn/s/blog_64902a300100jdyb.html

这些是从flash开发者交流会上得来的,就放在这里与大家分享分享,也许当时很多人都没记下来,不过,我算是个有心人,嘿嘿。
组件开发需重载的四个函数:
1.createChildren();
2.measure();
3.updateDisplayList();
4.commitProperties();

createChildren()在自定义组件中主要是和addChild,rowChildren相关。

measure()在自定义组件中主要是measureWidth,measureHeight相关,调用invalidateSize()函数,系统将自动调用measure()函数。

(1)对于updateDisplayList(),使用setAutualSize()设置子组件大小
(2)使用move()函数设置子组件位置。
(3)使用graphics对象绘制任意可视元素。
(4)如果需要手动更新组件视图。

invalidateDisplayList()函数,系统将自动调用updateDisplayList()函数。