A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: TileList source points to xml file

  1. #1
    Sheva
    Join Date
    May 2013
    Location
    Israel
    Posts
    2

    TileList source points to xml file

    Hi, perhaps this is an old question, but I am really not very good with AS3 to modify others or to understand others codes well enough, and need help please.

    I have a TileList and a UILoader, the TileList loads pics into UILoader by action script AS3

    Action Script 3 coding for Tilelist:

    Code:
    tilelist.addItem({source:"images/pic1.jpg"});
    tilelist.addItem({source:"images/pic2.jpg"});
    tilelist.addItem({source:"images/pic3.jpg"});
    tilelist.addItem({source:"images/pic4.jpg"});
    tilelist.addItem({source:"images/pic5.jpg"});
    tilelist.addItem({source:"images/pic6.jpg"});
    tilelist.addItem({source:"images/pic7.jpg"});
    tilelist.addItem({source:"images/pic8.jpg"});
    tilelist.addItem({source:"images/pic9.jpg"});
    
    tilelist.columnWidth = 90;
    tilelist.rowHeight = 70;
    tilelist.columnCount = 5;
    tilelist.rowCount = 1;
    
    var imgurl:String = "images/pic1.jpg";
    var myrequest:URLRequest = new URLRequest(imgurl);
    myloader.scaleContent = true;
    myloader.load(myrequest);
    
    tilelist.addEventListener(Event.CHANGE, photoselect);
    
    function photoselect (event:Event):void{
    	var imgurl:String = tilelist.selectedItem.source;
    	var myrequest:URLRequest = new URLRequest(imgurl);
    	myloader.scaleContent = true;
    	myloader.load(myrequest);
    }

    but, I want my source links to appear in an external XML to make it easier to update.

    How do I change the coding on top to do that?

    Thanks
    Bat Sheva
    Attached Images Attached Images

  2. #2
    Sheva
    Join Date
    May 2013
    Location
    Israel
    Posts
    2
    sorry, not all source files downloaded

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center