You can do that in a number of ways. If you know the sprite
number that you are calling, and it is 100% guaranteed to
exist what it
is called, you can use syntax like this:
The problem here is that if for some reason, the command is
sprite(2) is no longer on the stage, or a sprite in channel 2
have the customHandler() method, then Director will crash
with an error.
You can use sendAllSprites() to circumvent that.
That will send the customHandler() message to ALL sprites. If
them have a customHandler() method, then they will run it. So
happen multiple times if multiple sprites have that method.