Advertisement
bowenac

index.html move left

Jan 4th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. /**
  2. * Display Uplaoded Picture
  3. */
  4. displayLabel = function () {
  5.  
  6. var image = new Image();
  7.  
  8.  
  9. // Invoked when the picture is loaded
  10. image.onload = function (event) {
  11.  
  12. // Display Uplaoded Picture
  13. var upload = new createjs.Bitmap(event.target);
  14.  
  15. upload.y = 100;
  16. upload.x = 100;
  17. upload.height = 150;
  18. upload.width = 150;
  19. stage.addChild(upload);
  20. stage.update();
  21.  
  22. // Enable drag'n'drop on Picture
  23. enableDrag(upload)
  24.  
  25. }
  26. image.src = "images/sample.jpg";
  27.  
  28. }
  29. function left() {
  30. upload.x += 5; // move image by 5px
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement