Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorTravisTX
    • CommentTimeDec 30th 2007
     
    Is there any way to allow SWFObject to get it's dimensions from the dimensions of the swf file? I have tried putting empty quotes for width and height in the javascript code. This appears to work in Firefox, but not IE. I am writing a page that will dynamically load a swf file, and the files could have different dimensions. Thanks for any advice.

    Travis
    • CommentAuthorAran
    • CommentTimeJan 1st 2008
     
    Travis.

    I am not aware of a solution which can work out the dimensions for you. You can just have a wrapper function in which you pass the file url and the intended dimensions to make it easier to set up multiple calls.

    Aran
    • CommentAuthorundersiege
    • CommentTimeJan 10th 2008
     
    php can do it:

    list($width,$height) = getimagesize("swffile.swf");

    It's the same as the method you use to get image dimensions.
    • CommentAuthorAran
    • CommentTimeJan 10th 2008
     
    @undersiege - cool. I didn't know that. Do you have to have GD library or something installed? Can the function read the swf header info from all flash versions (FP 9 / AS3 included)?
    • CommentAuthorundersiege
    • CommentTimeJan 19th 2008
     
    Best to have a look on php.net about that, I think (or just give it a whirl)