Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1980
  • Last Modified:

resizing flv component in as3

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

1 Solution
deluxasAuthor Commented:
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now