Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Sliding Interface - Using Links from an XML file Problem

my poor knowledge of flash is driving me insane!



10:05 am on Mar 11, 2008 (gmt 0)

5+ Year Member

Hi All,

Working on a new site for the company i've recently started working for... fairly new to flash but wanted to try this sliding interface for the graphic banner at the top of the page...

have a look here at an early version of the site - sliding graphic interface at the top with coloured rollover buttons (a lot of work still to do! feel free to post constructive criticism)

(link removed - doh - sorry just seen the rules about posting links... anyway)

The Problem:

I am pulling in a 'heading' 'text' and 'image' into the sliding graphic interface from the following xml file... (there are 4 different xml files for 4 different slides)

<?xml version="1.0" encoding="iso-8859-1"?>
<heading>Interested in selling our health plans?</heading>
<text>Click here to learn more...</text>

I want to add a link to the xml that would be specific to each instance of the window...



But my limited knowledge of flash means I have no idea how to pull the link through from the xml file to use in the flash...

Perhaps I need link text to pull as well


<link-text>click here to contact us</link-text>

Here is the function that pulls in the img, heading and txt

public function onComplete(event:Event):void {
var loader:URLLoader = event.target as URLLoader;
if (loader != null) {
externalXML = new XML(loader.data);
mover_mc.heading_txt.htmlText = externalXML.dialogue[0].heading;
mover_mc.myText_txt.htmlText = externalXML.dialogue[0].text;
var url:URLRequest = new URLRequest(externalXML.dialogue[0].img);
} else {
trace("loader is not a URLLoader!");

Can anyone help me on how to pull in the link from the xml and use it to navigate to a different page on the site

Thanks very much


[edited by: HansStrangeways at 10:11 am (utc) on Mar. 11, 2008]


9:44 am on Mar 12, 2008 (gmt 0)

10+ Year Member

if I understand you correctly.. you just use the value of the <link> from XML as the value for the getURL(target) function. just as you get the values for the heading and for the text.

or did I miss something?


10:54 am on Mar 12, 2008 (gmt 0)

5+ Year Member

thanks... i'll have a go

It's just I did this bit of flash following a tutorial because I'm brand new to all this flash stuff - so essentially my understanding of it isn't great to say the least

i'm still at the stage of syntax confusing the hell out of me


Featured Threads

Hot Threads This Week

Hot Threads This Month