Adding a link in a .xml that's being pulled into flash
This is my first time using XHTML so I'm a little confused. Oh and I'm in Flash CS3 using AS 2.0
I have a 3D carousel that's displaying some web pages. When they're clicked on they come forward and there's a paragraph of text displaying some info (that's pulled from the .xml).
I would like to have a link after the paragraph to the web page that it's displaying that says something like "Launch" or "Click Here to View Site"
So can I add that link into my .xml document?
I've attached my project for reference. Not all of the images are there but there's enough that you can see what I'm talking about. Thanks in advance!
yes u can ..however make a slight modification to your XML file so your content is not an attribute:
e.g
<icon image="icon1.png" tooltip="Halloween Haunt"><![CDATA[Kings Island Halloween Haunt Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras quis vehicula risus. Duis ultricies quam ac eros faucibus rhoncus. Donec tempor nisi id metus lobortis suscipit. Donec sollicitudin nunc at turpis sodales rhoncus. Pellentesque in magna arcu, vitae vestibulum erat. Cras idlectus arcu, sed faucibus arcu.<br>Click here to view the <a href='http:www.hotmail.com'>page</a>]]></icon>
You content should be surrounded by CDATA tags as above. When you write out the text in flash make sure you have set the textfield to display HTML.
Last edited by silentweed; 10-07-2009 at 10:50 AM.
Reason: looks like dog beat me to it :)
I am not sure whether this will be of any help, but you can try this. This is how I use in AS 3.0...
XML Code:-
<icons>
<icon image="icon1.png" url="xyz.html" tooltip="Halloween Haunt" content="Kings Island Halloween Haunt."/>
</icons> Flash Code:-
(so where you pulling the other stuff, pull the url as shown below)
contentItems[x].@url //contentItems is my variable to pull the content from XML
yes u can ..however make a slight modification to your XML file so your content is not an attribute:
e.g
<icon image="icon1.png" tooltip="Halloween Haunt"><![CDATA[Kings Island Halloween Haunt Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras quis vehicula risus. Duis ultricies quam ac eros faucibus rhoncus. Donec tempor nisi id metus lobortis suscipit. Donec sollicitudin nunc at turpis sodales rhoncus. Pellentesque in magna arcu, vitae vestibulum erat. Cras idlectus arcu, sed faucibus arcu.<br>Click here to view the <a href='http:www.hotmail.com'>page</a>]]></icon>
You content should be surrounded by CDATA tags as above. When you write out the text in flash make sure you have set the textfield to display HTML.
Hmm, I tried this and I'm still having trouble. I put in your code in my .xml, and I clicked the box to display html in my text box in flash and in the spot where the text was supposed to display it just said "undefined"
Can anyone PLEASE help me, I've attached my files. Tarunar I appreciate the help but I'm using AS 2.0