Dynamic text query

Hi all - new user. :stuck_out_tongue:

Can anybody help me with a bit of simple code - i’m very much new to AS and have only a basic grasp of it.

Basically, I have created a short exercise for an elearning programme that requires the user to drag and drop an object to a number of predetermined places - some of which are correct, some of which are incorrect places. Therefore, on release of the button, the object will either be placed in the correct position, or else return back to its starting place.

This is my current code in AS 2.0:

on(press){
startDrag(this,false,0,0,400-this._width/2,450-this._height);
}
on(release){
stopDrag();
if(this.hitTest(_parent.correctSpot)){
this._x=_parent.correctSpot._x;
this._y=_parent.correctSpot._y;
}else{
this._x=326.9
this._y=336.6
}
}

I would like to include feedback text in a dynamic text box to let the user know they have dropped it either correctly or incorrectly (even something as basic as “Correct!” and “Incorrect!”)

Any help anybody can give me on this would be greatly appreciated.

Regards,