Jump to content
Search Community

cannot find the right fullScreenSourceRect (w/ LiquidStage)

battlejoyce test
Moderator Tag

Recommended Posts

hello all greensockers ;)


I have a video nested into some other movieclip and I want it to go to full screen mode (with hardware scale).

So I have to find the rectangle that fits the video to scale it.

But I cannot find the right coordinates and dimensions for this f*****g Rectangle. :x


- I have this :


var ls:LiquidStage = new LiquidStage(this.stage, 1680, 920, 1010, 548);


- and this :


var area : LiquidArea = new LiquidArea(stage, 0, 0, 1680, 920);		
area.attach(stage.getChildAt(0), ScaleMode.PROPORTIONAL_INSIDE, AlignMode.CENTER, AlignMode.CENTER);


- and in a nested movieclip


var screenRectangle:Rectangle = new Rectangle(	xR, 
stage.fullScreenSourceRect = screenRectangle; 
stage.displayState = StageDisplayState.FULL_SCREEN;


So, what values for xR, yR, wR and hR ?


I tried :

p = new Point(myVideo.x, myVideo);
p = myVideo.localToGlobal(p);
xR = p.x;
yR = p.y; 


and :


xR = stage.getChildAt(0).scaleX * myVideo.x;
yR = stage.getChildAt(0).scaleY * myVideo.y; 


but both don't fit.


Am I missing something ? It is to much for my exhausted mind ?


thanks in advance :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...