A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Adding a link in a .xml that's being pulled into flash

  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    24

    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!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Nov 2008
    Posts
    24
    No help? I'm totally stuck here guys... any help would be greatly appreciated.

  3. #3
    Junior Member
    Join Date
    Nov 2008
    Posts
    24
    bump

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    search here for CDATA and asfunction

  5. #5
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    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 :)
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  6. #6
    Junior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    15

    May be this can help you...

    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
    Last edited by tarunar; 10-07-2009 at 01:55 PM.

  7. #7
    Junior Member
    Join Date
    Nov 2008
    Posts
    24
    Quote Originally Posted by silentweed View Post
    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
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center