Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lineThickness = 0;
- selectedColor = "0x000000";
- _root.onMouseDown = startDrawing;
- _root.onMouseUp = stopDrawing;
- function startDrawing() {
- if (mouseX<455) {
- _root.flash.display.Graphics.lineStyle(lineThickness, selectedColor);
- _root.moveTo(_root._xmouse, _root._ymouse);
- _root.onMouseMove = drawLine;
- }
- }
- function drawLine() {
- _root.lineTo(this._xmouse, this._ymouse);
- }
- function stopDrawing() {
- delete this.onMouseMove;
- }
- line0.onPress = function() {
- lineThickness = 0;
- };
- line3.onPress = function() {
- lineThickness = 3;
- };
- line6.onPress = function() {
- lineThickness = 6;
- };
- colorRed.onPress = function() {
- selectedColor = "0xFF0000";
- };
- colorGreen.onPress = function() {
- selectedColor = "0x00FF00";
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement