简体   繁体   中英

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 frame 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;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM