junky Posted May 24, 2011 Share Posted May 24, 2011 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 More sharing options...
junky Posted May 24, 2011 Author Share Posted May 24, 2011 Ok I think this is the trick: video1.content.rawContent.width Link to comment Share on other sites More sharing options...
GreenSock Posted May 25, 2011 Share Posted May 25, 2011 Ok I think this is the trick: video1.content.rawContent.width Bingo. Or just video1.rawContent.width. Either way Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now