What is the gotoAndPlay action?
What is the gotoAndPlay action?
Rating:
The gotoAndPlay action sends the playhead directly to the specified frame of the specified scene and then executes a play action. When no scene is specified, the playhead moves to the specified frame of the current scene.
The syntax of using the gotoAndPlay action is as follows:
Where scene is a string that specifies the name of the scene where a user wants to go. It is optional to specify a scene.
Frame is a number of the frame to which a user wants to go. It also can be a string that represents the frame label.
For example:
The following code is assigned to a button:
gotoAndPlay(53);
}
The above code sends the playhead to the Frame 53 in the current scene, and plays the movie from that frame when a user releases the button.
Rating:
Other articles
- Tip for increasing the space between text characters
- What are device fonts?
- What is the use of the Info panel?
- What is the pop method?
- Tip for combining the regular lasso tool with the polygon lasso tool.