 | 12: public function load():void { // 追加 13: var request:URLRequest = new URLRequest("http://localhost:3000/stickies.xml"); 14: request.method = 'GET'; 15: var loader:URLLoader = new URLLoader(); 16: loader.addEventListener(Event.COMPLETE, function(e:Event):void { 17: messages.text += e.target.data + "\n"; 18: var xml:XML = new XML(e.target.data); 19: var sticky:Sticky = new Sticky(); 20: sticky.id = xml.sticky.id; 21: sticky.editor.text = xml.sticky.body; 22: sticky.window.x = xml.sticky.x * Capabilities.screenResolutionX; 23: sticky.window.y = xml.sticky.y * Capabilities.screenResolutionY; 24: sticky.window.width = xml.sticky.width; 25: sticky.window.height = xml.sticky.height; 26: sticky.show(); 27: stickies.push(sticky); 28: }); 29: loader.load(request); 30: }
|  |