モバイル用のflex frameworkがついに出る!
これにより、flashで容易にiPhone/iPod touchアプリやiPad、Android, WindowsMobileのアプリ作れる!
すごいことになってきた。めちゃくちゃ期待している。
◯Slider:Flex Mobile Framework
http://labs.adobe.com/technologies/flex/mobile/
◯fladdict先生ブログ:Adobe, Mobile用Flex を発表
http://fladdict.net/blog/2010/04/adobe-mobile-flex.html
○as3syndicationlib
rssフィードをパースしてくれるライブラリ。
RSS1.0、RSS2.0、ATOM1.0など対応。
http://code.google.com/p/as3syndicationlib/
簡単なサンプル作成しました。
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application
xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”absolute” initialize=”init();”>
<mx:Script>
<![CDATA[
import com.adobe.xml.syndication.generic.IItem;
import com.adobe.xml.syndication.generic.IFeed;
import com.adobe.xml.syndication.generic.FeedFactory;
private function init():void
{
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("http://maxfactory.biz/blog/feed/");
loader.addEventListener(Event.COMPLETE, loadCompleteHandler);
loader.load( request );
}
private function loadCompleteHandler(e:Event):void
{
var rssString:String = URLLoader(e.target).data;
var feed:IFeed = FeedFactory.getFeedByString(rssString);
for (var i:uint=0; i<feed.items.length; i++)
{
var item:IItem = feed.items[i] as IItem;
trace( “title = ” + item.title ); //タイトル
trace( “link = ” + item.link ); //リンク
trace( “date = ” + item.date ); //日付
trace( “excerpt.value = ” + item.excerpt.value ); //記事内容(抜粋)
}
}
]]>
</mx:Script>
</mx:Application>
サンプルでは、このブログのRSS Feedを読み込んで、
記事のタイトル、日付などの情報をtraceしてます。
Feedのtype(RSS1.0、RSS2.0、ATOM1.0)を意識しないで、parseできるからいいです。