Corner Of The Genius
Sas Jacobs is an Australian web developer specialising in web applications  training and Develop ment. She interested in using Flash with dynamic content and She have presented at a numerous International conferences relating to applications development,  XML and  scripting components. She edited the book (Flash MX 2004 Accelerated) as well as books on adobe  Photoshop and  Illustrator. She have a nice flash business web site at http://www and a personal web site at
Mark Galer is  a seniorr  lecturer in Digital Imaging i photography at the Royal Melbourne Institute of University on the BA Photography program ,, and has published six titles for the International publisher (Focal Press) - -  ranging from location photography through to Photoshop skills and . Digital Imaging . He has a good commercial background in editoria; photography and is currently  contributor to magazines in the  Australia USA, and the UK. He is an Adobe beta tester for Photoshop and Photoshop Elements, he is  considered as one of the leading lecturer in Photoshop training and has been appointed as an Ambassador for Photoshop training in Australia.


UR Learn Tutorials
Templates of the week
$$::Flash Creator: Part 1
In this tutorial you will learn how to create a PHP Script that will enables users to create flash movies from a their texts. the user will enter any text and then choose one from multiple flash movies and then the script will enter the text into the selected flash movie, we will use PHP and Swishmax.. Try Script Here
Top Tutorial
Create a realistic stony text using Photoshop by the easiest way. you will get fine  end.

Our script consists of  two parts the first one depends on PHP the second depends on Swishmax .
We will use PHP to get the text entered by the user  then typing this text in a text file. then we will use Swishmax  to create a flash movie contains a text But the flash movie get that text from the text file created by PHP.
PART 1 (PHP Part):
We will start from a point in which we have a flash contains animated text and this flash get the text from a text file housing besides them (i.e. if we change the text in the text file  it will be changed in the flash )
Download this example from here  And we will learn in the part 2 how to create this types of flashes using PHP.
Now you have SWF  file named "tiger.swf" and a text file named "nametext.txt". The SwF file displays a text "" and this text is typed in the text file. Don't be worry if you don't understand the mechanism of working as we will learn how to create this type of flash using Swishmax.
NOTE that 2files must be in the same folder.
Enter a text:
Create a new PHP Page  name it "enteratext.php"
write the following code in the page.
<p> Please Enter A text:</p>
<form action = "choose.php" method="post">
Enter Text :
<input name="name" type="text" value="">
<input type="submit" name="submit" value="Proceed" /></p>

Now we should enable user to choose one from multiple movies. So we will create "choose.php" Page which contains multiple flash movies that user can choose from.
We have one movie  "tiger.swf" So we will embed it in this page until we we create multiple movies.
Put the following code in the "choose.php".
<p>Please Choose any one and then Press Continue </p>
<p><form method='post' action='createflash.php'>
<input type="radio" name="selected" value="tiger.swf"/>
<object width="278" height="147">
<param name="movie" value="tiger.swf">
<param name="quality" value="High">
<embed src="tiger.swf" name="obj1" width="278" height="147">
<br />
<input type="hidden" name="text" value="<? echo $text ?>"/>
<input type="submit" name="submit" value="Continue"/>
NOTE that we got the value of the text that entered by user and saved this value in the $text variable.
the radio button will store the name of the flash So we must put each radio button beside its flash and change the radio value to the path of the flash ("tiger.swf" in this case).
we create a hidden input to save the text that entered by the user and which saved in the $text  variable.
When the user choose his template and press "continue" button we must copy the selected flash file with its text file and put them in a new directory the we must replace the text in the
"nametext.txt" file by the text entered by the user in the "enteratext.php" page and which we saved it in the hidden input.
Create Flash:
Create a new page and name it "createflash.php"
Firstly: we will need to retrieve 2 values;
the 1st is the name of the template flash movie selected by the user.
the 2nd is the text entered by the user.
to retrieve the these values Write this code in the "createflash.php"
now we must create a new directory  to copy the flash and its text file to it. but firstly we should create a new folder which will contain all directories that will be created So create a new folder and name it "all".
And Also we must determine a name for the new directory i will use the time( ) function to generate names for directories.
Add this chunk to below the previous code of "createflash.php"
if (isset($flash))
$dirname=time( );
Now we will copy the selected flash movie and the "nametext.txt" file to the created dir.

copy($flash, $dir.$flash);
copy("nametext.txt", $dir."nametext.txt");
After that we must change the text in the text file to the text entered by the user. but Note that when we write the text we must write "&name= " before it and  "&"  at the end . (we will explain this)
$fp=fopen($dir."nametext.txt", "w");
fwrite($fp, $text);
After that we should print the link of the created flash to the user
echo "Congratultion..!!<br>This is your flash:<br>";
echo "<a href='".$dir.$flash."'>"."click here"."</a>";
}//the end of if

The End   
              Dr Smith


Home | Site map | Autoplay | Photoshop | Dreamweaver | Swishmax | Web design | Contact                       Rights reserved