-- Lingo syntaxspriteChannelObjRef.name // JavaScript syntaxspriteChannelObjRef.name;
Sprite Channel property; identifies the name of a sprite channel. Read/write during a Score recording session only.
Set the name of a sprite channel during a Score recording session--between calls to the Movie object's beginRecording() and endRecording() methods.
Note: Starting a Score recording session using beginRecording() resets the properties of all scripted sprites and sprite channels.
Unlike a Sprite object's name property, which can only be set on or after a frame in which a sprite appears in the Score, a Sprite Channel object's name property can be set on an empty channel. This means that you do not need to call updateFrame() before setting the name of the sprite channel.
A change to a sprite channel's name using script is not reflected in the Score window.
This statement sets the name of sprite channel 6 to Kite String during a Score recording session:
-- Lingo syntax
on mouseDown
_movie.beginRecording()
channel(6).name = "Kite string"
_movie.endRecording()
end
// JavaScript syntax
function mouseDown() {
_movie.beginRecording();
channel(6).name = "Kite string";
_movie.endRecording();
}
beginRecording(), endRecording(), Sprite Channel