Forum Moderators: open
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"?>
<content>
<dialogue>
<heading>Interested in selling our health plans?</heading>
<text>Click here to learn more...</text>
<img>home_window/intSmall.jpg</img>
</dialogue>
</content>
I want to add a link to the xml that would be specific to each instance of the window...
eg
<link>contact-us/index.asp</link>
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
eg
<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);
myLoader.load(url);
} 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
Hans
[edited by: HansStrangeways at 10:11 am (utc) on Mar. 11, 2008]