[AS3]as3全屏写法与as2全屏写法源代码实例对比
[AS3]as3全屏写法与as2全屏写法代码对比,[AS3]as3全屏写法与as2全屏写法源代码实例对比
as2.0全屏写法:
this.fullScreen=true;
this.fullScreen=false;
- stop ();
- Stage.align = "TL";
- Stage.scaleMode = "noScale";
- if (_root.redirectEnabled) {
- sk._visible = true;
- trace("true");
- }
- // www.cuplayer.com
- _root.fs.btn_mc.onRelease = function() {
- if (Stage["displayState"] == "normal") {
- Stage["displayState"] = "fullScreen";
- } else {
- Stage["displayState"] = "normal";
- }// www.cuplayer.com
- };
- var listener = {};
- listener.onFullScreen = function(isFullscreen) {
- if (isFullscreen) {
- trace("cuplayer.com entered full-screen mode");
- } else {
- trace("cuplayer.com exited full-screen mode");
- }// www.cuplayer.com
- };
- Stage.addListener(listener);
- _root.setColorMatrix(fs);
- _root.setColorMatrix(loader_eff);
as3.0全屏写法:
stage.displayState="fullScreen";
stage.displayState="normal";
- package {
- import flash.display.Sprite;
- import flash.display.Stage;
- import flash.events.MouseEvent;
- public class FSButton extends Sprite {
- public function FSButton() {
- var navBtn1:Ball=new Ball();
- this.addChild(navBtn1);
- navBtn1.x=200;
- navBtn1.y=200;
- //www.cuplayer.com navBtn1.addEventListener(MouseEvent.CLICK,goFullScreen);
- }
- function goFullScreen(event:MouseEvent):void {
- switch (stage.displayState) {
- case "normal" :
- stage.displayState = "fullScreen";
- break;
- case "fullScreen" :
- default :
- stage.displayState = "normal";
- break;
- }
- }
- }
- }
热门文章推荐
- [HLS]做自己的m3u8点播系统使用HTTP Live Streaming(HLS技术)
- [FMS]FMS流媒体服务器配置与使用相关的介绍
- [AS3]什么是M3U8,与HTML5的区别是什么
- AS2.0 让flash自适应全屏,并且不自动缩放
- [AS3]as3.0的sound类常用技巧整理
- [AS3]as3与ByteArray详解、ByteArray介绍、ByteArray用法
- 关于RTMP,RTMPT,RTMPS,RTMPE,RTMPTE协议的介绍
- [JS]分享浏览器弹出窗口不被拦截JS示例
请稍候...