Detection of _droptargets

Is there a way of telling a null value in the _droptarget property?

Basically I’ve got 9 draggable objects, and what I want them to do is if there is no _droptarget when you release the drag, flick back to it’s riginal position.

  • Kit

just use if/else statements. Remember that _droptarget returns “/target”.

let me know if you need additional help. Here is a sample:

&nbsp &nbsp &nbsp &nbsp this.startdrag();
&nbsp &nbsp &nbsp &nbsp this.stopdrag();
&nbsp &nbsp &nbsp &nbsp drop=this._droptarget;
&nbsp &nbsp &nbsp &nbsp if(drop=="/redsquare"){
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp this._x=413.5;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp this._y=121.0;
&nbsp &nbsp &nbsp &nbsp } else if(drop=="/bluesquare"){
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp this._x=413.5;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp this._y=240.3;
&nbsp &nbsp &nbsp &nbsp } else {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp this._x=170;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp this._y=170;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }

“My name is Inigo Montoya. You killed my father. Prepare to die!”

Cheers. Just checked it against my own code, and I’d missed out a this. along the way. Argh. Don’t you just hate it when that happens?