Jump to content
Search Community

Bugreport: ContentDisplay [SOLVED]

Ahrengot test
Moderator Tag

Recommended Posts

Hey Jack!

 

I am working on another video player that implements your awesome VideoLoader, and i noticed some strange behavior.

 

Since you added the fitWidth and fitHeight setters, whenever you call them and thereby call the _update() method in ContentDisplay a new background is drawn in the ContentDisplay on top of the old one instead of replacing it. This means Content Display will report a wrong width/height, dispatch mouse events it shouldn't etc. as the background expands beyond the limits provided by the new width/height.

 

ContentDisplay.as line 110

if (_fitWidth > 0 && _fitHeight > 0) {
graphics.beginFill(_bgColor, _bgAlpha);
graphics.drawRect(left, top, _fitWidth, _fitHeight);
graphics.endFill();
}

 

This fixed it for me:

if (_fitWidth > 0 && _fitHeight > 0) {
graphics.clear();
graphics.beginFill(_bgColor, _bgAlpha);
graphics.drawRect(left, top, _fitWidth, _fitHeight);
graphics.endFill();
}

;)

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