Jump to content
xisto Community
Sign in to follow this  
logophobia

Need Help Generating Flash Movie With Ming Library Please?

Recommended Posts

I am doing a school project and the guy I am doing it with want some animations. Since gif animations are not supported by php (patent trouble) I had to make a flash movie. I allready have the basic code and stuff but the images I try to import in my flash movie don't show. I am trying to use a gameboard as background for the movie. After the TODO comment I am going to edit the image so I get an animation, but first things first so this is my code:

<?php//invoer://array met posities van de huizen $huis//array met posities van de hotels $hotel//array met posities van de spelers $speler//begin en eindpositie van de bewegende pionen $begin en $eind//mp3 om te spelen $mp3//nieuwe sprite (bewegend plaatje)$sprite = new swfSprite();//loop door de framesfor($x = $begin; $x <= $eind; $x++){	//laad plaatje	$image = imageCreateFromJpeg('images/monopoly.jpg');	//TODO: tekenen huizen, pionnen, animatie etc.	//voer image stream uit en buffer het	ob_Start();	imageJpeg($image);	$buffer = ob_Get_Contents();	ob_End_Clean();	//voeg image toe aan shape	$frame = new swfShape();	$bmp = new swfBitmap($buffer);	$frame->addFill($bmp);	//voeg het frame toe aan het filmpje en ga naar het volgende frame	$sprite->add($frame);	$sprite->nextFrame();}//voeg de sprite toe aan een filmpje$movie = new swfMovie();$movie->add($sprite);//bewerkt filmpje voor uitvoer$movie->setBackground(255, 255, 255);$movie->setDimension($bmp->getWidth(), $bmp->getHeigth());if(isset($mp3)){	$movie->streamMp3(file_get_contents($mp3));}//voer flash uitheader('Content-type: application/x-shockwave-flash');$movie->output();?>

Sorry for the comments, don't have time to translate them. Can anyone tell me how to get this working? I get a flash movie outputted but it's blank. Thanx in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.