otherwise the animation won't be displayed properly (it will show nasty stuff on right and left or just won't look good).
I have loads of swf files I need to get this somehow automated. There has to be a way to either get the around this problem or to somehow "detect" the swf dimensions.
Is there any "trick" for this?
I'm using PHP and GNU/Linux.
Name:
Anonymous2007-04-29 14:13 ID:tc7k3mK4
>Hi everyone.
>I'm using PHP and GNU/Linux.
sorry but is that even relevant to the topic, or is it just your way of saying "Ive read GNU/Linux"?
Name:
Anonymous2007-04-29 14:22 ID:a78rIU2Q
OP here.
>>2
"Hi everyone." - because "it's nice to be nice"
"I'm using PHP and GNU/Linux." - because I would prefer to get this done somehow in this environment. I think it's relevant to the topic.
Anyway, I found something but it requires VBScript and ASP which I do not want to use.
No one likes a website with loads of swf files.
You might try a macro though or if the dimensions you want are somewhere in the file, use awk on it and get some raw data like "filename xxx yyy" and convert that to your embed tags.
What I meant is I have a lot of flash movies from various sources and it would take too long to go through all of them manually. I'll get them displayed one at a time, no worries. :-)
>if the dimensions you want are somewhere in the file, use awk on it and get some raw data
The problem is I don't know which bytes of swf contain the dimensions, otherwise I'd write some util myself.
Anyway. I installed Data::TemporaryBag and SWF::BinStream::Codec as >>8 suggested.
I checked the manual and it looks like it does provide a way to check the values I'm looking for:
$xmin, $ymin, $xmax, $ymax:
Boundary rectangle size of frames, ($xmin,$ymin)-($xmax, $ymax), in TWIPS(1/20 pixels).
Now, I'm not THAT good (yet) at perl. Thanks for your advice >>8 and sorry if I'm asking for too much but can you paste a "hello world" type example for total nubs showing how to use it? I'll try to look it up on the net now btw.
Your amazing wit astounds me, to the point that I don't know if I should laugh or not.
Name:
Anonymous2007-04-29 16:47 ID:efJe8HM+
Getting the dimensions involves zlib decompression and some slight bit manipulation. It's not that difficult. If you think you can figure that out, get the swf spec (Google).
OP here I think I found the best and easiest solution for me.
There's a deb package called "swftools". One can obtain it and install it easily on a Debian based GNU/Linux operating system by typing
apt-get install swftools
So what I'm doing is for every swf file on my page I'm executing this system command via php:
$swfdump somefile.swf -X -Y
...and it returns me the specs I need. Yay! Later I'll create a database or something for this to not to overload the cpu.
>>8 may be useful once I learn to perl, atm I'm not too good at it.
Thanks everyone for posting and bye.
Name:
Anonymous2007-05-01 10:29 ID:8h/tSBXv
1. Get the file format specifications http://www.wotsit.org/list.asp?search=swf&button=GO%21
2. Study it
3. Open the file for binary reading, seek to the offset containing what you need and read it.
4. ???
5. SEGFAULT
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy