1 Replies - 2751 Views - Last Post: 14 April 2013 - 01:30 AM

#1 Emiloly  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-April 13

Making FLV player toggle full screen inside full screen projector

Posted 14 April 2013 - 01:02 AM

My Problem:
I have a Flash presentation that launches from a USB stick. It opens in full screen mode, which has a button for the user to toggle between fullscreen mode and back. This works great and I'm happy with it.
However I want to be able to load an FLV player to play a how to video inside the fullscreen player which the user can toggle to full screen and back without taking over the whole stage, and my full screen toggle button.
I know I can set the fullscreen take over to false ie myVideo.fullScreenTakeOver = false; however I still want the video to have the ability to go full screen.

I have developed a bit of a hack, but it's messy and doesn't work with the finesse I was hoping this project would have.

This is my 'hack':

stage.addEventListener(Event.FULLSCREEN,f);

function f(e:Event){
if (myVideo.playing == true) {
myVideo.fullScreenTakeOver=true;
} else {
myVideo.fullScreenTakeOver=false;
}
}



I am using the FLV component in flash. I know I can create my own and make my own fullscreen button but I am not sure how this is going to help me. I've already wasted far too much time trying to figure this out so any advice or even a finger point in the right direction would be much appreciated!

I've made many google searches and read what feels like hundreds of articles and threads but not found an answer to my problem. I have an intermediate knowledge of Action Script 3. Currently this is what my script looks like.

Current Action Script:
stop();

//       AllowScale
import flash.display.StageScaleMode 
stage.scaleMode = StageScaleMode.SHOW_ALL;

//      Open in fullscreen 
fscommand("fullscreen","true");
fscommand("allowscale", "true");
fscommand("maximize", "true");
import flash.display.StageDisplayState;
stage.displayState = StageDisplayState.FULL_SCREEN;

//      Screen Toggle						
ScreenToggle.setLabel("Full Screen on/off");

ScreenToggle.addEventListener(MouseEvent.CLICK, toggleFullScreen2);

function toggleFullScreen2(event:MouseEvent):void
{
	if (this.stage.displayState == StageDisplayState.FULL_SCREEN)
		this.stage.displayState=StageDisplayState.NORMAL;
	else
		this.stage.displayState=StageDisplayState.FULL_SCREEN;	
		this.stage.displayState=StageScaleMode.EXACT_FIT;
}

function onFullScreen(fullScreenEvent:FullScreenEvent):void
{
	var bFullScreen=fullScreenEvent.fullScreen;
	if (bFullScreen)
	{
			
	}
	else
	{
		
	}
	this.textField.text=this.stage.displayState;		
}

stage.addEventListener(Event.FULLSCREEN,f);
 
function f(e:Event){
   if (myVideo.playing == true) {
        myVideo.fullScreenTakeOver=true;
    } else {
        myVideo.fullScreenTakeOver=false;
    }
}

// 		Importing the video package
import fl.video.*;

var myVideo:FLVPlayback = new FLVPlayback();
	myVideo.source = "videos/video2.flv";
	myVideo.skin = "SkinOverAllNoCaption.swf";
	myVideo.x = 0;
	myVideo.y = 0;
	myVideo.width = stage.stageWidth;
	myVideo.height = stage.stageHeight;
	myVideo.skinBackgroundAlpha = 0.5;
	myVideo.skinAutoHide=true;
	myVideo.skinFadeTime=300;
	myVideo.skinBackgroundColor = 0x333333;
	myVideo.autoPlay = false;

addChild(myVideo);

//Funtions on video when it completes
function completeHandler(event:VideoEvent):void
{
   removeChild(myVideo);
   nextFrame();
   }
myVideo.addEventListener(VideoEvent.COMPLETE, completeHandler);



Thanks in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: Making FLV player toggle full screen inside full screen projector

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9215
  • View blog
  • Posts: 34,612
  • Joined: 12-June 08

Re: Making FLV player toggle full screen inside full screen projector

Posted 14 April 2013 - 01:30 AM

Duplicate post.. closing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1