PHP Bot Manager from Flash

Here we have dynamic text trailer_display, which will recive constant updates from our PHP script.

w

In order to make our checkbox an enable/disable button, we create a listener, and assign it to an event. All we are doing here is starting up a movie clip, which will loop. Here is how the movieclip communicates with our PHP.

Notice that our timing is a loop, 12 frames per second, 60 frames, which is 5 seconds. If our checkbox is checked, we want to call loadVariablesNum. If checked, the value of trailer_display is returned by PHP, no additional code is necessary. Be careful to respect the object heirarchy of Flash objects. In this example, the dynamic text is in the root, which is the main movie. Because we are inside a movieclip, it has local scope only. That's why we use _root as the parent reference. If we really wanted to get crazy, we could send back xy coordinates from PHP and change the placement of any Flash object. The key is to feed Flash back variable names with echo or print statements.