前面公开的Flash Player Update 3追加了硬件支持的全屏模式。以前的全屏模式还会支持。
硬件缩放的用法
Flash Player Update 3的Stage对象追加了一个fullScreenSourceRect的属性。这个属性可以在AS2.0和AS3.0里使用。它把Rectangle的领域缩放为全屏。用fullScreenSourceRect指定领域用硬件来画,比以前的效率与画质高不少。
语法
fullScreenSourceRect : flash.geom.Rectangle;
全屏模式的例子:
//Actionscript 3.0
import flash.geom.*;
public function fullScreen():void {
Stage["fullScreenSourceRect"] = new Rectangle(0, 0,
Stage.width, Stage.height);
Stage["displayState"] = "fullScreen";
}
在Flash CS3的类重新定义之前无法用Stage.fullScreenSourceRect的写法,会通不过编译。fullScreenSourceRect指定的领域在Stage外也可。
在AS3.0使用的注意点
要在AS3.0里使用新的全屏模式,必须替换playerglobal.swc。新的playerglobal.swc包含在以下文件里。
full_screen_demo.zip (zip, 49.2 MB)
取出playerglobal.swc,把它放在以下地方
Flash CS3: Adobe Flash CS3\en\Configuration\ActionScript 3.0\Classes\
Flex Builder: Flex Builder 2\Flex SDK 2\frameworks\libs
Flash Player支持硬件了!接下来的事我拭目以待!
![[Google]](http://www.google.com/logos/Logo_25wht.gif)
![[Synchronous Space]](http://weihe924stephen.googlepages.com/syncspace-banner.jpg)
![[Creative Commons License]](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png)
![[Add to Google]](http://buttons.googlesyndication.com/fusion/add.gif)
![[Aggregated by MXNA]](http://weblogs.macromedia.com/mxna/images/mxna88x31.gif)
![[Flex.org]](http://www.flex.org/images/flexorg.gif)
![Validate my Atom 1.0 feed [Valid Atom 1.0]](http://validator.w3.org/feed/images/valid-atom.png)
![Validate my RSS feed [Valid RSS]](http://resource.googlecode.com/files/valid-rss.png)
![[I heart FeedBurner]](http://www.feedburner.com/fb/images/pub/i_heart_fb.gif)
没有评论:
发表评论