hi,
i’m making a drag-drop “quiz” (not much of one yet…)
If i click/release the mouse anywhere on the scene when the movie first loads, the circle_MC moves to 0,0 - i assume because myFinalX and Y are defaulting to 0 until doing something changes them.
How can i set this “default” to 50,50 but only when it first loads? (so it can be changed later without reverting back)
here’s my (terrible!) code:
[AS]
circle_mc.onMouseDown=function(){
mousePressed=true;
}
circle_mc.onMouseUp=function(){
mousePressed=false;
}
circle_mc.onEnterFrame=function(){
if(mousePressed==false){
this._x-=(this._x-this.myFinalX)/5;
this._y-=(this._y-this.myFinalY)/5;
}
}
circle_mc.onPress = function() {
startDrag(this);
};
circle_mc.onRelease = circle_mc.onReleaseOutside=function () {
stopDrag();
_root.circle_mc.gotoAndStop(1)
if (this._droptarget == “/targetcircle”) {
circle_mc.myFinalX = 443;
circle_mc.myFinalY = 294;
}
else if (this._droptarget == “/targetcircle2”) {
circle_mc.myFinalX = 203;
circle_mc.myFinalY = 200;
}
else {
circle_mc.myFinalX = 50;
circle_mc.myFinalY = 50;
}
};