Joint points game, problem with clipEvent.....your help please

Hi everyone…
I made a game with joint points and find out what object is hidden…

I have 6 points (“dot1”, “dot2”, “dot3”, “dot4”, “dot5”, “dot6”), a line (“line”) and a controler… All this game is in a MovieClip…

In the controler I am writing…

onClipEvent (load) {
_parent.line._visible = 0;
number_lines = 0;
line_active = 0;
current_dot = 1;
total_dots = 6;
}

onClipEvent (mouseUp) {
if (_parent[“dot”+current_dot].hitTest(_root._xmouse, _root._ymouse)) {
origin_x = _root._xmouse;
origin_y = _root._ymouse;
number_lines++;
current_dot++;
name = “line”+number_lines;
_parent.line.duplicateMovieClip(name, number_lines);
_root[name]._x = origin_x;
_root[name]._y = origin_y;
_root[name]._xscale = _root._xmouse-origin_x;
_root[name]._yscale = _root._ymouse-origin_y;
if (!line_active) {
line_active = 1;
start_x = origin_x;
start_y = origin_y;
}
} else if (current_dot == (total_dots+1)) {
line_active = 0;
}
}
onClipEvent (mouseMove) {
if (line_active) {
root[name]._xscale = _root._xmouse-origin_x;
root[name]._yscale = _root._ymouse-origin_y;
updateAfterEvent();
}
}

And it is working perfect…

but how can make it, when the lines are 6, so I finished my shape all around, to…gotoAndPlay(“foto1”)…(that shows the hidden shape.
and how, when I finish, I will change the image underneath and the number of points?