PDA

View Full Version : Damn Tell Target!


DjEnigma
07-26-2002, 02:14 PM
Hello to u all on the board, i'm a newbie round here!


Right then, this question has probably been answered many times already like.......

I have a movieclip on my mainstage which consists of an animated drop down menu.

When i click on one of the buttons within this animated menu i want it to run a movieclip which also exists on the main stage.

This is the code that i have used on one of my buttons inside the the animated menu clip....

on (release) {
tellTarget ("_level0.news") {
gotoAndPlay (1);
}
}

This is the error message i receive.....

Target not found: Target="_level0.news" Base="_level0.welcomemenu"

news refers to the instance name of the movieclip i wish to run on the mainstage.

welcomemenu refers to the instance name of the animated drop down menu, from where i selected the news movie clip.. This is also on the main stage....

Hope this is clear enough!

Please help!

pinkaboo
07-26-2002, 02:23 PM
try this:


on (release) {
_level0.news.gotoAndPlay (1);
}


tellTarget is now a defunct command

Tankshell
07-26-2002, 02:40 PM
Telltarget is not defunt. It still works. It has however been depreiciated which means that in future versions of Flash support for it may be dropped.

Still....


on (release) {
_root.news.gotoAndPlay (1);
}


If you only have one level then '_root' should be used to target the main timeline.

pinkaboo
07-26-2002, 02:45 PM
oooooh! SOR-REEE!

so I used the wrong d-word, posted so often on this I got slack, pardon me! - next time I'll just point to the search button

Tankshell
07-26-2002, 02:54 PM
Hey calm down you'll do yourself an injury.

Women. sheesh.

:D

Ricod
07-26-2002, 03:02 PM
Hey ! That's my wife you're talking to ! U, me : outside ... now !

Oh .. and no matter how many _levels u have .. _level0 should still work even if u have only 1. I think there's just a path problem here ...

Is "news" present at the moment u target it ?

pinkaboo
07-26-2002, 03:07 PM
Hiya Rico honey, thanks babe ;)

Yeah, I've just been doing a quick test in Flash and I get that error if the instance isn't on the stage at the time the action is called, so I think that is the issue here.


_level0 is fine, if you debug: list objects you'll always see objects there listed as _level0 even if there are no other levels.

pinK

DjEnigma
07-26-2002, 03:11 PM
Thanks a lot guys.

It didn't work at first, but then i tried moving the movie clip from frame 2 onto frame 1 of the main stage.
I then started the animation on the movieclip at frame 2 and put a stop action on frame 1.
Then i changed the on release action to play the clip starting from frame 2 to reflect the changes.

Can anyone explain why this wouldn't work before when i'd placed the movie clip on frame 2 of the mainstage?

Ricod
07-26-2002, 03:18 PM
Pink : any time sugar !

DJEnigma : It probably doesn't work, because "news" isn't present at the time u target it. U see, it needs to be loaded in order to be found, and it needs to be on your main timeline in the current frame in order to be targeted. If its not in frame 1, and u put a stop(); there ... well, then Flash can't find it. Its like putting your sunglasses on top of your head and the only place you're allowed to look is around you ... good luck !

DjEnigma
07-26-2002, 03:24 PM
Hahaha, good analogy thanks, 4 the explanation man. I'll let u know how i get on with my project:D