Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 07:46
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Web Services: XML, Soap, WSDL, UDDI, and Flash Integration (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis)
| | |-+  Help me please, button with a link from xml file
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Help me please, button with a link from xml file  (Read 1752 times)
FlashLearner
Server what's that
*
Posts: 4


View Profile
« on: 01/27/10, 06:04 »

Hi all, first of all I'm using Flash MX and it's first time I use xml, and I'm preparing two buttons in flash getting url from a xml file... Doesn't work, of course... Can you help me please?

That's the xml file code:
<?xml version="1.0" encoding="UTF-8" ?>
<menu>
<url>http://www.myebsite.it/web/index.php?option=com_content&view=article&id=212&I temid=262</url>
<url>http://www.mywebsite.it/web/index.php?option=com_content&view=article&id=212&I temid=262</url>
</menu>

Here the script in flash:
myXML = new XML();
myXML.onLoad = function(success) {
if (!success) {
trace("XMLfailed to load");
} else {
trace("load was good");
link1 = myXML.firstChild.childNodes[0].firstChild.nodeValue;
link2 = myXML.firstChild.childNodes[1].firstChild.nodeValue;
}
};
myXML.load("links.xml");

And of course the buttons have:
on (press) {
getURL(link1, "_self");
}

and

on (press) {
getURL(link2, "_self");
}

I really apreciate any kind of help, I'm doing it for a friend website but I'm not a pro and I'm gettin' mad!
Thanks a lot!!!
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #1 on: 01/27/10, 09:02 »

please only post once
Logged

happy flashing
Cool
Ronald
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything