[sam_ad id=”19″ codes=”true”]Alright so its really as simple as jalebi (An Indian sweet dish) and it is equivalent to English saying which goes like this
“Its as clear as mud”
Before I continue with my article I would like to share a nice book on Flex which covers lot of things.
If you already don’t have this book then get it off Amazon. The link is at the right. I read it, that’s why I can recommend it to others.
Now that I have told you about Jalebi’s and Mud it time to get to the point. I am not going to try to make this look like there is lot of hard work involved instead I will keep it simple.
First up fire up your Flash builder 4.5+ and create a new Flex mobile project (View based application) called jaspreetchahal 🙂 I am using my name but trust me I never do that myself. I am doing this so that you can remember that some random guy helped you on Internet 🙂
Do I need to to put a screenshot for how to create a Flex Mobile project. I would say no. But let put one screenshot anyway where you select what type of application will it be. Lets select “View based application” as shown below
Now that you’ve create a new Flex mobile project its about time to do something interesting.
From your Flash builder menu goto Data > Connect to Data/Service (or optionally from a tab at bottom of you page called Data/service)
Select XML. Click Next. Select URL radio button. Enter URL as http://jaspreetchahal.org/feed and click invoke. Screen shot is shown below
Remember to select appropriate node. In my case I am going to iterate on Item element of my feed. Reason because that is the only element I am interested in. Here is the URL for you again to browse
http://jaspreetchahal.org/feed/
Click Finish
A new service will be created for you with name jcFeed. Check out the Data/Service tab at the bottom of the page as shown below. You will have Item Object available and an array of Item array is available via getData function.
Rest of the steps are shown below in my First ever video tutorial 🙂
If you cannot get the above video working then here is the direct link
http://www.youtube.com/watch?v=0_GJHUQHUtw
I hope you like my first video tutorial.
Project files are available for download too if you wish to play around.
{filelink=9}
For your information this is the plugin that I use to make my blog Mobile and Tablet compliant
[sam_ad id=”28″ codes=”true”]
Hello,
I have tried with your code to fetch news from RSS. It works absolutely fine for me.
When I am trying to fetch news from http://news.google.com/news?pz=1&cf=all&ned=in&hl=en&output=rss,
it shows me that access of undefined property pz, cf, ned, hl and output.
Further, as a trial I defined those variable as a stirng like,
var pz:String = new String();
var cf:String = new String();
var ned:String = new String();
var hl:String = new String();
var output:String = new String();
Then code does not show any error(red cross sign) as of now.
When I run this application it shows me error like this:
TypeError: Error #1090: XML parser failure: element is malformed.
Can you show what am I doing erong in this?
I have a task to fetching a news.
Thanx in advance.
-Rahul PAtel
Hello jaspreet, I have to open a test.html in flex app. I have tried with stagewebview that you have suggest: I have copied code her. It works fine on my PC, but when I deployed it on ipad it does not show anything.
protected var swv:StageWebView = null;
private var url:String = new String(stringnaveed.text);
protected function view1_creationCompleteHandler(event:FlexEvent):void
{
// TODO Auto-generated method stub
if(StageWebView.isSupported == true)
{
swv = new StageWebView();
swv.viewPort = new Rectangle(0,80,600,600);
swv.stage = this.stage;
swv.loadURL(url);
}
}
Can you provide your few minutes to solve this issue?
Hello, grt work.
Hey, i’ve built an flash builder mobile app. I am having trouble displaying the description of the feeds I am using. Do you think you could help me?
Hi Jeremy,
I’ve covered pretty much everything that’s required in the video tutorial. But if you have some specific problem and I can understand your question, definitely I will be here to help. If you haven’t watched the Video, do so. I know my English sucks but you will get the idea.
Cheers!