embed a swf without setting the dimensions?

C

Ciaran

Hi Anyone know how to embed a swf without setting the dimensions width
& height? I mean is there any way they can be automatically detected?
Cheers,
Ciarán
 
N

Neredbojias

Hi Anyone know how to embed a swf without setting the dimensions width
& height? I mean is there any way they can be automatically detected?
Cheers,
Ciarán

Sure. Just feel her a bit and you'll get her to bed in no time quite
proportionally.
 
B

Benjamin Niemann

Greetings,
Hi Anyone know how to embed a swf without setting the dimensions width
& height? I mean is there any way they can be automatically detected?

Not in "pure" HTML. The flash movie would scale to whatever default size the
browser would use, and I don't think any browsers cares to guess the right
size of the movie.
It is possible to extract the suggested size (the one that the movie author
set in the authoring tool) and the set the appropriate WIDTH and HEIGHT
attributes of the OBJECT (or EMBED, if you don't care about validation)
element. But this requires server-side code, e.g. PHP.
If you can use PHP, I could dig up some old code that did this job.

HTH
 
C

Ciaran

Not in "pure" HTML. The flash movie would scale to whatever default size the
browser would use, and I don't think any browsers cares to guess the right
size of the movie.
It is possible to extract the suggested size (the one that the movie author
set in the authoring tool) and the set the appropriate WIDTH and HEIGHT
attributes of the OBJECT (or EMBED, if you don't care about validation)
element. But this requires server-side code, e.g. PHP.
If you can use PHP, I could dig up some old code that did this job.

Cheers for the reply! I know PHP so hook me up if you can!! It'd be
much appreciated!

Ciarán
 
B

Benjamin Niemann

Ciaran said:
Cheers for the reply! I know PHP so hook me up if you can!! It'd be
much appreciated!

grep'ing through piles of ancient code, I couldn't find anything. Now I
think that my memory is confusing me a bit and that what I once did was
porting the relevant bits and pieces from PHP to C#... mmm... long ago...

May be, you could use this one:
<http://phpclasses.linuxpourtous.com/browse/package/1653.html>
Google for "swfheader.class.php" and you should find a version that does not
require a registration to download.


HTH
 
C

Ciaran

Wow! I found it! It's so simple! PHP can read SWF files as images! So
the PHP code to find the width and height of a SWF file is....

<?php
list($width, $height, $type, $attr) = getimagesize("any.swf");

echo "Image width " .$width;
echo "<BR>";
echo "Image height " .$height;
echo "<BR>";
echo "Image type " .$type;
echo "<BR>";
echo "Attribute " .$attr;
?>

If you don't know PHP, this bit of code simply checks the dimensionos
of the swf and prints them out.
Hope that helps someone!

Ciarán
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top