| Package | yourminis.api.net |
| Class | public class RSSLoader |
| Inheritance | RSSLoader flash.net.URLLoader |
See also
| Property | Defined by | ||
|---|---|---|---|
| noCache : Boolean | RSSLoader | ||
| Method | Defined by | ||
|---|---|---|---|
|
getAuthorization():String
Returns the authorization code for the widget in Base64 encoded form
| RSSLoader | ||
|
getProxyUrl(url:String):String
Helper function to build the yourminis.com proxy URL
| RSSLoader | ||
|
ioErrorHandler(evt:IOErrorEvent):*
| RSSLoader | ||
|
load(request:URLRequest):void
Load an RSS feed.
| RSSLoader | ||
|
loadRSS(url:String, un:String = "", pass:String = ""):void
Load a secured RSS feed.
| RSSLoader | ||
|
onRSSComplete(evt:Event):void
| RSSLoader | ||
|
securityErrorHandler(evt:SecurityErrorEvent):*
| RSSLoader | ||
|
setAuthorization(un:*, pw:*):void
Sets the authorization for the feed given a username and password
| RSSLoader | ||
|
setEncodedAuthorization(a:*):void
Sets the authorization for the feed (for example, you might store the authorization instead of the username/password if one were to copy the widget)
| RSSLoader | ||
| noCache | property |
public var noCache:Boolean
| getAuthorization | () | method |
public function getAuthorization():StringReturns the authorization code for the widget in Base64 encoded form
ReturnsString |
See also
| getProxyUrl | () | method |
public function getProxyUrl(url:String):StringHelper function to build the yourminis.com proxy URL
Parametersurl:String — The URL to the RSS Feed
|
String |
See also
| ioErrorHandler | () | method |
public function ioErrorHandler(evt:IOErrorEvent):*Parameters
evt:IOErrorEvent |
* |
| load | () | method |
public override function load(request:URLRequest):voidLoad an RSS feed. The feed will be converted to RSS 2.0, cached and proxied from the yourminis widget server.
Parametersrequest:URLRequest — The URL of the feed.
|
See also
var widget; //Widget
var rss;
addEventListener("widget-loaded",onWidgetLoaded);
function onWidgetLoaded(evt:Event)
{
//your widget has started and is ready for display
rss = widget.newRSS();
rss.addEventListener(Event.COMPLETE,onRSSLoaded);
rss.load(new URLRequest("http://feeds.feedburner.com/yourminis"));
}
function onRSSLoaded(evt:Event)
{
var loader:URLLoader = URLLoader(evt.target);
namespace dc="http://purl.org/dc/elements/1.1/";
namespace content="http://purl.org/rss/1.0/modules/content/";
namespace geo="http://www.w3.org/2003/01/geo/wgs84_pos#";
var rssxml:XML = XML(loader.data);
var str = "";
for each (var item:XML in rssxml..item)
{
str+="<b><a href='" + item.link + "' target='_blank'><u>" + item.title + "</u></a></b>";
str+="<br/>" + item.description + "<br/><br/>";
}
output_txt.htmlText = str;
}
| loadRSS | () | method |
public function loadRSS(url:String, un:String = "", pass:String = ""):voidLoad a secured RSS feed. The feed will be converted to RSS 2.0, cached (for non-authorized requests) and proxied from the yourminis widget server. Authorization is optional.
Parametersurl:String — The URL of the feed.
|
|
un:String (default = "") — username (secure feed)
|
|
pass:String (default = "") — password (secure feed)
|
See also
| onRSSComplete | () | method |
public function onRSSComplete(evt:Event):voidParameters
evt:Event |
| securityErrorHandler | () | method |
public function securityErrorHandler(evt:SecurityErrorEvent):*Parameters
evt:SecurityErrorEvent |
* |
| setAuthorization | () | method |
public function setAuthorization(un:*, pw:*):voidSets the authorization for the feed given a username and password
Parametersun:* — The username for the feed.
|
|
pw:* — The username for the feed.
|
See also
| setEncodedAuthorization | () | method |
public function setEncodedAuthorization(a:*):voidSets the authorization for the feed (for example, you might store the authorization instead of the username/password if one were to copy the widget)
Parametersa:* — The encoded authorization string for the feed.
|
See also