手机
当前位置:查字典教程网 >软件教程 >影音播放 >FLV视频类播放器全屏切换完整AS代码示例
FLV视频类播放器全屏切换完整AS代码示例
摘要:functionsetFullScreen(){//fscommand("fullscreen",true);if(_root.logoCo...

functionsetFullScreen(){ //fscommand("fullscreen",true); if(_root.logoCoolRabbit._visible==false){ if(Stage["displayState"]=="normal"){ fscommand("fullscreen",true); Stage["displayState"]="fullScreen"; }elseif(Stage["displayState"]=="fullScreen"){ fscommand("fullscreen",false); Stage["displayState"]="normal"; } rootWidth=Stage.width; rootHeight=Stage.height; //复位控制栏 clearInterval(controlBuffCoolTime); controlBuffCoolTime=null; clearInterval(controlBuff); controlBuffCool=0; controlBuffEstimate=null; //复位标题栏 clearInterval(playTitleBuffCoolTime); playTitleBuffCoolTime=null; clearInterval(playTitleBuff); playTitleBuffCool=0; playTitleBuffEstimate=null; //重新设置组件位置 moduleSet(); //重新计算和设置播放组件尺寸比 videoWidthSet=rootWidth; videoHeightvideoHeightSet=videoHeight/videoWidth*rootWidth; playAllModule.playFlvWindow._width=videoWidthSet; playAllModule.playFlvWindow._height=videoHeightSet; playAllModule.playFlvWindow._y=(rootHeight-playAllModule.playFlvWindow._height)/2; } } //全屏模式切换 playAllModule.controlSet.buttonFullScreen.onPress=function(){ setFullScreen(); }; //创建右键全屏及退出全屏菜单 //varnewnewMenu:ContextMenu=newContextMenu(); varnewnewMenu:ContextMenu=newContextMenu(menuHandler); //隐藏右键的一些标准菜单 newMenu.hideBuiltInItems(); //在右键菜单中加入菜单项 //varfs:ContextMenuItem=newContextMenuItem("全屏",goFullScreen); varfs:ContextMenuItem=newContextMenuItem("全屏",setFullScreen); newMenu.customItems.push(fs); //varxfs:ContextMenuItem=newContextMenuItem("退出全屏",exitFullScreen); varxfs:ContextMenuItem=newContextMenuItem("退出全屏",setFullScreen); newMenu.customItems.push(xfs); //现在将右键菜单指定给场景中的movieclip.我当前指定给场景中的box.你也可以指定给_root this.menu=newMenu; /** functiongoFullScreen(){ //Stage["displayState"]="fullScreen"; } functionexitFullScreen(){ //Stage["displayState"]="normal"; } **/ //定义开启和关闭全屏功能,取决于你当前处于哪一种状态下 functionmenuHandler(obj,menuObj){ if(Stage["displayState"]=="normal"){ //如果你当前处在正常模式下,则goFullscreen可点击 menuObj.customItems[0].enabled=true; menuObj.customItems[1].enabled=false; }else{ //如果你当前片在全屏模式下,则exitFullScreen可点击 menuObj.customItems[0].enabled=false; menuObj.customItems[1].enabled=true; } }

flash播放器软件下载列表:

flash播放器大全下载中心 最新版flash播放器下载

【FLV视频类播放器全屏切换完整AS代码示例】相关文章:

安捷播放器怎么样好用吗 安捷播放器有哪些功能

potplayer播放器基本介绍及使用教程

As3音乐播放器制作教程

迅雷看看播放记录怎么删除?

百度视频播放器怎么安装?百度视频播放器安装步骤以及下载地址

Flash视频播放器常用的onMetaData参数信息说明

迅雷看看怎么截屏?迅雷看看播放器截图方法图文介绍

mvbox怎么k歌唱歌 使用mvbox卡拉ok播放器唱歌教程

黑鲨鱼视频格式转换器图文使用教程

电脑花屏怎么办?电脑播放器花屏有锯齿的解决方法

精品推荐
分类导航