Record Internet Radio with Tags - Mortgage Calculator - Loans - Loans - Loans

PDA

View Full Version : Flash & PHP Project help


movidalatina
Feb 5th 2008, 12:24 am
Hello, I hired a graphic designer do an interactive flash
project for me, where the user can go to the site and
upload his/her favorite pic and the end result is that the pic
is now part of the flash. and so that users flash can now
be seen at http://mysite.com/?code=12323433 OK, what
i need to do is, give the user an html code he/she can copy
and put up on their myspace/facebook or whatever. any info
would be appreciated.

Kaizoku
Feb 5th 2008, 12:58 am
Just use a swf embed with flashvars generated by php.

ToddMicheau
Feb 5th 2008, 8:20 am
Elaborating on Kaizoku's response, when the user uploads the image store the path to the image as well as their userid inside of an sql table. Then create a php script that retrieves the user id through GET variables, it then query's the sql table and retrieves the image path. Once you have the image path php will echo something like:

imagePath=http://yoursite.com/uploads/432342.jpg

Then using flash's loadVars() function query your php script like:

object.load("http://yoursite.com/getImage.php?userid=3323");

Now you have the path to the image you can load it inside of flash with the Loader Component. Here are some tutorials I've found on the subject:

http://www.oman3d.com/tutorials/flash/loadvars_bc/ - loadVars() Tutorial
http://www.lukamaras.com/tutorials/actionscript/load-jpg/loading-external-jpg-image.html - Using the Loader Component
http://www.oman3d.com/tutorials/flash/load_images_bc/ - Using the Loader Component

movidalatina
Feb 5th 2008, 10:43 am
Thank you both, for your input..
that's why i love DP, such fine people.