亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

FLV視頻類播放器全屏切換完整AS代碼示例

  發(fā)布時(shí)間:2012-07-26 10:57:36   作者:佚名   我要評(píng)論
FLV視頻類播放器全屏切換完整AS代碼示例,全屏模式切換, 創(chuàng)建右鍵全屏及退出全屏菜單,現(xiàn)在將右鍵菜單指定給場(chǎng)景中的movieclip.我當(dāng)前指定給場(chǎng)景中的box.你也可以指定給_root
  1. function setFullScreen() {  
  2. //fscommand("fullscreen", true);  
  3. if (_root.logoCoolRabbit._visible == false) {  
  4.    if (Stage["displayState"] == "normal") {  
  5.     fscommand("fullscreen", true);  
  6.     Stage["displayState"] = "fullScreen";  
  7.    } else if (Stage["displayState"] == "fullScreen") {  
  8.     fscommand("fullscreen", false);  
  9.     Stage["displayState"] = "normal";  
  10.    }  
  11.    rootWidth = Stage.width;  
  12.      rootHeight = Stage.height;  
  13.  
  14.    //復(fù)位控制欄  
  15.    clearInterval(controlBuffCoolTime);  
  16.    controlBuffCoolTime = null;  
  17.    clearInterval(controlBuff);  
  18.    controlBuffCool = 0;  
  19.    controlBuffEstimate = null;  
  20.  
  21.    //復(fù)位標(biāo)題欄  
  22.    clearInterval(playTitleBuffCoolTime);  
  23.    playTitleBuffCoolTime = null;  
  24.    clearInterval(playTitleBuff);  
  25.    playTitleBuffCool = 0;  
  26.    playTitleBuffEstimate = null;  
  27.  
  28.    //重新設(shè)置組件位置  
  29.    moduleSet();  
  30.  
  31.    //重新計(jì)算和設(shè)置播放組件尺寸比  
  32.    videoWidthSet = rootWidth;  
  33.    videoHeightvideoHeightSet = videoHeight/videoWidth*rootWidth;  
  34.    playAllModule.playFlvWindow._width = videoWidthSet;  
  35.    playAllModule.playFlvWindow._height = videoHeightSet;  
  36.    playAllModule.playFlvWindow._y = (rootHeight-playAllModule.playFlvWindow._height)/2;  
  37. }  
  38. }  
  39.  
  40. //全屏模式切換  
  41. playAllModule.controlSet.buttonFullScreen.onPress = function() {  
  42. setFullScreen();  
  43. };  
  44.  
  45. //創(chuàng)建右鍵全屏及退出全屏菜單  
  46. //var newnewMenu:ContextMenu = new ContextMenu();  
  47. var newnewMenu:ContextMenu = new ContextMenu(menuHandler);  
  48. //隱藏右鍵的一些標(biāo)準(zhǔn)菜單  
  49. newMenu.hideBuiltInItems();  
  50. // 在右鍵菜單中加入菜單項(xiàng)  
  51. //var fs:ContextMenuItem = new ContextMenuItem("全屏", goFullScreen);  
  52. var fs:ContextMenuItem = new ContextMenuItem("全屏", setFullScreen);  
  53. newMenu.customItems.push(fs);  
  54. //var xfs:ContextMenuItem = new ContextMenuItem("退出全屏", exitFullScreen);  
  55. var xfs:ContextMenuItem = new ContextMenuItem("退出全屏", setFullScreen);  
  56. newMenu.customItems.push(xfs);  
  57. // 現(xiàn)在將右鍵菜單指定給場(chǎng)景中的movieclip.我當(dāng)前指定給場(chǎng)景中的box.你也可以指定給_root  
  58. this.menu = newMenu;  
  59.  
  60. /**  
  61. function goFullScreen() {  
  62. //Stage["displayState"] = "fullScreen";  
  63. }  
  64. function exitFullScreen() {  
  65. //Stage["displayState"] = "normal";  
  66. }  
  67. **/  
  68.  
  69. // 定義開啟和關(guān)閉全屏功能,取決于你當(dāng)前處于哪一種狀態(tài)下  
  70. function menuHandler(obj, menuObj) {  
  71. if (Stage["displayState"] == "normal") {  
  72.    // 如果你當(dāng)前處在正常模式下,則goFullscreen可點(diǎn)擊  
  73.    menuObj.customItems[0].enabled = true;  
  74.    menuObj.customItems[1].enabled = false;  
  75. } else {  
  76.    // 如果你當(dāng)前片在全屏模式下,則exitFullScreen可點(diǎn)擊  
  77.    menuObj.customItems[0].enabled = false;  
  78.    menuObj.customItems[1].enabled = true;  
  79. }  

flash播放器軟件下載列表:

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

相關(guān)文章

最新評(píng)論