Error getting tags :
error 404Error getting tags :
error 404 newPlayer | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
newPlayer
Basics
Expander triangle
Type
Message
Syntax
newPlayer
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Sent to a new player right after it's created.
Examples

on newPlayer -- assign a file
if the filename of the target is empty then
answer file "Please choose a file to play:"
set the filename of the target to it
end if
end newImage

Additional Comments
Expander triangle

Handle the newPlayer message if you want to create additional objects, switch tools, or do other tasks when a new player is created.

Comments:

Normally, the newPlayer message is handled at a higher level of the message path, since the newly-created player does not yet have a script unless the templatePlayer contains one.

The newly-created player's long ID property is placed in the it variable.

The actual creation is not triggered by the newPlayer message, so trapping the message and not allowing it to pass does not prevent the player from being created.

User Comments
Expander triangle