Hi im currently working on making and filling closed figures with straight lines.
A portion of my code is as such.
name = "line"+number_line;
mc0 = _root.createEmptyMovieClip(name, number_line);
mc0.lineStyle(1, 0x1919B3, 100);
number_line++;
name = "line"+number_line;
mc1 = _root.createEmptyMovieClip(name, number_line);
mc0.moveTo(xArray[0], yArray[0]);
mc1.moveTo(_root[state](xArray[0], yArray[0]).x, _root[state](xArray[0], yArray[0]).y);
mc0.beginFill(x0ffffff, 100);
for (var i = 0; i<arrayPos; i++) {
if (xArray[i+1] != undefined || xArray[i+1] != null) {
mc0.lineTo(xArray[i+1], yArray[i+1]);
mc1.lineStyle(1, 0x12127D, 100);
mc1.lineTo(_root[state](xArray[i+1], yArray[i+1]).x, _root[state](xArray[i+1], yArray[i+1]).y);
number_line++;
}
}
xArray and yArray are the arrays that stores each line position and i am wonder why begin fill does nothing, please advise, thanks in adv!