daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 50 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. import XML2Object;
  2.  
  3. var top = this;
  4. var slidesData:Object;
  5. var carouselContent:XML = new XML();
  6. carouselContent.ignoreWhite = true;
  7. carouselContent.onLoad = function(success) {
  8.     if (success) {
  9.         // Process config
  10.         var XML2Obj:XML2Object = new XML2Object();
  11.         top.slidesData = XML2Obj.parseXML(this);
  12.         getSlides(1);
  13.     } else {
  14.         trace("Cannot find file");
  15.     }
  16. };
  17. carouselContent.load("carousel.xml");
  18.  
  19. function getSlides(pageNumber:Number) {
  20.     var max:Number = 5;
  21.     var slides:Object = slidesData.slides.slide;
  22.     var start:Number = pageNumber-1;
  23.     var end:Number = start+max;
  24.     for (var i:Number = start; i<end; i++) {
  25.         createNewThumb(i);
  26.     }
  27. }
  28.  
  29. function createNewThumb(slide:Number):Void {
  30.     trace(slide);
  31.     var newThumb:MovieClip = thumbs_container.attachMovie("thumb_stump", "thumb"+i, i);
  32.     // thumbnail variables
  33.     newThumb.i = i;
  34.     newThumb._alpha = 0;
  35.     newThumb.id = slide[i].attributes.id;
  36.     newThumb.width = slide[i].attributes.width;
  37.     newThumb.label_text = slide[i].label.data;
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top