I'm trying to draw 2 dynamic, user-created lines onstage at once, and nothing is working...
right now, I have two layers, on layer one, it had the following actionscript:
obviously, this layer contains the char mc ( and the as based Line mc)Code:createEmptyMovieClip("Line",1); Line.lineStyle(4,0x00ccff,100); char.onEnterFrame = function() { Line.moveTo(char._x, char._y); onEnterFrame = function () { Line.lineTo(char._x, char._y); } if (Key.isDown (Key.UP)) { char._y -= 2; } if (Key.isDown (Key.DOWN)) { char._y += 2; } if (Key.isDown (Key.RIGHT)) { char._x += 2; } if (Key.isDown (Key.LEFT)) { char._x -= 2; } } stop();
on the 2nd layer
again, on this layer there is an mc called char2Code:createEmptyMovieClip("Line2",2); Line2.lineStyle(4,0x990000,100); bob.onEnterFrame = function() { Line2.moveTo(char2._x, char2._y); onEnterFrame = function () { Line2.lineTo(char2._x, char2._y); } char2._x = _xmouse; char2._y = _ymouse; } stop();
for some reason, ^this^ doesn't work, but it will work if I do this:
Code:createEmptyMovieClip("Line2",2); Line2.lineStyle(4,0x990000,100); bob.onEnterFrame = function() { Line2.moveTo(_xmouse._x, _ymouse); onEnterFrame = function () { Line2.lineTo(_xmouse, _ymouse); } } stop();
can anybody save my head from exploding?




Reply With Quote