i preparing interactive education cd. 13th frame in unit 2. There is drag draw codes. it is working.it appear in other frame when i run flash.
_root.createEmptyMovieClip("line_mc",0);
MovieClip.prototype.drawLine = function()
{
this.clear();
this.lineStyle(2,0xFF0000,100);
this.moveTo(mc1._x, mc1._y);
this.lineTo(mc2._x, mc2._y);
}
// insure movieclips are in front of line
// draw initial line
line_mc.drawLine();
mc2.onPress = function()
{
this.startDrag();
line_mc.onEnterFrame = drawLine;
}
_root.createEmptyMovieClip("line_mc2", 1);
MovieClip.prototype.drawLine2 = function()
{
this.clear();
this.lineStyle(2,0xFF0000,100);
this.moveTo(mc3._x, mc3._y);
this.lineTo(mc4._x, mc4._y);
}
// insure movieclips are in front of line
// draw initial line
line_mc2.drawLine2();
mc4.onPress = function()
{
this.startDrag();
line_mc2.onEnterFrame = drawLine2;
}
However, when call it using loadmovie, it appear but it doesnt work.
How i can solve this problem?