homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

How to randomize huge number of flash movies

 1:51 am on Nov 23, 2008 (gmt 0)

Hello Guru's

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



 2:48 pm on Nov 25, 2008 (gmt 0)

Welcome aboard dartingaround, this should be fairly basic:

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.


 4:21 am on Nov 26, 2008 (gmt 0)

I would like to have the script automatically play one file... instead of the visitor selecting one!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved