package{ import flash.display.Sprite; import flash.text.*; import mx.rpc.http.*; import mx.rpc.events.*; public class RingiDemo2 extends Sprite{ private var hs:HTTPService=new HTTPService(); public function RingiDemo2(){ hs.url="pallid.xml"; hs.addEventListener(ResultEvent.RESULT, andmetePyydja); hs.send(); } private function andmetePyydja(e:ResultEvent):void{ for each (var p:Object in e.result.pallid.pall){ var ring1:Sprite=new Sprite(); ring1.graphics.beginFill(0XFF000000); ring1.graphics.drawCircle(0, 0, 10); addChild(ring1); ring1.x=p.x; ring1.y=p.y; } } } }