How do i load an url (defined in xml) into flash mx
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Fri Dec 16, 2005 3:55 pm
How do i load an url (defined in xml) into flash mx
Hi all,
Hopefully there is someone who can help me with this question?
Case
I'm trying to build a list with hyperlinks (from an xml-file) and want to load this in a Dynamic textfield in Flash MX2004.
Other resources
http://www.xfactorstudio.com
What i'm using
I used the following 'application' XPath XML Search engine downloaded at:
http://www.sephiroth.it/file_detail.php?id=130
The code
XML- list:
<season s="1">
<ep n="1" >
<id>1-01</id>
<d>Test</d>
<dn>86023</dn>
<name>CIS</name>
<dt>13122005</dt>
<gs>Test</gs>
<url>http://www.google.com</url>
</ep>
</season>
ACTIONSCRIPT 2.0 in FlashMovie:
* Here i get the url 'array' and load this in a Dynamic textarea with instance name 'taUrl'.
// Converts myResults array of xml nodes to regular array
// this part was made with the help of Neeld
myDataSet = new Array();
for (var i = 0; i<myResults.length; i++) {
var name = XPath.selectNodes(myResults, "./name" [0].firstChild.nodeValue;
var id = XPath.selectNodes(myResults, "./id" [0].firstChild.nodeValue;
var dn = XPath.selectNodes(myResults, "./dn" [0].firstChild.nodeValue;
var link = XPath.selectNodes(myResults, "./link" [0].firstChild.nodeValue;
var url = XPath.selectNodes(myResults, "./url" [0].firstChild.nodeValue;
myDataSet.push({Name:name, ID:id, DN n});
}
// set Url in taUrl textbox
var choosenUrlText = XPath.selectNodes(choosenEpisodeData, "./url" [0].firstChild.nodeValue;
choosenUrlText = choosenUrlText.toString();
var newString3 = choosenUrlText.searchReplace();
var newString3 = choosenUrlText.searchReplace(term,"<a href='http://"+term+" / >" ;
taUrl.text = newString3;
Resulting in
a 'plain' text --> http://www.google.com
AND IS NOT CLICK-ABLE! And that is my problem.
Thanks for responding,
Webmaster Freestyler.
Hopefully there is someone who can help me with this question?
Case
I'm trying to build a list with hyperlinks (from an xml-file) and want to load this in a Dynamic textfield in Flash MX2004.
Other resources
http://www.xfactorstudio.com
What i'm using
I used the following 'application' XPath XML Search engine downloaded at:
http://www.sephiroth.it/file_detail.php?id=130
The code
XML- list:
<season s="1">
<ep n="1" >
<id>1-01</id>
<d>Test</d>
<dn>86023</dn>
<name>CIS</name>
<dt>13122005</dt>
<gs>Test</gs>
<url>http://www.google.com</url>
</ep>
</season>
ACTIONSCRIPT 2.0 in FlashMovie:
* Here i get the url 'array' and load this in a Dynamic textarea with instance name 'taUrl'.
// Converts myResults array of xml nodes to regular array
// this part was made with the help of Neeld
myDataSet = new Array();
for (var i = 0; i<myResults.length; i++) {
var name = XPath.selectNodes(myResults, "./name" [0].firstChild.nodeValue;
var id = XPath.selectNodes(myResults, "./id" [0].firstChild.nodeValue;
var dn = XPath.selectNodes(myResults, "./dn" [0].firstChild.nodeValue;
var link = XPath.selectNodes(myResults, "./link" [0].firstChild.nodeValue;
var url = XPath.selectNodes(myResults, "./url" [0].firstChild.nodeValue;
myDataSet.push({Name:name, ID:id, DN n});
}
// set Url in taUrl textbox
var choosenUrlText = XPath.selectNodes(choosenEpisodeData, "./url" [0].firstChild.nodeValue;
choosenUrlText = choosenUrlText.toString();
var newString3 = choosenUrlText.searchReplace();
var newString3 = choosenUrlText.searchReplace(term,"<a href='http://"+term+" / >" ;
taUrl.text = newString3;
Resulting in
a 'plain' text --> http://www.google.com
AND IS NOT CLICK-ABLE! And that is my problem.
Thanks for responding,
Webmaster Freestyler.
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service