Ok I commented my code… lemme know if there is anything specific you need me to go more into detail with…
[AS]//declare trigger variable originally set to false
trigger = false;
//create the 3 clips used…
//box is the grey box in the background (created on level 1)
//line is the uhhh line (created on level 2)
//dot is the dot (created on level 3)
//++depth sets each one on a new level (only 1 clip can exist on a level)
this.createEmptyMovieClip(“box”, ++depth);
this.createEmptyMovieClip(“line”, ++depth);
this.createEmptyMovieClip(“dot”, ++depth);
//use drawing API to draw dot
//3 is line width, 0xFF0000 is hex for red, 100 is alpha
dot.lineStyle(3, 0xFF0000, 100);
dot.lineTo(.15, .45);
//set dot clip to be invisible
dot._visible = false;
//set lineStyle of line you will be drawing with
//.25 is the line width, 0 (short for black), is the color, 100 is the alpha
line.lineStyle(.25, 0, 100);
line.onMouseDown = function() {
//if when the mouse is pressed it is also over the box clip
if (box.hitTest(_xmouse, _ymouse, true)) {
//if trigger is false
if (!trigger) {
//move the line clip the current mouse position
this.moveTo(_xmouse, _ymouse);
//make the dot clip visible
dot._visible = true;
//move the dot clip to the current mouse position
dot._x=_xmouse, dot._y=_ymouse;
//set trigger to true (so this stays in original position)
trigger = true;
//else… (meaning else if trigger was true)
} else {
//draw a line to the current mouse position
this.lineTo(_xmouse, _ymouse);
//make the dot clip invisible again
dot._visible = false;
//reset the trigger back to false
trigger = false;
}
//else if the mouse is pressed when it is not over the box clip
} else {
//hide the dot clip again
dot._visible = false;
//reset trigger to false
trigger = false;
}
};
//draw box… same as before
box.lineStyle(.25, 0x000000, 50);
box.beginFill(0xEEEEEE, 50);
box.moveTo(20, 0);
box.lineTo(20, 420);
box.lineTo(400, 420);
box.lineTo(400, 0);
box.lineTo(20, 0);
box.endFill();[/AS]