1.  
  2. var slideLeft = function(e) {
  3. if (!timer1.getEnabled()) {
  4. timer1.start();
  5. }
  6. var ct = 0;
  7. var moveLeft = function(e) {
  8. for (var i=0;i<SLIDE_SPEED;i++) {
  9. if (pictureSlider2Panel._colsArray.length > 0 && ct < SLIDE_AMOUNT) {
  10. left = pictureSlider2Panel.getLeft();
  11. pictureSlider2Panel.setLeft(--left);
  12. ct++;
  13. } else {
  14. timer1.stop();
  15. page++;
  16.  
  17. if (pictureSlider2Panel.getWidth() == (left * -1)) {
  18. loading.setStyleProperty("display", "");
  19. newUrl = url + "?method=flickr.people.getPublicPhotos&api_key=441ef2290693d3ba44131a3e5279f687&user_id=31052081@N00&per_page=3" + "&page=" + page;
  20. xmlLoader.setUri(newUrl);
  21. xmlLoader.load();
  22. }
  23. ct = 0;
  24. break;
  25. }
  26. }
  27. if (left == 0) {
  28. leftBtn.setEnabled(false);
  29. leftBtn.setUri("./leftBtnDisabled.gif");
  30. } else {
  31. leftBtn.setEnabled(true);
  32. leftBtn.setUri("./leftBtnActive.gif");
  33. }
  34. }
  35. if (!timer1.hasListeners("tick")) {
  36. timer1.addEventListener("tick", moveLeft);
  37. }
  38. }
  39.  
  40.