i created 3 variables tht is dropBool(scale),waterBool(cylinder) and ansBool(batteryAns)
the codes are working well but there is a slight problem.
i hav two hitTest which is one at the ‘shelf’ and the other is at ‘else’. the x and y hits the same co ordinates.
as for hitTest at 'shelf ’
dropBool and waterBool need to false and ansBool need to b true to allow BatteryAns visible.
as for hitTest at ‘else’
All,dropBool,waterBool and ansBool need to false
to make batteryAns nt visible.
-so the problem is
if u drag batt > scale > back to shelf > batteryAns appear.
or
if u juz double click the battery at the shelf itself , batteryAns will appear also cause it hit the same place.
i need the user to do the drag n drop activity 1st before getting the answer.
How can i solve dis? i tried so many ways but still cannot work.
</SPAN>
else if (this.hitTest(_root.shelf_mc)) {
dropBool = false;
waterBool = false;
answer2();
ansBool = true;
answer();
this._x = 88.5;
this._y = 31;
_root.answer1 = "";
_root.answer2 = "";
_root.answer3 = "";
_root.endComment = "";
_root.batteryAns._visible = true;
_root.msg_mc._visible = false;
_root.water_mc._visible = true;
_root.waterBattery_mc.gotoAndStop(1);
_root.error_mc.gotoAndStop(1);
enabler("crazly", true);
trace(shelf_mc+" "+ "shelf");
else {
dropBool = false;
waterBool = false;
answer2();
ansBool = false;
answer();
battery_mc._alpha =100;
this._x = 88.5;
this._y = 31;
_root.answer3 = "";
_root.answer1 = "";
_root.answer2 = "";
_root.endComment = "";
_root.msg_mc._visible = false;
_root.water_mc._visible = true;
_root.waterBattery_mc.gotoAndStop(1);
_root.error_mc.gotoAndStop(1);
enabler("crazly", true);
}
ps: heres the link for my fla file
http://www.filewire.com/download.php?id=9382f33a1c6aa3565edf01e
note: i hav two code area. One at layer name action frame 1 and the other one is at layer name waterBattery,it is inside a movieClip frame35