PDA

View Full Version : stupid path problem in MC


tracer_bullet
07-03-2002, 07:59 AM
Good day folks,

I'm doing a drag'n'drop MC. (I've read the tutorial)
I first did it on the scene, and then i tried to put it in an MC ("total") that now is on the scene.
So at the first time the code: if (this._droptarget == "/zone") {....
worked perfectly
But now i've got a problem with the code:
if (this._droptarget == "_root.total.zone") {....

So what would be the path?

ps: to be clearer:

scene -->zone //the target.instance the MC zone_allee
-->carre //the dragged object. instance of the MC anim_detail

Ricod
07-03-2002, 08:58 AM
Lose the quotes.
if (this._droptarget == _root.total.zone) {

did u try this ?

If u want carre to have the droptarget "zone_allee", which is a child of "total", the parent mc. then it should be :

if (this._droptarget == _root.total.zone_allee) {

tracer_bullet
07-03-2002, 09:04 AM
Hehehe,
darn cunning... u're right, i should have remove the quotes.
Thanks a lot

Ricod
07-03-2002, 09:13 AM
np ! U know where the quotes are for right ?

tracer_bullet
07-03-2002, 09:17 AM
hum...
path i think... or is it for variables ?

Ricod
07-03-2002, 09:29 AM
No, its for strings. So _root.myMC is the path to the instance "myMC", located on the _root of this _level, while "_root.myMC" is literally "_root.myMC". U could use the last to show it in a dynamic textbox.

tracer_bullet
07-03-2002, 09:33 AM
:D
I'll go sleeping a bit wiser tonight.

Ricod
07-03-2002, 09:57 AM
lol :D !