Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
I have a website that we are trying to add some video content to. We have hundreds of flash files we want to encorperate. We have seen the code were you can have 2 .swf randomly play... but that is not enough for ou project.
We have the adobe cs3 suite if that will make it easier.
Thanks in advance
Import an XML file with a list. You can manually edit a list, or have it generated from a script. Have the XML contain members for the url and caption.
<?xml version="1.0" encoding="ISO-8859-1"?>
<movie url="video1.flv" caption="Video 1"/>
<movie url="video2.flv" caption="Video 2"/>
As you read in the XML, store it in an array. Using the random functions of Actionscript, pick a random movie URL and it's associated caption.
At this point you import the movie, attach it to a video object, begin streaming and don't start playing until the buffer is full.
The list can also be used with a combo box to make a select list (although with hundreds, another approach might be more practical.)
There are adequate samples and help docs within Flash to do all of the above.