0

我有一个问题,所以我需要你的帮助。我正在使用 AS2 为我的设置框创建 UI。当我将一个文本字段重叠在一个影片剪辑上时,这个文本字段后面有一个不透明的背景。如何删除它?

这是图像错误的链接:http: //i.stack.imgur.com/RZZbu.png

请帮我!提前致谢

我的源代码:

private function createMain(iniData:Object):Void {
        //Create Album Picture
        /*----- ducldm add 130820 -----*/
        g_Background = g_mc.attachMovie( "mcBackground", "ServiceView_mcBackground" + g_mc.getNextHighestDepth(), g_mc.getNextHighestDepth() -1 );
        /*----- ducldm end -----*/
        g_mcMain = g_mc.createEmptyMovieClip("g_mcMain" + g_mc.getNextHighestDepth(), g_mc.getNextHighestDepth());
        g_mcMain.blendMode = "layer";


        var x_pos:Number = (Stage.width - 802) / 2;
        var y_pos:Number = Stage.height - 200;  

        var arr:Array = new Array();

        g_mcBorderInfo = g_mcMain.attachMovie("mcBorderButton_vip"/*"mcBorderButton_vip"*/, "VideoSubPlayerView_g_mcBorderInfo" + g_mcMain.getNextHighestDepth(), 
                                        g_mcMain.getNextHighestDepth(), { _x:0 , _y:0 } );

        g_mcBorderInfo._x = (Stage.width - g_mcBorderInfo._width) / 2;
        g_mcBorderInfo._y = Stage.height - 200; 

        g_iconSlideBar = new Icon(g_mcBorderInfo, 125, 29, { 
                    URL         :"mcSlideBarMusic_vip",
                    noLabel     : true } );
        g_iconSlideBar._width = 552;


        g_iconSlideBarPlay = new Icon(g_mcBorderInfo, g_iconSlideBar._x + 3,  g_iconSlideBar._y + 2, { 
                    URL         :"mcSlideBarPlayMusic_vip",
                    noLabel     : true } );
        g_iconSlideBarPlay._width = 1;
        g_iconSlideBarPlay._height= 7

        g_tbPlayTime = new TextBox( g_mcBorderInfo, 47, 23, {
                                        color       : 0x040505,
                                        fontSize    : 17,
                                        _width      : 70,
                                        _height     : 20,
                                        align       :"right",
                                        text        : "00:00:00" } );

        g_tbTotalTime = new TextBox(g_mcBorderInfo, 685, 23, {
                                        color       : 0x040505,
                                        fontSize    : 17,
                                        _width      : 70,
                                        _height     : 20,
                                        align       :"left",
                                        text        : coverTimeToString(g_nTotalTime)});


        g_tbLabelInfo = new TextBox(g_mcBorderInfo,(g_mcBorderInfo._width/2)-55 ,0, {
                                        color       : 0x00ffff,
                                        fontSize    : 17,
                                        _width      : 110,
                                        _height     : 22,
                                        align       :"center",
                                        text        : ""} );

        g_tbRepeatShuffle = new TextBox(g_mcBorderInfo,450 , 115, {
                                        color       : 0x00ffff,
                                        align       :"center",
                                        fontSize    : 20,
                                        _width      : 300,
                                        _height     : 30,
                                        align       :"center",
                                        text        : ""    } );
        g_tbRepeat = new TextBox(g_mcBorderInfo, 0 , 0);
        g_tbShuffle = new TextBox(g_mcBorderInfo, 0 , 0);
        g_tbRepeat._visible = false;
        g_tbShuffle._visible = false;
        g_tbRepeatShuffle._visible = false;


        showControlButtons();

    }



    private function showControlButtons():Void {
        g_aIconInfo = new Array();

        // Shuffle
            g_aIconInfo[0] = new Icon(g_mcBorderInfo, 160, 67, { 
            URL         :g_asURLInfo[0],
            noLabel     : true } );
            g_aIconInfo[0].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:0 } );
            g_aIconInfo[0].gotoAndStop(1);

        // Repeat
            g_aIconInfo[1] = new Icon(g_mcBorderInfo, g_aIconInfo[0]._x + g_aIconInfo[0]._width + 15 ,  g_aIconInfo[0]._y + 1, { 
            URL         :g_asURLInfo[1],
            noLabel     : true } );
            g_aIconInfo[1].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:1 } );
            g_aIconInfo[1].gotoAndStop(1);
        // Stop
            g_aIconInfo[2] = new Icon(g_mcBorderInfo, g_aIconInfo[1]._x + g_aIconInfo[1]._width + 15 ,  g_aIconInfo[0]._y , { 
            URL         :g_asURLInfo[2],
            noLabel     : true } );
            g_aIconInfo[2].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:2 } );
            g_aIconInfo[2].gotoAndStop(1);
        // Rev
            g_aIconInfo[3] = new Icon(g_mcBorderInfo, 303, 61.5, { 
            URL         :g_asURLInfo[3],
            noLabel     : true } );
            g_aIconInfo[3].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:3 } );
            g_aIconInfo[3].gotoAndStop(1);
        // Prev
            g_aIconInfo[4] = new Icon(g_mcBorderInfo, g_aIconInfo[3]._x + g_aIconInfo[3]._width -3 , 61.5, { 
            URL         :g_asURLInfo[4],
            noLabel     : true } );
            g_aIconInfo[4].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:4 } );
            g_aIconInfo[4].gotoAndStop(1);
        //Next
            g_aIconInfo[6] = new Icon(g_mcBorderInfo, 418 , 61.5, { 
            URL         :g_asURLInfo[6],
            noLabel     : true } );
            g_aIconInfo[6].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:6 } );
            g_aIconInfo[6].gotoAndStop(1);

        // Fwd*/
            g_aIconInfo[7] = new Icon(g_mcBorderInfo, g_aIconInfo[6]._x + g_aIconInfo[6]._width -4, 61.5, { 
            URL         :g_asURLInfo[7],
            noLabel     : true } );
            g_aIconInfo[7].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:7 } );
            g_aIconInfo[7].gotoAndStop(1);
        // Play-Pause
            g_aIconInfo[5] = new Icon(g_mcBorderInfo, 375.5, 49, { 
            URL         :g_asURLInfo[5],
            noLabel     : true } );
            g_aIconInfo[5].onPress(this, controlHandler, { device:"Mouse", event: "onPress", group:"info", pos:5 } );
            g_aIconInfo[5].gotoAndStop(1);

            // VOLUME  
            g_iconVolume = new Icon(g_mcBorderInfo, 510, 67, { 
            URL         :"mcVolume_vip",
            noLabel     : true } );
            g_iconVolume.gotoAndStop(1);

            g_iconVolumeSlideBg = new Icon(g_mcBorderInfo, g_iconVolume._x + g_iconVolume._width + 5, 73, {
            URL         :"mcVolumeBg_vip",
            noLabel     :true } );

            g_iconVolumeSlideContent = new Icon(g_mcBorderInfo, g_iconVolumeSlideBg._x +1, g_iconVolumeSlideBg._y + 1, {
            URL         :"mcVolumeContent_vip",
            noLabel     :true } );
            g_iconVolumeSlideContent._width = 1;

            g_iconVolumePoint = new Icon(g_mcBorderInfo, g_iconVolumeSlideBg._x, g_iconVolumeSlideBg._y -3 , {
            URL         :"mcVolumePoint_vip",
            noLabel     :true } );

            g_volumeUnit = (g_iconVolumeSlideBg._width - g_iconVolumePoint._width) / 32;

            g_tbVolume = new TextBox(   g_mcBorderInfo, g_iconVolumeSlideBg._x + g_iconVolumeSlideBg._width +2 , 65, {
                                        color       : 0xffffff,
                                        fontSize    : 16,
                                        _width      : 30,
                                        _height     : 30,
                                        align       :"left",
                                        text        : Data.VOLUME} );



            setVolume({event:"not-mute", value:Data.VOLUME});                           
    }
4

1 回答 1

0

尝试

!my_txt.background

其中 my_txt 是项目的名称(例如 g_tbTotalTime) 确保离开!标记

于 2013-09-04T01:35:58.273 回答