Lingo Dictionary > G-K > go |  |

go

Syntax

    go {to} {frame} whichFrame
    go {to} movie whichMovie
    go {to} {frame} whichFrame of movie whichMovie

Description

Command; causes the playback head to branch to the frame specified by `whichFrame` in the movie specified by `whichMovie`. The expression `whichFrame` can be a marker label or an integer frame number. The expression `whichMovie` must specify a movie file. (If the movie is in another folder, `whichMovie` must specify the path.)

The phrase `go loop` tells the playback head to loop to the previous marker and is a convenient means of keeping the playback head in the same section of the movie while Lingo remains active and avoids the use of `go to the frame` in a frame that has a transition which would slow the movie and overwhelm the processor.

It is best to refer to marker labels instead of frame numbers; editing a movie can cause frame numbers to change. Using marker labels also makes it easier to read scripts.

The `go to movie` command loads frame 1 of the movie. If the command is called from within a handler, the handler in which it is placed continues executing. To suspend the handler while playing the movie, use the `play` command, which may be followed by a subsequent `play done` to return.

When you specify a movie to play, specify its path if the movie is in a different folder, but to prevent a potential load failure, don't include the movie's .dir, .dxr or .dcr file extension.

To more efficiently go to a movie at a URL, use the `downloadNetThing` command to download the movie file to a local disk first and then use the `go to movie` command to go to that movie on the local disk.

The following are reset when a movie is loaded: `beepOn` and`constraint` properties; `keyDownScript`, `mouseDownScript`, and`mouseUpScript`; `cursor` and `immediate` sprite properties; `cursor` and`puppetSprite` commands; and custom menus. However, `the timeoutScript` is not reset when loading a movie.

Example

This statement sends the playback head to the marker named start:

    go to "start"

Example

This statement sends the playback head to the marker named Memory in the movie named Noh Tale to Tell:

    go frame("Memory") of movie("Noh Tale to Tell")

Example

This handler tells the movie to loop in the current frame. This handler is useful for making the movie wait in a frame while it plays so the movie can respond to events.

    on exitFrame
    	go the frame
    end

See also

`downloadNetThing`, `gotoNetMovie`, `label()`, `marker()`, `pathName (movie property)`, `play`, `play done`