resizing flv component in as3

Posted on 2009-02-15
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

Question by:deluxas
    1 Comment

    Accepted Solution

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
    This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now