Using Director > Playing Movies over the Internet > Retrieving network operation results with Lingo > Differences in scripting Lingo for browsers

 

Differences in scripting Lingo for browsers

There are some general differences in the way to script Lingo for a movie that plays over the Internet, depending on whether the movie is in a browser.

For a movie playing in a browser, it is best to use preloadNetThing to load media elements into the browser's cache first. If the media elements aren't preloaded using preloadNetThing, linked media elements may not be present when they are needed.

Avoid using long repeat loops in browsers; such repeat loops can make the computer appear unresponsive. As an alternative, you can split long operations into sections and execute them over a series of frames or check for user actions in an on exitFrame handler.

Do not use a repeat while loop to check whether a network operation is complete.