Hi People. I'm hoping someone might be able to help me here.
Here's my scenario:
I have a swf file on my page that loads an flv video.
At current, its working fine, but the actionscript within flash is not dynamic, therefore the video is always the same.
Here's what I'm trying to achieve:
I want to be able to attach a query at the end of my swf eg. myflashfile.swf?id=1.
I can do that dynamically in php, and i can generate the correct id when needed, thats not a problem. What is the problem is how I actually retrieve this variable in flash and how i set up a variable in flash, so that it will always display the correct video depending on its id.
If anyone can help, I would be extremely appreciative. I've been working with flash for quite a bit of time, however I've only really used it for animation, only getting into AS, and dynamic AS now.
you can simply use _root.id to refer to the variable.
BTW: using flashvars in the embedding
<embed src="myflashfile.swf" flashvars="id=1" ...>
might be better than
<embed src="myflashfile.swf?id=1" ....>
because it allows the movie to load from cache
-- I don't know how to acheive this EXACTLY, especially since I've already begun creating my site using joomla 1.0.x... but anyway... the "?id=xxxx" I assume would be the ID field number for a specific content item (youTube vid entry/"page") in mysql db named sitedb_joomla...
each content item (video page) should have a number of specific variables (db fields) such as Description, Video Title, Created by...
I want all of these content specific fields to be called into the swf I've created (the player) to be displayed when called up (..../videos.php?id=xxxx)
Here is what I've done:
I've created a flash video player (videoplayer.swf) with actionscripting for the buttons to control the dynamically loaded .flv file.
I am storing my .flv files (video content) on my server at "www.site.com/flv/videocategory/file.flv"
I am able to load an XML object in actionscript and call up a specific .flv file from the XML markup using onLoad function.
I am able to write simple videos.php file to connect to mysql db and output valid XML markup. (not sure whether to iterate through all of my id records for the XML file (php) i want to feed into the XML object in the flash player (swf), or (HOW TO?) call up a specific XML markup for one specific ID record. (video item record id=xxxx for example).
Here's where I get really confused:
1. How do I create a single content page with the variable url ending "?id=xxxx" -- (is joomla already doing that for me??)
2. How do a embed my swf player in my content item page = and call into the player the XML markup (i assume created by a separate php writtten file) for the specfic id record of item id=xxxx
I hope my rambling makes sense. Any help would be greatly appreciated...