PDA

View Full Version : Drop target problem



Lockinsky
June 11th, 2004, 12:36 AM
Hi
When I do this in test movie it works fine, and when I publish it and look at it embedded in a browser it still works - but when I load this swf into another it doesn't work. I guess it's about paths, but I don't know - also why does target1 have to be a string? I got this code from Kirupa.

on (release) {
if (_root.drag2._droptarget == "/target1"){
{feedback="That's correct. Well done.";
}else {
feedback = "That's not correct.";
}
}
Any ideas?

Lockinsky
June 11th, 2004, 02:02 AM

Lockinsky
June 11th, 2004, 02:03 AM
I would really appreciate some help on this - why the forward slash? Is it paths? I've tried all variations.

Lockinsky
June 11th, 2004, 02:17 AM

Lockinsky
June 11th, 2004, 02:18 AM
OK - I've worked it out myself, it should be:
if (eval(_root.drag2._droptarget) == _root.clip10)
to get the paths right

Lockinsky
June 11th, 2004, 02:19 AM
Ok it should be
if (eval(_root.drag2._droptarget) == _root.target1)
to get the paths right

radicaljugnu
June 11th, 2004, 02:19 AM
use _parent instead of _root.

Lockinsky
June 11th, 2004, 02:23 AM
Thanks but _parent doesnt work - the problem was sorted by the eval