i’m new to flash, so if you kindly respond, i wish to thank you ahead of time.
here’s what i have…
layer 1: a rectangle which i have drawn with the rectangle option from ‘tools’
layer 2: actionscript which draws a circle
layer 3: actionscript which uses startdrag to attach the rectangle to my
mouse cursor
when i test the movie, the rectangle appears to pass behind the actionscript generated circle…
i would like the reverse to happen, the rectangle seeming to pass infront of or above the actionscript generated circle.
can this be done?
here’s the code of my layers…
layer 1: (no code) drawn rectangle movieclip named ‘rect’
layer 2: actionscripted circle
MovieClip.prototype.drawCircle = function(r, x, y) {
this.moveTo(x+r, y);
a = Math.tan(22.5 * Math.PI/180);
for (var angle = 45; angle<=360; angle += 45) {
// endpoint:
var endx = rMath.cos(angleMath.PI/180);
var endy = rMath.sin(angleMath.PI/180);
// control:
// (angle-90 is used to give the correct sign)
var cx =endx + raMath.cos((angle-90)Math.PI/180);
var cy =endy + ra*Math.sin((angle-90)*Math.PI/180);
this.curveTo(cx+x, cy+y, endx+x, endy+y);
}
}
xPos = 30;
yPos = 28;
_root.createEmptyMovieClip(“circle_mc”, 1);
circle_mc.lineStyle(1, 0x000000, 100);
circle_mc.beginFill(0x0000ff, 100);
circle_mc.drawCircle(37, xPos, yPos);
circle_mc.endFill();
circle_mc.onPress = function() {
trace(“pressed”);
};
layer 3: startDrag(_root.rect, true);
thanks in advance…
j.