如何在jwplayer上进入全屏模式时防止重复的精灵

时间:2014-01-22 12:08:59

标签: fullscreen jwplayer

我已经使用actionscript3为jwplayer5创建了自定义社交插件,但是当进入全屏时myClip Sprite加倍。我怎么能阻止这个?我有一个全屏模式的事件,我试图根据屏幕分辨率更改x和y位置,但它没有帮助。我仍然看到两张myClip精灵,如图here

此外,在我离开全屏双倍精灵离开播放器后,如果我再次全屏显示,那么我会看到3个精灵。它会在每次全屏后倍增。

这是我创建myclip精灵的代码

private function shareBar():void {

        myClip = new Sprite();
        myClip.graphics.beginFill(0xFFFFFF, 0.2);
        myClip.graphics.drawRect(0, 0, 45, this.pHeight);
        myClip.graphics.endFill();
        myClip.x = this.pWidth;
        addChild(myClip);

        var _player:Stage = RootReference.stage;
        _player.addEventListener(MouseEvent.MOUSE_OVER, this.mOver);
        _player.addEventListener(Event.MOUSE_LEAVE, onMouseLeave);
        _player.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
        stage.addEventListener(FullScreenEvent.FULL_SCREEN,fullscreenCall);

        var fb:SimpleButton = new FBbtn();
        fb.name = "fb";
        fb.y = 5;
        fb.x = 5;
        myClip.addChild(fb);
        var tw:SimpleButton = new TWbtn();
        tw.name = "tw";
        tw.x = 5;
        tw.y = 45;
        myClip.addChild(tw);
        var gp:SimpleButton = new Gbtn();
        gp.name = "gp";
        gp.x = 5;
        gp.y = 85;
        myClip.addChild(gp);
        myClip.addEventListener(MouseEvent.CLICK, this.btnClick);
    }

0 个答案:

没有答案