资 源 简 介
UrlUtils - AS3 Url Util swc
This is a collection of time saving classes all based around external url events. Please view source for complete asdocs.
Functions featured are:
Return an Object (swf, jpg, gif etc)
```
private function loadObject():void
{
MovieClip(object) = URLUtils.returnObject("url");
object.addEventListener(URLUtilsEvent.OBJECT_LOADED, objectLoaded);
}
private function objectLoaded(e:URLUtilsEvent):void
{
this.addChild(object);
}
```
Return JSON
```
private function loadJSON():void
{
JSONLoader(json) = URLUtils.returnJSON("url");
json.addEventListener(URLUtilsEvent.JSON_LOADED, jsonLoaded);
}
private function jsonLoaded(e:URLUtilsEvent):void
{
trace(json.jsonObject);
}
```
Return XML
```
private function loadXML():void
{
XMLLoader(xml) = URLUtils.returnXML("url");
xml.addEventListener(URLUtilsEvent.XML_LOADED, xmlLoaded);
}