> > They are a bit magical. You might want to have a look at:
> > http://www.opaque.net/ming/, which provides an easier to use interface (I'm
> > currently working with the author to contribute the PHP extension code to the
> > php distribution, he's keen on the idea (ie, if you compile --with-swf
> > --enable-ming, you get the mingswf extension, --with-swf or --with-swf
> > --enable-libswf you get the libswf extension)). That library also works with
> > windows and is constantly maintained (whereas Paul Haebaerli's libswf is not
> > maintained anymore...).
> How far away is this?
As soon as he gets around to it.
I sent a nag message :)
> > > I'm probably missing something obvious here.
> > >
> > You are, something obvious, but not intuitive...
> > void swf_definebitmap(int objid, string image_name)
> > Is the prototype for swf_definebitmap(), the first argument (objid) is the
> > object id to use with swf_getbitmapinfo(), etc.
> > ie,
> > <?php
> > // The bitmap id to define the bitmap with, and
> > // then use with the other bitmap functions
> > $pic_id = 10;
> > // Komodo, Rasmus? *LOL*! From phpics.com ;)
> > $pic_location = "korea/0.50/17.jpg";
> > // ...
> > swf_definebitmap($pic_id, $pic_location);
> > // ...
> > $pic_info = swf_getbitmapinfo($pic_id);
> > echo "Size of the bitmap in bytes is: $pic_info[size]\n";
> > echo "Width of the bitmap in pixels is: $pic_info[width]\n";
> > echo "Height of the bitmap in pixels is: $pic_info[height]\n";
> > ?>
> Ok, so I would have expected something like this to work:
> header('Content-type: application/x-shockwave-flash');
> swf_openfile('php://stdout',400, 250, 30, 1, 1, 1);
> $pic = swf_nextid();
> swf_definebitmap($pic, 'php-big.fi');
> swf_placeobject($pic, 1);
> But it doesn't seem to. I'll keep reading. The ming stuff does look a
> lot more intuitive.
The ming stuff is definitely more intuitive...
The libswf is a bit more advanced, though, and it does make sense once you
understand the swf file format...
is an example in c (the api's are nearly the same, except php doesn't support
the sounds)... If you adapt from that you'll see how its done (the resulting
animation is at: http://reality.sgi.com/grafica/flash/test.html)... You can
also check out, http://www.phpbuilder.com/columns/mattern20010111.php3, for a
pretty good tutorial on the flash functions...
Ps: With just a quick look at your code, you need to define a viewing plane
with swf_ortho() or swf_ortho2()...
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]