We help IT Professionals succeed at work.

resizing flv component in as3

deluxas asked
Medium Priority
Last Modified: 2013-11-11
I'm having an issue with a custom video player I'v made in AS3.  Basically, It uses the flv playback component, and will be used to display flv's of various sizes.  I have coded it so it takes two paramaters from a query string, a width and height.  The width of the flvplayback component is set to be the width of the whole flash movie, and this works fine.  The height, however, I am try to set by doing the following.  I get the height value provieded from the html, take 30 away from it (30 being the height of the controls) and try to set it this way.  However, its not working as I expected.  When I attempt to resize in this way it traces out that it is setting the correct height, but when I measure using a screen measure tool, I see that its not correct.  I'm not sure whether setting the scalemode on the flv playback component could be causing this, or is it because my whole flash movie is set to be a standard size in its document properties and being set to a different size in the html.  Any advice appreciated, thanks

The fragment I was using to try and resize is in the code section
flvplaybackinstance.height = heightfrompage-30;

Open in new window

Watch Question

can I just ad, I found a similar post where someone was trying to do similar in AS2.  They were advised to make their fla document the sixe of the largest video that the player is intended to play.  I have done this and am testing it out on a large flv.  However, I'm wondering, should this scale correctly when I provide smaller width and height and smaller videos, or will I have to write code to resize for numerous dimensions?
Many thanks

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.