PDA

View Full Version : Linestyle


Netunner
10-04-2002, 02:47 PM
I have a movie that dinamically creates a clip called line which draws a line everytime the user clicks'n drags the mouse around the screen.
I would like to create 2 buttons that let the user choose 2 different sizes for this line.

the code i write in frame 1 to create and manage the "line" clip is the following:

_______________________________________________
_root.createEmptyMovieClip("line", 1);
_root.onMouseDown = function() {
line.moveTo(_xmouse, _ymouse);
line.lineStyle(10, 0xFA5B45, 75);
this.onMouseMove = function() {
line.lineTo(_xmouse, _ymouse);
updateAfterEvent();
};
};
_root.onMouseUp = function() {
this.onMouseMove = null;
};

_______________________________________________
How do i do this?
Thanks again
NeT

red penguin
10-04-2002, 06:24 PM
Okay. So what do you know about that line as you are making it. (hint: linestyle)

Three things.[list=1]
line size
color
alpha
[/list=1]

Guess what you'd have to change to get a different size line?

Yup...Numero Uno, comrade. Make it a variable and on your buttons just assign it a new number. Easy peasy.

Put your thinking cap back on. I think it fell off somewhere between Pittsburgh and Albuquerque.

pom
10-06-2002, 04:37 PM
:D :D :D