Showing Flash Developer Centre headlines at your Web site

You may have noticed that some Web sites display an XML icon  and offer their news headlines via RSS syndication. You might also have wondered what RSS is and how you can use it at your own Web site. That’s why I’ve written this article - to help you learn about RSS and to show you how you can use Flash to include RSS headlines at your Web site.

In this tutorial, you’ll learn how to display Macromedia news headlines from the Flash Developer Centre on your own Web site. We’ll use the XMLConnector component and data binding so you will hardly have to write any ActionScript at all.

This tutorial uses the XMLConnector data component so you’ll need to have Flash MX 2004 Professional to work through the example here. You’ll learn about working with this component and using it to bind data to other User Interface (UI) components. You don’t need a lot of scripting experience to complete the tutorial but I have assumed that you know how to write ActionScript using the Actions panel.

You can download the source files for the tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file. The download includes the starter files you'll need as well as the completed files.

Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options… and clicking the Delete Cookies… button on the General tab.

$2.89
- OR -

Overview

What is RSS?

RSS stands for either Rich Site Summary, RDF Site Summary or Really Simple Syndication depending on which article you read. RSS is an XML vocabulary that describes information about Web site changes. In other words, it’s a way to share latest news information using XML.

RSS was originally created by Netscape as a way to provide news updates through different news channels. Since then, it’s evolved into several different versions. Each version uses a slightly different XML language and you can find out more at http://www.webreference.com/authoring/languages/xml/rss/1/. We won’t focus too much on the XML language in this article.

RSS is one way of providing a Web service. Web services allow an organization to share information with the public, using XML documents. Users request information from the Web service and receive a response formatted using XML tags. We call this process consuming a Web service. Other methods of consuming Web services include SOAP and REST which provide different interaction styles.

You can search within your favourite search engine to locate RSS feeds and other Web services. You can also see a list of Web services at http://www.flash-db.com/services/ and http://www.xmethods.com/.

You can add an RSS feed to Flash by using the XML class or by using the XMLConnector data component. The advantage of using the XMLConnector component is that you can bind the data directly to UI components. It saves you from having to write a lot of ActionScript to deal with the XML content.

You need to be aware that Flash Players 6 and 7 won’t let you load data from different domains unless the domain has a cross-domain policy file in effect on the server. Flash Player 7 won’t even allow you to load data from a subdomain within the current domain. Luckily, this won’t be an issue with the Macromedia RSS feeds.

Sas Jacobs

Sas JacobsHello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business web site
and a personal web site.

See All Postings From Sas Jacobs >>

Reviews

Be the first to write a review

You must me logged in to write a review.