Jump to content
Search Community

VideolLoader and the crop property

Ahrengot test
Moderator Tag

Recommended Posts

Hey Jack!

 

I'm having some trouble with the crop property of the VideoLoader, when it's applied multiple times in a resize method i've set up.

I've always thought ScrollRect's were kind of weird, so i'm not quite sure how to fix it.

 

This is a resize method i have on a class implementing your Video Loader. If if uncomment the _loader.content.crop line things start acting out. I'm assuming it's because the Content Display has a hard time reading the true width/height properties when it's doing it's resizing magic, if a ScrollRect is applied to it's content.

 

The following method is called every time the stage dispatches a RESIZE event.

public function setSize($width:int, $height:int, $scaleMode:String = "proportionalOutside", $hAlign:String = "center", $vAlign:String = "center", $crop:Boolean = true):void 
{
_loader.content.hAlign = $hAlign;
_loader.content.vAlign = $vAlign;
//_loader.content.crop = $crop;
_loader.content.scaleMode = $scaleMode;
_loader.content.fitWidth = $width;
_loader.content.fitHeight = $height;
}

 

Is there anything i can do to fix this, because having the crop option as part of my resize method would be nice.

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...