Flash Widget(with source) to display live updates

Hey all
This is a small flash banner to display messages from an XML file and auto refreshes to show new updates. Just thought of sharing it.
It is a dynamic XML powered flash CS3 swf file with a few customizing options.
It is useful for displaying your website updates or showing dynamic chat messages.
It auto refreshes the text content with a time interval specified in the xml file. The time gap between each message being displayed can also set in the same xml file.

Get Adobe Flash player

The swf initially loads updates_setup.xml (shown below)

<data>
<title>Set your title here</title>
<data_source>updates.xml</data_source>
<reload_source_delay>0</reload_source_delay>
<next_update_delay>10</next_update_delay>
</data>

<data><title>Set your title here</title><data_source>updates.xml</data_source><reload_source_delay>0</reload_source_delay><next_update_delay>10</next_update_delay></data>

The <title> tag sets the title of the display widget.

The <data_source> is the relative path to the second xml file which contains the text content to be displayed (see below).

<reload_source_delay> must specify the time(beginning right after the xml loads) in seconds after which the text content auto refreshes itself. Set it to zero, if you want to disable auto refresh. Setting it to a value less than 10 seconds is not desirable.

<next_update_delay> will decide the time interval(beginning right after the previous message is shown) in seconds after which the next message/update is displayed. This value must be greater than the <reload_source_delay>, failing which the text content updates and shows the first update before all the remaining updates are shown.

Next, the swf will load updates.xml file and the updates get displayed

The Zip file attached includes the 2 XML files, the source .fla file and the TweenLite class required for the Tween. Extract all file to a single folder. Then open the .fla file in Adobe Flash CS3/4 if you want to modify it. The full source code is present in updates_class.as.

If you want to upload the files to your website without any modifications, you must upload updates_setup.xml,updates.xml and updates.swf into the same directory and then include a flash embed code in the html file on which you want to display the updates.

P.S: If the widget doesnt display updates on your site.. and just shows “loading..”, it could be that the url path of not pointing to the right XML. If you arent sure what relative and absolute urls are, just try using the url like http://yoursite.com/your_directory/updates.xml.

Flash Updates Widget
(1805 hits)
Flash Updates Widget
Download

Incoming search terms:

3 thoughts on “Flash Widget(with source) to display live updates

    1. admin

      Flash CS3 is only required if you want to make any modifications to the source (.fla) file or the actionscript code(in case you want to add more features or to check how it is coded). Otherwise you could just upload it to your site as it is by just specifying the text to be displayed in the XML file…. the xml file can be opened in any simple text editor.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>