
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
988
|
Appendix C: Backward Compatibility and Player Build Updates
The same is true of mblength() and length, mbsubstring() and substr(), and mbord()
and charCodeAt().
Whither Tell Target?
In Flash 4, Tell Target was our main tool for referring to movie clips. Tell Target,
bless its soul, was an unwieldy tool and is rendered obsolete by the much more ele-
gant object model introduced in Flash 5. The Tell Target function has been depre-
cated (i.e., retired from recommended use). Although we can still use the tellTarget()
function to code in a Flash 4 manner, tellTarget() may disappear in the future.
Consider the following code, which uses Tell Target to play an instance named
closingSequence:
Begin Tell Target ("closingSequence")
Play
End Tell Target
As of Flash 5, we simply invoke the much more convenient and readable play()
method on the
closingSequence instance:
closingSequence.play();
Tell Target could also perform multiple operations on an instance within a code
block, like so:
Begin Tell Target ("ball")
(Set Property: ("ball", x Scale) = "5")
Play
End Tell Target
As of Flash 5, the with() statement, described in Chapter 6, is the preferred way to
achieve similar results:
with (ball) {
_xscale = 5;
play();
}