View comments | RSS feed

tellTarget function

tellTarget(target:String) { 
statement(s);
}

Deprecated since Flash Player 5. Macromedia recommends that you use dot (.) notation and the with statement.

Applies the instructions specified in the statements parameter to the Timeline specified in the target parameter. The tellTarget action is useful for navigation controls. Assign tellTarget to buttons that stop or start movie clips elsewhere on the Stage. You can also make movie clips go to a particular frame in that clip. For example, you might assign tellTarget to buttons that stop or start movie clips on the Stage or prompt movie clips to jump to a particular frame.

In Flash 5 or later, you can use dot (.) notation instead of the tellTarget action. You can use the with action to issue multiple actions to the same Timeline. You can use the with action to target any object, whereas the tellTarget action can target only movie clips.

Availability: ActionScript 1.0; Flash Player 3

Parameters

target:String - A string that specifies the target path of the Timeline to be controlled.

statement(s) - The instructions to execute if the condition is true.

Example

This tellTarget statement controls the movie clip instance ball on the main Timeline. Frame 1 of the ball instance is blank and has a stop() action so it isn't visible on the Stage. When you click the button with the following action, tellTarget tells the playhead in ball to go to Frame 2, where the animation starts:

 on(release) {
 tellTarget("_parent.ball") {
 gotoAndPlay(2);
 }
 }

The following example uses dot (.) notation to achieve the same results:

 on(release) {
 _parent.ball.gotoAndPlay(2);
 }

If you need to issue multiple commands to the ball instance, you can use the with action, as shown in the following statement:

 on(release) {
 with(_parent.ball) {
 gotoAndPlay(2);
 _alpha = 15;
 _xscale = 50;
 _yscale = 50;
 }
 }

See also

with statement


Version 8

Comments


danny_macro said on Oct 25, 2005 at 10:31 AM :
If I need access into movies clips whit variables, to recharge one image in internal movieclip, for example:

tellTarget ("cabdis.cadis"+bb) {
dos = nomen;
cargar = _parent._parent.bb;
loadMovie("images/tumb/"+dos+_parent._parent.bb+".jpg", "ima");
}

In this case, how found "Whit" command in flash8?
Note: It`s a example made in Flash-MX, and work OK, but in flash 8 don`t work, helpme please, thanks.

www.integralmedia.com.co

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00001776.html