Hi all,
I’m moderately advanced in regular Flash (without the AS), but beginner (very basic knowledge) of AS.
I’ve made a Flash ad-banner. I have a dynamic texfield into which I loaded a external RSS-feed from a Dutch newspaper-website. I’ve searched and read and came up with a basic AS to load the first 8 titles. So I know how to do that now. And it works.
BUT: now I need several thing that I’ve spent 3 days searching for, but haven’t found yet, in a way I can understand it anyway…
- I need the titles displayed to become clickable links each. They need to dynamicly load the suiting url from the xml-file.
Example of 1 item from xml:
<item>
<title>'Bezuiniging maakt gedetineerden agressief'
<description>
HILVERSUM (ANP) - Door bezuinigingen van het kabinet op het gevangeniswezen blijven gedetineerden te lang in hun cel zitten, waardoor de kans op agressie en op escalaties toeneemt. Dat stelde de voormalig woordvoerder van de Vereniging van Gevangenisdirecteuren (VDPI), P. Scheffelaar Klots, vrijdag.
</description>
<link>http://spitsnet.nl/anp.php?rid=16&id=364427
<category>Binnenland
<author/>
<pubDate>Fri, 13 May 2005 20:43:28 GMT
</item>
I’ve loaded the nodevalue of the <titel> child, but that text should be clickable and have the url displayed in the <link> child.
Can’t figure out how to write the AS so the corresponding url loads to the title.
- Problem 2: I want to style the output links. I know about “Render text as HTML” button
, but I don’t know what code to add in the AS to control font size and color.
I need to understand how to do this so I can maybe add the corresponding <description> underneath the title/link for another (larger) banner, where the link is bold/red/12pt and the description underneath is regular/black/10 pt, for example.
Last (sorry that it’s too much, just see what part you can help me with here…): I chose 8 item titles to be displayed for this banner, after that the swf loops. Problem is, the external rss-feed sometimes has, let’s say 2 items (mostly late at night). My banner then displays these 2 titles, and scrools -of course- the whole textfield like it normally would, but it’s blank space underneath the 2 items. I’ve saved the file for Flash Player 6, so the space will be blank. If I save it for 7, it displays the text ‘undefined’ for the last 6 items (which aren’t there in the xml at that moment). Any solutions?
Final notes: I know my AS is childish and too long, I know there are ways to shorten the path to the nodevalues, but I’ve only just learned this and I’m not sure how to do it.
I so hope anyone of you can get me started again!! Thanks in advance!
NB: for the ultimate version there’s graphics etc, I stripped this to the bare essentials for this forum. The ultimate version refers to a proxy.php to be able to load the external rss from the other server. For now, it refers to an example xml on the same server (so no proxy).
Link to local example xml-file
[url=“http://angie.the-facials.com/rss-banner_mx.fla”]Link to MX version of FLA (hope it works)
I can also post the relevant AS if more conveniant. Thanks!