Advertisement
Guest User

Untitled

a guest
Aug 1st, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function _xmlCompleteHandler(event:LoaderEvent):void {
  2. _slides = [];
  3. var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
  4. var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
  5. //loop through each <image /> node and create a Slide object for each.
  6. for each (var image:XML in imageList) {
  7.  _slides.push( new Slide(image.@name,
  8.        image.@description,
  9.        new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
  10.            {
  11.             name:image.@name + "Thumb",
  12.             width:_THUMB_WIDTH,
  13.             height:_THUMB_HEIGHT,
  14.             //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
  15.             //x:260, y:320,//doesn't work here but works in line 69
  16.             scaleMode:"proportionalInside",
  17.             bgColor:0x000000,
  18.             estimatedBytes:13000,
  19.             onFail:_imageFailHandler}),
  20.        new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
  21.             {
  22.              name:image.@name + "Image",
  23.              width:_IMAGE_WIDTH,
  24.              height:_IMAGE_HEIGHT,
  25.              //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
  26.              x:0, y:144,
  27.              scaleMode:"proportionalInside",
  28.              bgColor:0x000000,
  29.              estimatedBytes:820000,
  30.              onFail:_imageFailHandler})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement