ok all of this code is working, except for the close._btn action
can someone help??
here is the code:
[AS]import mx.transitions.Tween;
import mx.transitions.easing.*;
function checkit():Void {
var inde:Number = 0;
for (i=1; i<=6; i++) {
this[“mc”+i].onTarget ? animout(this[“mc”+i]) : inde++;
}
}
function animout(mc:MovieClip):Void {
new Tween(mc, “_x”, Strong.easeOut, mc._x, mc.myHomeX, 25);
new Tween(mc, “_y”, Strong.easeOut, mc._y, mc.myHomeY, 25);
}
for (i=1; i<=6; i++) {
this[“mc”+i].ind = i;
this[“mc”+i].onPress = function() {
startDrag(this);
this.shadow_mc._alpha = 100;
this.beingDragged = true;
};
this["mc"+i].onRelease = this["mc"+i].onReleaseOutside=function () {
this.stopDrag();
this.beingDragged = false;
if (eval(this._droptarget) == targ_mc) {
checkit();
this.onTarget = true;
projectHolder.attachMovie(this._name, "project", 1);
this.swapDepths (projectHolder);
maintext._alpha = 0;
this.shadow_mc._alpha = 0;
} else {
animout(this);
this.onTarget = false;
}
};
this["mc"+i].myHomeX = this["mc"+i]._x;
this["mc"+i].myHomeY = this["mc"+i]._y;
}
close_btn.onRelease = function() {
projectHolder.unloadMovie();
maintext._alpha=100;
for (i=1; i<=4; i++) {
animout(_root[“mc”+i]);
_root[“mc”+i].onTarget = false;
};
}[/AS]
Here is the error message I receive:
**Error** Scene=main, layer=actions, frame=1:Line 68: Syntax error.
animout(_root["mc"+i]);
**Error** Scene=main, layer=actions, frame=1:Line 69: Syntax error.
_root["mc"+i].onTarget = false;
**Error** Scene=main, layer=actions, frame=1:Line 70: Unexpected '}' encountered
};
Total ActionScript Errors: 3 Reported Errors: 3
anyone?:sigh: