开发者

Posterframe on fullscreen Flash video

I have a flash video using the FLVPlayback 2.5 container with a customized skin, but nothing crazy I just copied and and changed some colors of an existing skin. I'm using FlashVars to pass in the video location and have a poster fr开发者_如何学编程ame for a "play" button centered on the video. When you click the screen the poster goes away and comes back when the video ends or it is stopped. All of this works just fine unless it's in full screen. When it goes into fullscreen I can't see the poster frame. I don't know what's going on. When it comes back down to normal size the code is working.

I've tried different ways of setting the x, y, width and height, but nothing works. Do I need to set the depth as well??

stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullscreen);
function onFullscreen(e:FullScreenEvent):void {
    myTxt.txt_txt.text = e.fullScreen;
    // check if we're entering or leaving fullscreen mode
    if (e.fullScreen) {
        //myTxt.x = 0;
        myTxt.y = myVideo.y - 100;
        myTxt.x = myVideo.x - 100;
        myTxt.width = stage.width;
        myTxt.height = stage.height;
        myTxt.visible = true;

    } else {
        myTxt.x = 100;
        myTxt.y = 100;
        myTxt.width = 380;
        myTxt.height = 136;
    }
}


Hum... have you tried this :

if (e.fullscreen) {

    video.addChild(myTxt);
}

or this :

if (e.fullscreen) {

    video.visible=false;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜