续Flash Player的新的全屏模式(1),来介绍一下Video的全屏模式。
用硬件缩放来全屏Video比用Stage来做效率高。但与普通的不同,有几个重要的点。
- 最好把smoothing设为false。
- 最好把deblocking设为0。
- 把属性设为初始值。
下面是把myVideo用全屏播放的例子。
import flash.geom.*; public function goFullScreen():void { // 保存现在的属性 myVideo.savedWidth = myVideo.width; myVideo.savedHeight = myVideo.height; myVideo.savedSmoothing = myVideo.smoothing; myVideo.savedDeblocking = myVideo.deblocking; // 把属性设为初始值 myVideo.width = myVideo.videoWidth; myVideo.height = myVideo.videoHeight; myVideo.smoothing = false; myVideo.deblocking = 0; // 全屏 Stage["fullScreenSourceRect"] = new Rectangle( myVideo.x, myVideo.y, myVideo.width, myVideo.height); Stage["displayState"] = "fullScreen"; }
![[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)
没有评论:
发表评论