Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
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?
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 and passing the whole array to a small script that will display the .swf at array, increment array, and call itself again with the same array as a parameter until array = 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.
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.