Page 1 of 1

jpg 2 swf converter

Posted: Tue Jan 03, 2006 5:14 am
by amitshetye
hi all,

i'm using php-ming to convert the jpg to swf. i'm able to convert jpg to swf with that in this case my jpg file is on the local server.
But when i'm trying to convert jpg to swf which is on the web it is not showing me anything.

so what should i do for that??

my code is as follows

Code: Select all

<?php
 $m= new SWFMovie();
 $m->setDimension(53,54);
 $m->add(new SWFBitmap(fopen("http://movies.go.com/images/movies/n/newworld_2005.jpg","rb")));
 
 header('Content-type: application/x-shockwave-flash');
 $m->output();
 $result="&imgLoaded=true&";
 echo $result;
?>
anybody is having any idea??

Posted: Tue Jan 03, 2006 7:02 am
by onion2k
I've answered this over at SitePoint.. in case you missed it there:

Code: Select all

<?php

$image = file_get_contents("http://movies.go.com/images/movies/n/newworld_2005.jpg");
$file = fopen("image.jpg","w");
fputs($file,$image);
fclose($file);

$m= new SWFMovie();
$m->setDimension(53,54);
$m->add(new SWFBitmap("image.jpg");

header('Content-type: application/x-shockwave-flash');
$m->output();
$result="&imgLoaded=true&";
echo $result;
?>