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

推荐订阅源

T
Tor Project blog
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
I
InfoQ
The Cloudflare Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
美团技术团队
B
Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
TaoSecurity Blog
TaoSecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
H
Heimdal Security Blog
爱范儿
爱范儿
博客园_首页
SecWiki News
SecWiki News
腾讯CDC
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
The Register - Security
The Register - Security
N
News | PayPal Newsroom
Recent Commits to openclaw:main
Recent Commits to openclaw:main
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Security Latest
Security Latest
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
T
The Blog of Author Tim Ferriss
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
Attack and Defense Labs
Attack and Defense Labs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
C
Check Point Blog
Y
Y Combinator Blog
T
The Exploit Database - CXSecurity.com
aimingoo的专栏
aimingoo的专栏
I
Intezer
博客园 - 叶小钗
Cisco Talos Blog
Cisco Talos Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件

博客园 - 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()函数。