Fun experiment ... why is it not working?

i’m trying to create the illusion of cracking glass onMouseDown

so when the user presses the mouse button i take the current coordinates, move blank MCs there and then move them off in random directions, i then take another set of blank MCs and use those to draw lines from where the mouse was pressed to it’s current location.

i think this will give the appearance of cracking glass

here’s the code i have so far


for (i=0; i<Math.random()*4+2; i++) {
	_root.createEmptyMovieClip("crack"+i, 10+i);
	_root.createEmptyMovieClip("line"+i, 20+i);
}
onMouseDown = function () {
	mouseX = _xmouse;
	mouseY = _ymouse;
	crack*._x = mouseX;
	crack*._y = mouseY;
	crackle();
};
onEnterFrame = function () {
	crackX = crack*._x;
	crackY = crack*._y;
};
crackle = function () {
	crack*._x += Math.random()*10-5;
	crack*._y += Math.random()*10-5;
	_root.line*.lineStyle(1, 0x000000, 80);
	_root.line*.moveTo(mouseX, mouseY);
	_root.lineStyle*.lineTo(crackX, crackY);
};

there are no symbols in my movie so just copy and paste that code onto frame one and you’ll have what i do. but it’s not working yet :frowning:

any help would be appreciated
thanks =)

of the top I see a typo

last line (not the }; ;))

I don’t know what it is…most likely a pathing problem. I just thought I’d tell you that I know how you feel. Whenever I tried to write AS experiments they didn’t work:-\

I’m sure someone can help you out tho;)