Jump to content
Search Community

problems with VideoLoader and crop

Eckstein1 test
Moderator Tag

Recommended Posts

I load a video with VideoLoader and it works just perfect, but if I set "crop=true" the video and it's background are flickering around. The video seems to pause and the performance of the whole animation turns bad.

 

The attached code shows what I'm talking about. It loads the same video twice, uses the same parameters - except crop(, width, height and onComplete).

 

import com.greensock.*;
import com.greensock.loading.*;
import com.greensock.events.LoaderEvent;

var video1:VideoLoader = new VideoLoader("videos/video1.flv", {name:"video1", container:this,
width:200, height:200,
bgColor:0xff0000, crop:true, hAlign:"center", scaleMode:"none", vAlign:"center"});
var video2:VideoLoader = new VideoLoader("videos/video1.flv", {name:"video2", container:this,
onComplete:videoLoaded,
bgColor:0x00ff00, crop:false, hAlign:"center", scaleMode:"none", vAlign:"center"});
video1.load(), video2.load();

function videoLoaded(e1:LoaderEvent):void {
video2.content.width=video2.content.height=200, video2.content.x=200, video2.content.y=0;
}

 

The "onComplete" is just used to set the second video side by side with the first using the same size.

 

What am I doing wrong using the parameters of the VideoLoader?

Thanks for your support and kind regards,

Uli

Link to comment
Share on other sites

Thanks greensock for your immediate reply.

Yes, I'm using the latest version of LoaderMax. As a development system I'm using Flash CS5 (11.0.2.489) and it's integrated version of Flash Player 10.

 

The following attachment includes everything you need to generate the effect. I just did double check and I'm able to reproduce it with exactly these files:

example.zip

Thanks again for your great tool and support :D

Link to comment
Share on other sites

Ah yes, thanks for putting that example together. It was quite helpful in quickly identifying the issue which is fixed now in LoaderMax version 1.871 (it was a minor change to ContentDisplay). Sorry about the hassle. Just update your GreenSock classes and you should be good to go.

 

Link to comment
Share on other sites

Thanks again greensock for your immediate reply.

I just did check the latest version 1.871 and it works perfectly.

If I'm able to support your great work by pointing on such minor issues it's compared with what you are doing just nothing.

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