full screen event for Video display

196 views
Skip to first unread message

arunvallappan

unread,
Nov 6, 2007, 6:26:57 PM11/6/07
to Flex India Community
Hi,
i am developing a video sharing application.
like in you-Tube, i want to see the video in full screen( just the
video ).
now, i am able to switch the whole application to fullscreen mode,
using the following code..(its working perfectly)

private function toggleFullScreen():void {
try {
switch (Application.application.stage.displayState) {
case StageDisplayState.FULL_SCREEN:
Application.application.stage.displayState = StageDisplayState.NORMAL;
break;
default:
Application.application.stage.displayState =
StageDisplayState.FULL_SCREEN;
break;
}
} catch (err:SecurityError) {
// ignore
}
}

but how do i take just the video player(video display) to full
screen??

Thanks in advance
arun

Ajay k

unread,
Nov 6, 2007, 11:43:14 PM11/6/07
to flex_...@googlegroups.com
Hi Arun ,

Raghu has written an nice article making full screen video Application
http://raghuonflex.wordpress.com/2007/03/06/my-full-screen-video-app-ver-10/


With Regards,
Ajay K
--
Ajay K

Abdul Qabiz

unread,
Nov 7, 2007, 3:39:41 AM11/7/07
to flex_...@googlegroups.com
stage.fullScreenSourceRect = new Rectangle (100,100,320,240);
stage.displayState = "fullscreen"; //StageDisplayState.FULL_SCREEN

You need to pass the rect (x,y width and height) of the area, you want to scale... In this case, you can find the x,y and width/height of your video in normal mode, set the rect and then change the mode..

-abdul
--
-abdul
---------------------------------------
http://abdulqabiz.com/blog/
---------------------------------------

arunvallappan

unread,
Nov 7, 2007, 12:21:41 PM11/7/07
to Flex India Community
thanks a lot :)

best regards,
arun


On Nov 7, 9:39 am, "Abdul Qabiz" <abdul.qa...@gmail.com> wrote:
> stage.fullScreenSourceRect = new Rectangle (100,100,320,240);
> stage.displayState = "fullscreen"; //StageDisplayState.FULL_SCREEN
>
> You need to pass the rect (x,y width and height) of the area, you want to
> scale... In this case, you can find the x,y and width/height of your video
> in normal mode, set the rect and then change the mode..
>
> -abdul
>

> On Nov 7, 2007 10:13 AM, Ajay k <ajaykempa...@gmail.com> wrote:
>
>
>
> > Hi Arun ,
>
> > Raghu has written an nice article making full screen video Application

> >http://raghuonflex.wordpress.com/2007/03/06/my-full-screen-video-app-...
>
> > With Regards,
> > Ajay K

Arulmurugan

unread,
Jul 25, 2011, 5:11:28 AM7/25/11
to flex_...@googlegroups.com
Hi Abdul,

The following code  is not working

var vidX:Number,vidY:Number,vidWidth:Number,vidHeight :Number;
vidX = videoDisplay.x;
vidY = videoDisplay.y;
vidWidth = videoDisplay.width;
vidHeight = videoDisplay.height;
stage.fullScreenSourceRect = new Rectangle (vidX,vidY,vidWidth,vidHeight);
stage.displayState = "fullscreen"; //StageDisplayState.FULL_SCREEN

Arulmurugan

unread,
Jul 25, 2011, 5:14:13 AM7/25/11
to flex_...@googlegroups.com
Hi Arun,

Do you have the sample code. I am using Flex 4.5

Siddharth Shukramani

unread,
Jun 21, 2012, 7:59:45 PM6/21/12
to flex_...@googlegroups.com
Hey Arul,

I've been having the same problem and was wondering if you found a solution. Your help would be very much appreciated. 

Thanks and Regards,
Siddharth Shukramani
Reply all
Reply to author
Forward
0 new messages