Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.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
Actionscript 3 火花容器未将内容物隐藏在其外部_Actionscript 3_Apache Flex_Flex4_Flash Builder_Flex4.5 - Fatal编程技术网

Actionscript 3 火花容器未将内容物隐藏在其外部

Actionscript 3 火花容器未将内容物隐藏在其外部,actionscript-3,apache-flex,flex4,flash-builder,flex4.5,Actionscript 3,Apache Flex,Flex4,Flash Builder,Flex4.5,这就是我的屏幕的外观: 它是这样组成的: First container <s:HGroup>(900 X 100)--top black area Second container <s:Group> (900 X 475)--middle white area Third container <s:HGroup>--(900 X 100)--bottom black area 第一个容器(900 X 100)——顶部黑色区域 第二个容器(900 X

这就是我的屏幕的外观:

它是这样组成的:

First container <s:HGroup>(900 X 100)--top black area

Second container <s:Group> (900 X 475)--middle white area

Third container <s:HGroup>--(900 X 100)--bottom black area
第一个容器(900 X 100)——顶部黑色区域
第二个容器(900 X 475)-中间白色区域
第三个容器--(900 X 100)--底部黑色区域
如果项目是用Flex3完成的,那么中间区域将是一个

现在假设我有一个BorderContainer(125 X 475),并将其命名为middleContainerChild。它位于中间区域的右侧。当我将其
y
位置设置为
-middleContainerChild.height
时,它应该位于集装箱体外的
y=-475
。正如你在上面的图片中看到的,它已经被放置在那里了

但除了使用
,图像仍然会显示,即使它不再位于
的主体内,并且它被渲染到
的“顶部”

有关更多说明,请参见下图:

如果我使用
,它会被正确地隐藏起来,但如果我使用Spark容器(不仅是组,而且是任何Spark容器),它仍然是可见的


还有其他人有这个问题吗?

阅读一些关于
clipanEnableScrolling
属性的
GroupBase


尊敬。

阅读一些关于
clipanEnableScrolling
属性
GroupBase
类的内容


注意。

因为2DH给了我提示,我已经准备好了这个样品

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="900" minHeight="672">

    <fx:Declarations>
        <s:Move 
            id="moveUp" 
            yFrom="0" 
            yTo="-475" 
            target="{helpWindow}"/>
        <s:Move 
            id="moveDown" 
            yFrom="-475" 
            yTo="0" 
            target="{helpWindow}"/>

    </fx:Declarations>

    <fx:Script>
        <![CDATA[
            private function buttonUp_clickHandler(event:MouseEvent):void
            {
                moveUp.play();
            }

            private function buttonDown_clickHandler(event:MouseEvent):void
            {
                moveDown.play();
            }
        ]]>
    </fx:Script>

    <s:layout>
        <s:VerticalLayout gap="0"/>
    </s:layout> 

    <s:BorderContainer 
        backgroundColor="#000000" 
        height="100" 
        width="100%"/>
    <s:Group 
        height="475" 
        width="100%" 
        clipAndEnableScrolling="true">

        <s:VGroup 
            left="0" 
            top="0">
                <s:Button 
                    label="Play Effect UP" 
                    click="buttonUp_clickHandler(event)"/>
                <s:Button 
                    label="Play Effect DOWN" 
                    click="buttonDown_clickHandler(event)"/>
        </s:VGroup>


        <s:BorderContainer 
            id="helpWindow"
            backgroundColor="#CCCCCC"
            y="{-helpWindow.height}"
            right="0" 
            height="475" 
            width="125"
            />
    </s:Group>
    <s:BorderContainer 
        backgroundColor="#000000" 
        height="100" 
        width="100%"/>
</s:Application>

所以现在我已经将我的中心容器的clipanEnableScrolling设置为true,问题就解决了


感谢这两个堆栈成员:)

由于2DH给了我提示,我已经准备好了这个示例

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="900" minHeight="672">

    <fx:Declarations>
        <s:Move 
            id="moveUp" 
            yFrom="0" 
            yTo="-475" 
            target="{helpWindow}"/>
        <s:Move 
            id="moveDown" 
            yFrom="-475" 
            yTo="0" 
            target="{helpWindow}"/>

    </fx:Declarations>

    <fx:Script>
        <![CDATA[
            private function buttonUp_clickHandler(event:MouseEvent):void
            {
                moveUp.play();
            }

            private function buttonDown_clickHandler(event:MouseEvent):void
            {
                moveDown.play();
            }
        ]]>
    </fx:Script>

    <s:layout>
        <s:VerticalLayout gap="0"/>
    </s:layout> 

    <s:BorderContainer 
        backgroundColor="#000000" 
        height="100" 
        width="100%"/>
    <s:Group 
        height="475" 
        width="100%" 
        clipAndEnableScrolling="true">

        <s:VGroup 
            left="0" 
            top="0">
                <s:Button 
                    label="Play Effect UP" 
                    click="buttonUp_clickHandler(event)"/>
                <s:Button 
                    label="Play Effect DOWN" 
                    click="buttonDown_clickHandler(event)"/>
        </s:VGroup>


        <s:BorderContainer 
            id="helpWindow"
            backgroundColor="#CCCCCC"
            y="{-helpWindow.height}"
            right="0" 
            height="475" 
            width="125"
            />
    </s:Group>
    <s:BorderContainer 
        backgroundColor="#000000" 
        height="100" 
        width="100%"/>
</s:Application>

所以现在我已经将我的中心容器的clipanEnableScrolling设置为true,问题就解决了


感谢两位堆栈成员:)

您的问题很难理解,因此我尝试改进措辞,并给它一个更准确的标题。我希望我的意思是正确的-请回答,如果我误解了!谢谢weltraumpirat,我当时在我的办公室,我有点困惑,人们会如何理解,我想要什么,所以我在这里使用了图像,thanx进行编辑,我很感激:)哇,太棒了,你只是让它很容易理解,gr8兄弟,我今天学到了一件新东西,thanx因为这个巨大的帮助,请在我的回答中加入你的评论,我会投赞成票:)不,谢谢——保持一切美好和易懂是StackOverflow的一部分。谢谢你就足够了:)说得好,祝你玩得愉快:)你的问题很难理解,所以我试图改进措辞,给它一个更准确的标题。我希望我的意思是正确的-请回答,如果我误解了!谢谢weltraumpirat,我当时在我的办公室,我有点困惑,人们会如何理解,我想要什么,所以我在这里使用了图像,thanx进行编辑,我很感激:)哇,太棒了,你只是让它很容易理解,gr8兄弟,我今天学到了一件新东西,thanx因为这个巨大的帮助,请在我的回答中加入你的评论,我会投赞成票:)不,谢谢——保持一切美好和易懂是StackOverflow的一部分。A谢谢你就足够了:)说得好,祝你玩得愉快:)thnx 2DH:)这与我要找的有关:)事实上,我在上面的问题上甚至不是很清楚,但你选对了点,再次感谢:)thnx 2DH:)这与我要找的有关:)事实上,我在上面的问题上甚至不是很清楚,但你选对了重点,再次感谢你:)