PDA

View Full Version : tell target...what happened to it



DDD
September 12th, 2002, 11:13 AM
I know they are doing away with the tell Target command. But does anyone know what has replaced it or how one goes about achieving the ttell target with out tell target??

upuaut
September 12th, 2002, 12:01 PM
yes.. now as of Flash 5.0 we use dot syntax to call to objects in a Flash environment.

ie. If we have a movie clip with an instance name of myMovieClip and it rests on the main timeline we can call to it from the main timeline by name

myMovieClip.gotoAndPlay(4);

we add a period after the name and then the method or function or property of the object after that. Including further depths of movie clip timelines.

so if we had a movie clip named myMovieClip on the main timeline, and inside of it there was another movie clip named mySecondClip then we could tell the second clip to do something like so

myMovieClip.mySecondClip.stop();

that would be from the main timeline.

if we were telling that same movie clip to do something with frame actions from inside myMovieClip then we could call out to mySecondClip by name rather than adding on the first clip's name.
ie

mySecondClip.gotoAndStop(44);

it's very similar to tell target addressing.. but with none of the extra stuff to bog you down. It is very easy to pick up and intuitive to use.

You can try doing a search on this board using the keywords "dot syntax addressing movieclip" and see what you come up with.. we've discussed this quite a bit. Check the best of kirupa section, for sure there's something in there.

DDD
September 12th, 2002, 12:51 PM
Okay thanks..makes perfect sense. Jus when I got used to flash 5, I start seeing this dot syntax stuff everywhere. Question do you or anybody still use flash 5?? Personally I have not touched it since MX

sintax321
September 12th, 2002, 04:44 PM
I'm still using FLash 5 because I'm lazy and haven't botherd looking for a copy yet. I'm sure once I use MX I won't use 5 again either. Whats new and differnt in MX? How much new crap do I have to learn? Is it really that differnt?

flex
September 12th, 2002, 04:56 PM
Might help

http://www.kirupaforum.com/showthread.php?s=&threadid=6001

sintax321
September 12th, 2002, 05:45 PM
Thanks agin flex. All of the new action script looks really wicked. I there anything that was good in 5 that isn't in MX for some strange reason? Also whats the new layout look like> does it look like 5 or is it all new?

flex
September 12th, 2002, 05:52 PM
No probs, check this, these fla's might help with your game, I posted these for another thread, here's the link to the thread

http://www.kirupaforum.com/showthread.php?s=&threadid=6063&pagenumber=2

sintax321
September 12th, 2002, 05:59 PM
Thanks I'll check it out when I get off work.:)

upuaut
September 12th, 2002, 10:35 PM
actually dot syntax IS from 5.0. It's just that a lot of people still use tellTarget in 5.0 because that's what they are used to... tellTarget was depricated in the move from 4.0 to 5.0 but it still works in 5.0.

Kitiara
September 13th, 2002, 04:48 AM
I thought you could use either dot syntax or slash syntax in 5? I seem to recall (although it could have just been my lousy scripting) that sometimes one would work while the other wouldn't, so you had to be careful...

I'm glad they've got rid of tellTarget now though, it makes life so much easier. Although they decided not to mention this in the Studio MX manual, so I was trying for ages to get it to work... You live and learn. :)

upuaut
September 13th, 2002, 05:45 AM
nah.. both work in Flash 5.0 in all situations.. it's just a matter of knowing how to address the things. slash syntax was never a very clear system, hence it always seemed flakey.. working sometimes and not at others.

Kitiara
September 13th, 2002, 05:48 AM
Then it probably was my coding then! Oops. I always preferred the dot syntax anyway. *ahem*

Dug myself out of that one?

It's good to see tellTarget get the boot. It's an extra three lines of code and brackets I don't have to worry about.