FLEX:我该如何删除这个空间?

时间:2010-04-11 14:27:56

标签: flex

如何删除视频和控制栏之间的空间...我尝试将边距和填充更改为所有元素但没有成功。控件上方仍有一个薄薄的空白区域。

http://dl.dropbox.com/u/72686/hSliderMargin.png

感谢

<mx:VideoDisplay id="videoD" autoPlay="{autoPlayOption}" source="{videoPath}" playheadUpdate="playUpdate()" click="togglePlay()" />

    <mx:HBox width="{videoD.width}" styleName="controlsBar" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0">

        <mx:Button id="playB" icon="{playImg}" width="8" height="14" click="togglePlay()"/>

        <mx:HSlider id="slider" minimum="0" maximum="{videoD.totalTime}"
                height="12"
                width="{videoD.width - 58} "
                dataTipPlacement="top" 
                allowTrackClick="true" 
                liveDragging="false"
                showTrackHighlight="true"  
                click="isDragging=true;"
                mouseUp="seek()"
                sliderThumbClass="BigThumbClass"
        />

        <mx:Button id="fullB" icon="{fullscreen}" width="10" height="17" click="fullScreen()"/>

        <mx:Button id="volumeB" icon="{volumeOn}" width="14" height="14" click="toggleVolume()"/>

    </mx:HBox>




/* CSS file */

global {
    backgroundColor: #FFFFFF;
    padding:0;
    margin:0;   
}

Button {

    fillAlphas: 1.0, 1.0, 1.0, 1.0;
    fillColors: #FFFFFF, #FFFFFF;
    themeColor: #FFFFFF;
    borderColor: #FFFFFF;
    cornerRadius: 0;
    paddingTop: 0;
    paddingLeft: 0;
    paddingRight: 0;
    paddingBottom: 0;
    horizontalGap: 0;
    leading: 0;
    fontWeight: normal;
    color: #000000;
    textSelectedColor: #000000;
    textRollOverColor: #000000;
    skin: ClassReference(null);
}

Application {

    backgroundColor: #FFFFFF;
    backgroundGradientAlphas: 1.0, 1.0;
    backgroundGradientColors: #FFFFFF, #FFFFFF;

}

HSlider {


    fillAlphas: 1.0, 1.0;
    fillColors: #C1C1C1, #C1C1C1, #717070, #717070;
    themeColor: #3C3C3C;
    thumbSkin: Embed(source="asset/thumb.png");
    thumbOffset: -1;



}

1 个答案:

答案 0 :(得分:1)

所有这些都是在VBox中设置的吗?加入    垂直间隙:2;

到VBox风格可能会解决这个问题。另外,如果您使用的是绝对高度,则将clipContent = false添加到包含滑块的框中也可能会有所帮助。