PDA

View Full Version : need help...


Pratap
09-19-2006, 02:56 PM
hi...
am dawing a box in movie clip using linestyle in that...
somehting like.....
this.createEmptyMovieClip("triangle_mc", 1);
triangle_mc.lineStyle(5, 0xff00ff, 100);
triangle_mc.moveTo(200, 200);
triangle_mc.lineTo(300, 300);
triangle_mc.lineTo(100, 300);
triangle_mc.lineTo(200, 200);

now.. on some event i wanna change the linestyle of that movieclip i.e., i wanna change the thickness and color of the line.
any possiblity there??
if yes.. let me know plz.........
waiting for reply....
tnx in advanceeeeeeeeeeeeeee

eliddell
09-19-2006, 03:27 PM
all you have to do is on the event use the same code as you used to create the original and change the things about it you want.. since you have assigned it an instance name.. if you create a new triangle with the same instance name it will replace it.

try making a button for instance and paste this code

on(release){
this.createEmptyMovieClip("triangle_mc", 1);
triangle_mc.lineStyle(1, 0xff00ff, 100); // change the specs or your new one
triangle_mc.moveTo(200, 200);
triangle_mc.lineTo(300, 300);
triangle_mc.lineTo(100, 300);
triangle_mc.lineTo(200, 200);
}