php & flash
Moderator: General Moderators
php & flash
I'm very new to php and my question is:
Can I load an flv into a swf using php & mysql.
I want to pull the flv from a database and load it into a swf & I can't figure it out or find any info online.
Thanks
Can I load an flv into a swf using php & mysql.
I want to pull the flv from a database and load it into a swf & I can't figure it out or find any info online.
Thanks
Re: php & flash
I forgot to mention I'm using actionscript 3
Re: php & flash
It's technically possible, but it's a roundabout way to go about it. Why not serve the FLV from a regular file?
Re: php & flash
I need to create a cooking site. each page would be a different chef with two videos, two recipe pdf and other misc content. I want to load everything using php and mysql. My first thought was to create .swf for every chef allowing them to pick between the two videos. But I thought that would be a pain if there were hundreds of chefs.
So I want to make a swf that lives on every page that I can load the two video into. Is your suggestion to cut out the swf and just load the flv?
if so how would I do that? display the flv?
So I want to make a swf that lives on every page that I can load the two video into. Is your suggestion to cut out the swf and just load the flv?
if so how would I do that? display the flv?
Re: php & flash
Create one SWF that loads FLVs dynamically depending on parameters you pass to it (such as fillename and path). Allow users to upload movies and save them as FLVs on the server - store only the filename in the database. You have the nice FLVPlayback component just for that purpose - http://livedocs.adobe.com/flash/9.0/Act ... yback.html
Re: php & flash
That exactly what I've tried to do but I don't know enough to pull the filename from the database and load it into the swf and I can't find anything online that helps.
It amazes me that I can't find a tutorial on the subject.
It amazes me that I can't find a tutorial on the subject.
Re: php & flash
I wouldn't think you will find a tutorial that targets FLVs specifically, but uploading files with PHP is quite common so I'm sure there are plenty of resources. What have you tried so far?
Re: php & flash
I'm able to pull the file path from the database and echo it back. But I have no idea where to begin in flash to load it. I assumed if I could create a variable with the file path I could load that into flash. but I can't.
I'm using mysql_fetch_row to pull the file path from my database.
I'm using mysql_fetch_row to pull the file path from my database.
Re: php & flash
You can use flashvars to pass the value of the FLV into the flash embed - http://www.adobe.com/livedocs/flash/9.0 ... 00668.html
Re: php & flash
I will give that a try. Thanks for the help.