简体   繁体   English

全屏海报框架 Flash 视频

[英]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.我有一个使用 FLVPlayback 2.5 容器和自定义皮肤的 flash 视频,但我只是复制并更改了现有皮肤的一些 colors 并没有什么疯狂的。 I'm using FlashVars to pass in the video location and have a poster frame for a "play" button centered on the video.我正在使用 FlashVars 传递视频位置,并为视频中心的“播放”按钮设置一个海报框架。 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.我尝试了不同的方法来设置 x、y、宽度和高度,但没有任何效果。 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;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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