Jump to content
Search Community

fitWidth question

junky test
Moderator Tag

Recommended Posts

So in my loader I define the size of a video file... width:stage.stageWidth, height:stage.stageHeight, scaleMode:"proportionalInside", hAlign:"left", vAlign:"top"

 

And in my stage listener I have code the sets the fitWidth and fitHeight. It works as it should. I love it.

 

But I'm wondering if there's a way to get the file's actual dimensions? Because with proportionalInside the file fits in the space defined maximizing either height or width, but even though the width is set to stage.stageWidth if the height doesn't allow it it's width is actually less than stage.stageWidth. So code:

 

in my stage resize function:

 

video1.content.fitWidth = swfWidth

video1.content.fitHeight = swfHeight

 

trace(video.content.width, video.content.height) // THESE just return the stage.stageWidth and height even if the actual video isn't that width.

 

 

I'm looking to get the actual displayed width.

 

Any ideas?

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