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

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

Flash and Shockwave Forum

running concurrent .swf in HTML/PHP

5+ Year Member

Msg#: 3808131 posted 8:46 pm on Dec 15, 2008 (gmt 0)

Hi all,

I have a collection of specific .swf files (30 seconds each) and I wish to show several of them, one after another, in the same location. I have a php script which regulates the sequence of the .swf files based in part upon data in a MySQL table. Unfortunately, the script is displaying all of the .swf at the same time, each below the next. Any idea how I can wait for one .swf to finish, than open the next in the same location? When each .swf finishes, by any chance does it send some sort of "finished" boolean value back to the php/HTML?




WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member

Msg#: 3808131 posted 7:06 pm on Dec 17, 2008 (gmt 0)

Hello remlingj and Welcome to WebmasterWorld!

I am not sure you're going to be able to do this. Is it an option for you to add the files together before you present them on a webpage so that it is one continuous file?


5+ Year Member

Msg#: 3808131 posted 2:24 pm on Dec 18, 2008 (gmt 0)

Hi eelixduppy and thanks for responding.

Not really. The project is a virtual aquarium and the idea is to allow the users, over time, to monitor the progress of a fish tank. A MySQL database retains the variables and the last scene of the tank seen. Every 12 hour cycle, the possible changes such as a light blowing out or a change in the nitrogen cycle will be allowed for.

The way the script works now is that when you log on, the script access the database to see when you last logged on and what you were seeing, calculates the number of 12-hour cycles since you last logged on (being undergrads, I'm betting they'll average 2-3 days between checking the tank), determine the state of the tank since you last logged on, determine the new scene to show based upon the state, and display it. In the event that more than one 12-hour cycle has elapsed and that fish are "dying" (actually, they get rescued by a small submarine) they want to show each scene where fish become sick and get picked up.

What I'll probably end up doing now is place all scenes that happened since the last viewing in an array with the pointer to the current scene in array[0] and passing the whole array to a small script that will display the .swf at array[0], increment array[0], and call itself again with the same array as a parameter until array[0] = the array size.

If you or anyone else can determine another way to insert flash files into pre-made websites at the same location again and again - such as converting an array of multiple independent .swf files into one .swf file on the fly -- of any other way, please let me know.

Why we just can't let the fish die and thereby get past all of this is my tirade of the day. Whereas I respect some of the objectives of PETA, a PETA for virtual animals is going too far.


WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3808131 posted 3:11 pm on Dec 19, 2008 (gmt 0)

Have you tried doing this within the Flash?

That is, some mechanism by which you read in the list of Flash files (an XML file, for example, like what is done for Flash video players.) Then when the current movie is complete, from the within the Flash you use getURL() and pass the parameter for the next SWF.

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