Inter-Movie Text Communication

This is an experiment in inter-movie communication. With Quicktime a movie can send information from one movie to another. The movie files can communicate when they are either embedded into one web page (like this page) or when they are open in separate windows in the Quicktime Player application (you can download the two movies to test this).

In this case the orange movie on the left sends some text across to the white movie on the right. While this may not seem all that amazing, it could be sending much more interesting information and the movie receiving the information could be processing or interpreting it in interesting ways. I’ve chosen to send simple text just because it it is a very handy way of testing if a script is working.

CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">

The first movie xtexttestsender.mov is made up of a sprite track and a text track.

The sprite track contains one sprite, which has the following script assigned to the “Mouse Click” event.

MovieNamed(”xtexttest.mov”).TrackNamed(”Text 1″).SetTextEditstate(kscriptediting)
MovieNamed(”xtexttest.mov”).TrackNamed(”Text 1″).ReplaceText(”BANG”, 0, 0)

The second movie xtexttest.mov is simply a single text track. The important things are that the movie is called “xtexttest.mov” and that the text track is named “Text 1” so that the above script finds its target. The first line of the script is telling the track named “Text 1” in the movie named “xtexttest.mov” to make the text field editable by a script, setting it to “kscriptediting“. The second line is telling the movie to insert the text “BANG” into the same text track. The ““BANG”, 0, 0” tells the movie not to overwrite the text which was previously in the track. If we had changed the first number to 2 the first two letters of “Here” would have been removed, if the second number was two the last two letters would have been removed.

I have included the LiveStage Pro .lsd files for the two movies here: xtexttestsender.lsd xtexttest.lsd

So anyone with a full copy of LSP or even a demo can have a play with my scripts. In this case the script is very simple, but I’m starting to post all my .lsd files so you should be able see the scripting getting more complex as I learn more.

0 Responses to “Inter-Movie Text Communication”


Comments are currently closed.