PDA

View Full Version : Put Away Tell-target


Brian Ayers
08-07-2003, 06:27 PM
Most of us are used to using Tell-Target to command a sprite ...

For example, in SWiSH 2.0 ...
Tell-Target /mySprite
---> GoTo Frame 5

or ...
Tell-Target /mySprite
---> GoTo Label "gohere"

SWiSHmax does have the Tell-Target action .... but, it isn't needed to achieve the examples above -- and just adds a bit to the file size if you do use it for that ...

in SWiSHmax ...

mySprite.gotoAndPlay(5)
or ...
mySprite.gotoAndPlay("gohere")


So, instead of first selecting Tell-Target ... then selecting the gotoAndPlay action ... you can simply use gotoAndPlay - and select the appropriate sprite as the target ...

Just a little less code - and saves on file size (although - fairly negligible) ;) .. part of the beauty of 'dot-notation' :D

Cheers,
Brian

war2
08-08-2003, 05:55 PM
ah yes, it´s the small things that does it :)

karl472001
08-08-2003, 07:02 PM
Another way to cut down on file size. Sounds good!

Frets
08-10-2003, 11:26 PM
Another one is every object can be a target (well most)

Say you want to tell target transform.
In 2.0 you had to convert an object to a sprite before you
could tell target.
Shapes, images, Static text all you need to do is name the object
then click target.
Your object will now react to Tell target transform functions
without having to convert it to a sprite.

war2
08-12-2003, 01:44 PM
yep it´s a damn neat little detail :)