/*If you are looking to do some simple interaction between Flash MX and php,here is an extremely basic model to get you started. The Flash file has a simpleInput Text field which allows the user to enter text (ie a textbox). The flash then passes the textfield to the php script for processing/database interaction etc.

The idea is a form made in Flash, but processing by php/mysql (or whatever). If you wantto handle all GUI in Flash, see the links below for more info.

All "Actions" or "Action Script" located in frame 1, layer 1.In Flash, create an Input Box with an instance name of myTextBox.Create a "submit button" using Insert>New Symbol>Movie Clip.Dont use the PushButton Component or you will have to addscripting to that component (ie outside Frame1 Layer1). Keeping all the Action Script in Frame1 makes for a simpler example.

Next, click on the background in Frame1 (the "Properties" dialogshould show the Background color). Hit F9 to show actions for Frame1.Enter the below code:*/

//In quicktime, movies may be exported as jpeg or png
//This object will convert any movie that has been saved as a group of images into
//an swf file. The frame rate and other attributes can be controlled

$path = "my_movie_dir"; //relative path to the jpg/png or bmp files
$frame_rate=30; //frame rate of the flash movie
$quality=50; //image quality during conversion (only valid if not jpeg)
$skip_rate=5; //how many frames to skip
set_time_limit("600"); //this could take some time

$converter=new images_to_swf($path,$frame_rate,$skip_rate);

//$converter->convert_images(70); //Use this if using non jpeg files or decreasing the quality

$converter->make_movie();//Make the movie

//Do two things with it
$converter->save_movie("my_movie_dir/my_movie.swf");
$converter->output_movie();