Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/434.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Flex:如何获得全屏,使用相同的垂直和水平条,就像在全屏之前一样_Javascript_Apache Flex_Actionscript 3 - Fatal编程技术网

Javascript Flex:如何获得全屏,使用相同的垂直和水平条,就像在全屏之前一样

Javascript Flex:如何获得全屏,使用相同的垂直和水平条,就像在全屏之前一样,javascript,apache-flex,actionscript-3,Javascript,Apache Flex,Actionscript 3,请检查我的密码 //对于全屏stage.displayState=StageDisplayState.Full\u屏幕 //对于正常屏幕stage.displayState=StageDisplayState.normal 但是这个代码不符合我的要求。我需要垂直滚动条,即使我去全屏,但我没有找到任何与此代码滚动 甚至我也尝试了使用ExternalInterface“window.open”的JavaScript,但没有成功。我想Flex通常会在不需要时自动隐藏scrol条。在您的情况下,我会为S

请检查我的密码

//对于全屏
stage.displayState=StageDisplayState.Full\u屏幕

//对于正常屏幕
stage.displayState=StageDisplayState.normal

但是这个代码不符合我的要求。我需要垂直滚动条,即使我去全屏,但我没有找到任何与此代码滚动


甚至我也尝试了使用ExternalInterface“window.open”的JavaScript,但没有成功。

我想Flex通常会在不需要时自动隐藏scrol条。在您的情况下,我会为Scroller或您正在使用的任何组件创建一个自定义外观。这里有一个例子:

<fx:Metadata>
<![CDATA[ 
    /** 
     * @copy spark.skins.spark.ApplicationSkin#hostComponent
     */
    [HostComponent("spark.components.Scroller")]
]]>
</fx:Metadata> 

<fx:Script>
<![CDATA[    
    /**
     *  @private
     */
    override public function beginHighlightBitmapCapture() : Boolean
    {
        var needUpdate:Boolean = super.beginHighlightBitmapCapture();

        // Draw an opaque rect that fill our entire skin. Our background
        // is transparent, but we don't want focus/error skins to
        // poke through.  This is safe to do since we don't have any 
        // graphic elements as direct children.
        graphics.beginFill(0);
        graphics.drawRect(0, 0, width, height);
        graphics.endFill();

        return needUpdate;
    }

    /**
     *  @private
     */
    override public function endHighlightBitmapCapture() : Boolean
    {
        var needUpdate:Boolean = super.endHighlightBitmapCapture();

        // Clear the rect we drew in beginBitmapCapture();
        graphics.clear();

        return needUpdate;
    }
]]>
</fx:Script>

<s:VScrollBar id="verticalScrollBar"/>

<s:HScrollBar id="horizontalScrollBar"/>



谢谢克里斯杜兹的回复,但最后我知道,如果我们想在新窗口中获得滚动条,而不使用externelInterface,这是不可能的。所以我尝试了这个JavaScript函数:

函数浏览器全屏(myUrl) {

它真的很管用。由于谷歌和其他很多研究,我发现Flex代码可以全屏显示,但我们无法获得浏览器滚动条


谢谢大家。

Hi Chrisdutz,你在这一点上的猜测是不合适的,因为在普通视图中,它显示浏览器的垂直条,并且页面高度太大,无法在全屏显示时隐藏该条。当我按下Ctrl+F11时,我会看到垂直条,全屏显示。因此,实际上我想要的视图与按下Ctrl后看到的视图相同+F11.好的……那么您根本不是在谈论flex应用程序中的滚动条,而是浏览器的滚动条?是的,此浏览器滚动条取决于我的页面中的内容。如果有更多内容,则会显示,否则会隐藏。
    var url = myUrl;
    params  = 'width='+screen.width; 
    params += ', height='+screen.height;
    params += ', top=0, left=0';
    params += ', fullscreen=yes';
    params += ', scrollbars=yes';
    window.open (url, "_blank", params);
}