Guest User

Untitled

a guest
Jan 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public function xmlLoaded(event:Event):void{
  2. xml = new XML(xmlLoader.data);
  3. xmlList = xml.children();
  4. var i:Number = xmlList.length();
  5. trace(xmlList)
  6. while(i--){
  7. addImage(xmlList[i].@job, i);
  8. total++;
  9. }
  10. }// end function
  11.  
  12. public function addImage(file:String, i:int):void {
  13. posX += 700;
  14. image = new MovieClip;
  15. with(image){
  16. x = posX;
  17. useHandCursor = true;
  18. mouseChildren = false;
  19. buttonMode = true;
  20. }//
  21.  
  22. loadImage = new Loader();
  23. loadImage.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
  24. //loadImage.load(new URLRequest(xmlList[i].@job, i));
  25.  
  26. trace(total++);
  27.  
  28.  
  29. }
  30.  
  31. public function onComplete(evt:Event):void{
  32.  
  33. //recebeImg.addChild(image);
  34.  
  35. }//end function
Add Comment
Please, Sign In to add comment