Tell Target

Use this Action to direct all its child Actions to the named Sprite/Movie rather than the current Sprite/Movie.

panels-action-telltarget.png  

Tell Target is useful when you have Sprites or loaded Movies at other levels. It lets Sprites do things to each other. It also lets the Sprite do things to the main Movie and vice versa.

Note: Sprites that have Mouse Events or are inside a Button State cannot act as targets, even if they have a name. Also Sprites that are within an unnamed Sprite or a Group can only be referred to from within the Sprite itself (i.e. from one of the objects inside the Sprite)

Targets can be nested inside other targets. In this case, you need to specify a target by either an absolute or relative target path. An absolute target path starts with a '/'. A relative target path starts with either the name of a child Sprite or a '..' to mean the parent Sprite (or Scene). In both cases the path works down (or up for a '..') through the hierarchy of containing Sprites, with each Sprite name separated by a '/'.

For example, let's assume we have some Sprites like this:

Scene 1
   Sprite Tom
      Sprite Richard
   Sprite Harry

Scene 1 contains two sprites, 'Tom' and 'Harry'. Sprite Tom contains another Sprite 'Richard'.

From within Sprite Tom you could use the following to refer to the other Sprites and Scenes:

'/'      refers to Scene 1 (main Movie)
'../'      refers to Scene 1 (parent of the current Sprite)
'../Harry'      refers to the sibling Sprite called Harry (that is, Harry is within the parent of Tom)
'/Harry'      refers to the Sprite within the main Movie called Harry
'Richard'   refers to the child Sprite Richard
'/Tom/Richard'   refers to the child sprite Richard, which is a child of Tom, which is in the main Movie.

In the example below, the Tell Target Action will send "My Sprite" to Frame 0 when the mouse button is pressed inside the current object.

panels-action-telltarget-example.png  


[Previous] [Main] [Next]