|
|
RSS TemplateWe have created a RSS library to allow for easy creation of text feeds into your widget. Here's an example: What does the RSS Template and library provide to me? The complete zip package available at the very bottom of these sections contains ready to go flash source files for you to add your design and modify slightly (adding your rss feed url). The library used in the template does all the hard work for you by reading the xml file and finding all the necessary information it needs to display. For now, you're only provided with one method, which to load the xml url, and we will continue to re-factor the code to provide you with more options such as setting styles or animations. Setting Your Development Environment(Flash Pro/Flash CS3):Before we proceed, you need to setup your development environment in Flash Pro or the new Flash CS3. When importing external *.as files, the classpaths must be setup correctly in the corresponding fla file or in the development environment to use any available public methods provided by libraries. First let's setup the folder structure for our project. Create folders and subfolders are shown below. My Projects (root)
The folder structure above will be the foundation for all the code libraries that we provide however as a third party developer you can stick to your own conventions. Breakdown of Folder Structure
com > util > rss: Adding a Classpath
As mentioned before, we prefer to add classpaths in source flash files (*.FLA) settings so that users do not need to change or add to their native Flash Pro or CS3 environment settings, and add ease to the portability of our source files. Usage InstructionsReady to go
1. Download the complete RSS template package in zip format called "MyRSSViewer.zip". 2. Save to your favorite Projects folder and unzip. 3. Open the source file located in "MyRSSViewer > MyRSSExample > source" called "RSSExample.fla". 4. Select the first frame called "Actions" and view the frame code in your "Actions Panel". Find "http://www.widgify.com/?feed=rss2" and replace with your own rss feed url. 5. Add to the canvas your own look and feel. Preview your results by going to "File > Publish Preview > Flash". From scratch
1. Go through "Setting Your Development Environment" and replicate the folder structure from that section. 2. Download and save the file called "ViewRSS.as" to "com > util > rss" folder. 2. Create a new Flash file. Save this file to "my_rss_project > source" as "MyRSS.fla". Remember to add the classpath to where you saved the "ViewRSS.as" file (com > util > rss). 3. Now create a dynamic text field on the canvas named rssText_txt. 4. Then drag the scrollbar ui from the Component library. Make sure to snap the scrollbar to the dynamic text field (drag to it). 5. Create a layer called "Actions" and paste into your "Actions Panel" the code from below in the "Example code:" section. 6. Replace the value for "rssFeed" to your xml feed. 7. Don't forget to save! Example code// Import Library ViewRSS API(s)
Current Available Methods:
More methods will be built into the library as the flowchart outlines. Check back for updates on the code at later times. Check it outComplete RSS Template PackageIndividual FilesNext StepsBuild a cool Slideshow widget! |