Welcome to WebmasterWorld Guest from 54.166.107.51

Forum Moderators: open

Message Too Old, No Replies

How to get .swf file's Height and Width

     
7:48 am on Jul 31, 2005 (gmt 0)

New User

10+ Year Member

joined:July 31, 2005
posts:4
votes: 0


How to get .swf file's Height and Width in C# or VB.net Program.Because I want to Load dynamicly a .swf file in my program with Flash File current size.
9:29 am on Aug 1, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0


Welcome to WebmasterWorld, ydmyongan!

The width and height of a flash object are set in the (x)HTML code. These can be accessed using JavaScript:


flashObject = document.getElementById('flashObjectID');
flashWidth = flashObject.width;
flashHeight = flashObject.height;

You need to do this at the client side, rather than at the server side, as there is no real access to the DOM from the server side.

HTH

9:01 pm on Aug 1, 2005 (gmt 0)

Full Member

joined:May 29, 2005
posts:287
votes: 0


yep but he's referring to accessing flash in a c+ programme not via a browser or XHTML
10:23 am on Aug 2, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0


Yep, I realise that. And unfortunately to the best of my knowledge there is no way of doing this. The flash object does not get a width or a height until the browser rendering engine assignes it when the page is being renderered.

Even if a flash developer gives the move canvas certain dimensions, that does not mean that those will be the sizes that the movie is rendered at.

4:01 pm on Aug 3, 2005 (gmt 0)

New User

10+ Year Member

joined:Apr 3, 2005
posts:26
votes: 0


Hi -
Open it in the Flash Player and use something
like MW Snap to get a screenshot of the window.
Crop out the menu, etc. and the resulting dimensions
of that image should be close enough for you to use.

Newbie Suggtn.,
El

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members