dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: flv dimensions?

  1. #1
    An Average User warpdesign's Avatar
    Join Date
    Apr 2002
    Location
    Southern California
    Posts
    331

    flv dimensions?

    Is there a way to figure out the dimensions of an flv file?
    You know what they say:
    Teach a man to fish and you feed him for a lifetime.
    Unless he doesn't like sushi—then you also have to teach him to cook.

  2. #2
    Junior Member
    Join Date
    May 2008
    Posts
    5
    when you load the FLV, it will take the first 3 frame before you can get the dimensions of the movie.

    I named the flv player mc_player you can do this:

    script you can put in timeline:

    i=0;
    mc_player.onEnterFrame = function() {
    i++;
    if(i==4)
    {
    flvwidth = mc_player._width;
    flvheight = mc_player._height;
    }
    }

    flvwidth, flvheight are the dimensions of the flv movie.
    I tried reading the dimensions before loading, but with no results, it first needs to be loaded before you can get those properties.

  3. #3
    Junior Member
    Join Date
    Aug 2007
    Posts
    5

    just a little more elaboration on that code please...

    thanks!


    Alternatively....
    If i use the video wizard to open the flv into flash by file >open, then when you hit finish, you can then select the movie on the stage and view it's own dimensions separate from the movie, is this an accurate way of determining flv size instead??

  4. #4
    Junior Member
    Join Date
    May 2008
    Posts
    5
    Quote Originally Posted by elamberdor
    thanks!


    Alternatively....
    If i use the video wizard to open the flv into flash by file >open, then when you hit finish, you can then select the movie on the stage and view it's own dimensions separate from the movie, is this an accurate way of determining flv size instead??

    Yes, I thoughed you where refering to dynamicly loading a FLV, if you only need to know the dimensions when still in the flash editor, your option is much faster .

    You could always do a check if the dimensions are correct, by setting the flash movie according to the dimensions of the movie, that way you can check if it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center