• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Flash, fullscreen mode with flv

New Here ,
May 02, 2009 May 02, 2009

Copy link to clipboard

Copied

Hi,

I have this problem that I need to play a flash website in full screen mode. That runs fine but then I have a link where we have an FLV video component. Whenever I browse to the link having the FLV video, the video goes fullscreen and fills the whole screen. I want the FLV so that it remains at the original video dimensions while I'm at Full Screen. Any suggestions please. Also I have another problem, if I let the video play in full screen, then when I press escape to get out of video it exits the full screen mode as well, how can I exit the video yet not exit full screen mode.

BTW, I've searched the internet and couldn't find any example of flash where we have flv video in full screen mode website.

TOPICS
ActionScript

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 06, 2009 May 06, 2009

Ok, your starting point is to change the line in the HTML that says this:

'scale', 'showall',

to this:

'scale', 'noscale',

Then when the movie goes full screen, the content keeps its original size. In your full screen function you would tell it to go full screen, but also have a listener for the event (read about the event here: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Stage.html#event:fullScreen ). Once the screen is into fullscreen mode, you then get the stage.stage

...

Votes

Translate

Translate
Enthusiast ,
May 02, 2009 May 02, 2009

Copy link to clipboard

Copied

The following is document class file for this site http://www.cybermountainwebservices.com/client0/date/ it plays an flv and maintains aspect ratio.

it also does a pixel dissolve when clicking on one of the buttons just ignore that part just look at the  function fillBG

// com is the instance name of my FLVPlayBack component.
// it is the only thing placed on stage at author time
//btnHolder is a movieclip in the library that holds the
//buttons which are also MovieClips
//initial size of the video 320 X 213 which also the
//initial size of the stage

package
{
    import flash.display.*;
    import flash.display.BitmapData;
    import flash.display.IBitmapDrawable;
    import flash.media.*;
    import flash.events.*;
    import jim.interactive.*;
    import btnHolder;

    public class WebSite extends MovieClip
    {
        var mesolve:Dissolve2; // Dissolve2 lives in jim.interactive
        var holder:btnHolder;
   
        public function WebSite()
        {
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            holder = new btnHolder();
       
        addChild(holder);
       
        var onStage:*;
        onStage = com;
       
        var ratio:Number;
        var rRatio:Number;
       
        ratio = onStage.height/onStage.width;
        rRatio = onStage.width/onStage.height;
        var newRatio:Number;
       
        function fillBG(evt:Event = null):void
        {
           
            newRatio = stage.stageHeight/stage.stageWidth;
            holder.x = stage.stageWidth - (holder.width +25);
            holder.y = 50;
           
            if (newRatio > ratio)
           
                {
                 onStage.height = stage.stageHeight;
                 onStage.width = stage.stageHeight * rRatio;
                }
                else
                {
                  onStage.width = stage.stageWidth;
                  onStage.height = stage.stageWidth * ratio;
                }
        }
        fillBG();
       
        stage.addEventListener(Event.RESIZE, fillBG);
        // ************************* buttons ***************
        this.holder.mcContact.buttonMode = true;
        this.holder.mcContact.addEventListener(MouseEvent.CLICK, gotoContact);
       
        function gotoContact(e:MouseEvent){
        var canvas:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight, false, 0xffffffff);
        canvas.draw(stage);
        var bmp:Bitmap = new Bitmap(canvas);
        addChild(bmp);
        removeChild(com);
       
        mesolve = new Dissolve2(canvas);
        mesolve.addEventListener(Event.COMPLETE, nextPage);
        SoundMixer.stopAll();
        var contact:contactUs = new contactUs();
       
        function nextPage(e:Event):void {
            trace("nextPage");
            addChildAt(contact, 0);
            onStage = contact;
            removeChild(bmp);
            }
        }
    }
    }
}
// ************************ buttons end ************

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2009 May 02, 2009

Copy link to clipboard

Copied

I believe that doghouseJim gave a long answer to the question of how to keep the aspect ratio the same, but you asked how to keep the dimensions the same. If you mean to keep the dimensions the same, what's in the rest of the screen area? Why is there a full screen option at all?

In any case, when you go into fullscreen mode there's an event, read about it here:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/FullScreenEvent.html

With that you could have the video immediately reset itself back to its original dimensions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2009 May 05, 2009

Copy link to clipboard

Copied

Thanks for answering. Please see this link. http://cid-4f714b6030b4f8b6.skydrive.live.com/embedrowdetail.aspx/Public/sample/sample.zip and download the sample. I've not worked with video or AS3 before so just struggling with the code. I need to play the video so that it does'nt fill the whole screen and stay at its normal dimension when I switch to fullscreen mode.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 05, 2009 May 05, 2009

Copy link to clipboard

Copied

Can you explain how to use this link? When I click to download the zip, the page just reloads with another doubleclick ad:

http://cid-4f714b6030b4f8b6.skydrive.live.com/embedrowdetail.aspx/Public/sample/ sample.zip

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2009 May 06, 2009

Copy link to clipboard

Copied

Tried another file sharing method. Its nothing special the sample, but seeing is believing

http://www.4shared.com/file/103692390/50b2e239/sample.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 06, 2009 May 06, 2009

Copy link to clipboard

Copied

Ok, your starting point is to change the line in the HTML that says this:

'scale', 'showall',

to this:

'scale', 'noscale',

Then when the movie goes full screen, the content keeps its original size. In your full screen function you would tell it to go full screen, but also have a listener for the event (read about the event here: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Stage.html#event:fullScreen ). Once the screen is into fullscreen mode, you then get the stage.stageWidth and stage.stageHeight , and relayout your elements in the positions and sizes that you want.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2009 May 06, 2009

Copy link to clipboard

Copied

LATEST

Thanks a lot man. I finally figured that 'scale','noscale' is not only stretching my interface but also causing the video to go fullscreen. So just to make the interface to fill the whole screen, I have to stretch it myself w.r.t. the stage width and height property.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines