【问题标题】:Get local file while in Fullscreen mode在全屏模式下获取本地文件
【发布时间】:2015-04-15 10:13:41
【问题描述】:

我有 swf 可以扩展到全屏:

stage.displayState = StageDisplayState.FULL_SCREEN;

我第二次尝试选择本地文件,它崩溃到 NORMAL_SCREEN

    file_mask = new FileFilter("Images: (*.jpeg, *.jpg, *.png, *.JPG)","*.jpeg; *.jpg; *.png; *.JPG");
    local_file.browse([file_mask]);

是bug,还是功能,还是以前的样子???

import flash.net.*;
import flash.events.*;
import flash.display.*;

expand_btn.addEventListener(MouseEvent.CLICK, openApp)
function openApp(e:MouseEvent) {
    stage.displayState = StageDisplayState.FULL_SCREEN;
}

file_btn.addEventListener(MouseEvent.CLICK, openApp2)
function openApp2(e:MouseEvent) {
    var local_file:FileReference = new FileReference();
    var file_mask:FileFilter = new FileFilter("Images: (*.jpeg, *.jpg, *.png, *.JPG)","*.jpeg; *.jpg; *.png; *.JPG");
    local_file.browse([file_mask]);
}

【问题讨论】:

  • 给你。在 Firefox 或 chrome 中打开它。

标签: file actionscript-3 air fullscreen filereference


【解决方案1】:

使用全屏交互。

 stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
 //Align top left of the stage.
 stage.align = StageAlign.TOP_LEFT;
 //align swf contents without scale.
 stage.scaleMode = StageScaleMode.NO_SCALE;

如果您嵌入浏览器,请添加以下参数。

<param name="allowFullScreenInteractive" value="true" /> 

Ref

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-05-18
    • 1970-01-01
    • 1970-01-01
    • 2013-09-19
    • 2011-09-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多