About Custom XML News Reader AS2
This file is meant to be fully customizable through the editing of the supplied XML file. You can set the file to size automatically to the screen size, or to stay at a static width/height. The body copy for each new item is designed to word-wrap around an image. You can add as many news items as you would like through the XML and the .swf will adjust accordingly.
The .FLA File
You will only need to edit the .fla file if you are attempting to modify the News Reader beyond the capabilities of the XML file, or if you name your XML file a different name than the supplied XML.
The .XML File
The XML files contains all of the varibles you will need to edit your News Reader. Listed below are each of the tags and what they will edit within the .swf
- SETUP Section - Here are the tags and what they are used for:
- WIDTH - Set the width of your News Reader (This is used mainly when SCALABLE is set to "false").
- HEIGHT - Set the height of your News Reader (This is used mainly when SCALABLE is set to "false").
- HORIZONTAL_PADDING - Set the amount of padding you want on each side of your News Reader (This is used mainly when SCALABLE is set to "true").
- VERTICLE_PADDING - Set the amount of padding you want on the top & bottom of your News Reader (This is used mainly when SCALABLE is set to "true").
- SCALABLE - Set "true" if you want your News Reader to scale with the browser, otherwise "false".
- MAIN_BG_COLOR - Set the color of the News Reader Background.
- ATTRIBUTE opacity - Set the opacity of the background (0-1).
- MAIN_HEADING - Set the text for the main heading.
- MAIN_HEADING_COLOR - Set the color for the main heading.
- DATE_COLOR - Set the color of the date for each news item.
- HEADING_COLOR - Set the color of the heading for each news item.
- COPY_COLOR - Set the color of the body copy for each news item.
- EXPAND_TEXT_COLOR - Set the color of the "...CLICK TO EXPAND" text that shows up when a news block is in condensed mode.
- LINK_UP_COLOR - Set the up-color of the new items links.
- LINK_OVER_COLOR - Set the over-color of the new items links.
- BACKGROUND_UP_COLOR - Set the up-color of the new items backgrounds.
- ATTRIBUTE opacity - Set the opacity of the background (0-1).
- BACKGROUND_OVER_COLOR - Set the over-color of the new items backgrounds.
- ATTRIBUTE opacity - Set the opacity of the background (0-1).
- IMAGE_COLOR - Set the color of the outline of the images for each news item.
- SCROLL_BG_COLOR - Set the color of the scrollbar background.
- SCROLL_DRAGGER_COLOR - Set the color of the scrollbar dragger.
- NEWS_ITEMS Section:
- NEWS_ITEM - Container to hold each of the news items.
- DATE - Type the date of the news item.
- HEADING - Set the heading text for the news item.
- COPY - Set the tex of the body copy for the news item
- PIC - Set the path of the image for the news item (Image must be 80 x 80 pixels).
- LINK - Set links for the news item. The links should be set up as follows:
- TheTextToAppearOnScreen:::http://www.yourwebpage.com/
- You must use ":::" between the onscreen text and the web address in order for the link to work.
- ATTRIBUTE window - Set the mode for the link to open.
- "_self" specifies the current frame in the current window.
- "_blank" specifies a new window.
- "_parent" specifies the parent of the current frame.
- "_top" specifies the top-level frame in the current window.
To Load Custom XML News Reader AS3 as an external SWF into another SWF
If you want to load your News Reader into another SWF (website template), you must follow these steps:
- Set the SCALABE tag in the XML to "false".
- Make sure the paths to all of your news images are set relative to the main .swf's root.
- Open the News Reader .fla
- Make sure the path to your XML is set relative to the main .swf's root.
- This is located on line 38 of the Actions Layer in the NewsReader movie clip
- Set the stage size of the News Reader .fla to match the dimensions set in your XML file.
- In the root timeline of the News Reader .fla
- Set the size of the background in the root timeline to the same dimension as your stage. (Or delete the layer if you do not want it).
- Comment out all of the code in the actions layer of the root timeline.
- If you are using my website template, un-comment line 7 of the actions layer of the main timeline
- It should read "function closeStreams():void{}" - This does not call anything within the News Reader .fla, but it is needed for it to load properly into my template.
This file uses Caurana Tweener
Documentation for Tweener can be found at http://code.google.com/p/tweener/
Licensing for Tweener can be found at http://www.opensource.org/licenses/mit-license.php
Licensing notice for Caurina Tweener
The MIT License
Copyright (c)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

