Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. lineThickness = 0;
  2. selectedColor = "0x000000";
  3. _root.onMouseDown = startDrawing;
  4. _root.onMouseUp = stopDrawing;
  5. function startDrawing() {
  6. if (_xmouse<455) {
  7. _root.lineStyle(lineThickness, selectedColor);
  8. _root.moveTo(_root._xmouse, _root._ymouse);
  9. _root.onMouseMove = drawLine;
  10. }
  11. }
  12. function drawLine() {
  13. _root.lineTo(this._xmouse, this._ymouse);
  14. }
  15. function stopDrawing() {
  16. delete this.onMouseMove;
  17. }
  18. line0.onPress = function() {
  19. lineThickness = 0;
  20. };
  21. line3.onPress = function() {
  22. lineThickness = 3;
  23. };
  24. line6.onPress = function() {
  25. lineThickness = 6;
  26. };
  27. colorRed.onPress = function() {
  28. selectedColor = "0xFF0000";
  29. };
  30. colorGreen.onPress = function() {
  31. selectedColor = "0x00FF00";
  32. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement