|
-
XML url call
hi everyone,
i'm trying to call a url from an xml file when you click a button in flash. i can't seem to get it to call the url correctly. can someone show me the correct actionscript to call the xml node, please.
EX XML:
<icons>
<icon image="icon0.JPG" theURL="http://www.google.com" content="BLAH BLAH BLAH BLAH BLAH" />
</icons>
i tried..
getURL(theURL, "_blank");
-
heh....where is the XML is it a seperate file or you created it in the flash code?
in otherWords are you talking about a flash XML object or an actuall XML file somewhere?
if its the file youll have to load it first
myXML:XML = new XML()
myXML.onLoad=function(){
trace(this)
}
myXML.load("http://www.somewhere.com/something.xml")
then
myXML.firstChild.childNodes[0]
would be
<icon image="icon0.JPG" theURL="http://www.google.com" content="BLAH BLAH BLAH BLAH BLAH" />
so myXML.firstChild.childNodes[0] .attributes
would be an object
object["image"]=="icon0.JPG"
object["theURL"]="http://www.google.com"
object["content"]="BLAH BLAH BLAH BLAH BLAH"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|