A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: a link inside XML loaded into flash

  1. #1
    Senior Member
    Join Date
    Aug 2001
    Location
    New York City
    Posts
    409

    a link inside XML loaded into flash

    I am using a xml file to load in data to a flash file.
    The data loads fine, and the image loads fine, I can even hover over the image and I get the hand curser, but the href linking doesn't work...below is the code:
    Code:
    <option>
       <imageSize imageWidth="600" imageHeight="450" />
       <image>image_gallery/images/0001.jpg</image>
       <thumb>image_gallery/images/thumbs/0001.jpg</thumb>
       <title>0001</title>
       <info><![CDATA[<titlePreset>0001</titlePreset>
    <infoPreset>some copy here<br>
    <a href="http://www.flyawaysilk.com/store"><IMG SRC="payPal_button.gif" ALT="pay with payPal" border="0"></a>
    <infoPreset>]]></info>
    <extraHeight>7</extraHeight>
    </option>
    this is the part of the code that loads the image, but doesn't allow it to link...is there some other code I will need inside of the XML to allow for a hyperlink?
    Code:
    <a href="http://www.flyawaysilk.com/store"><IMG SRC="payPal_button.gif" ALT="pay with payPal" border="0"></a>

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    tested and all working ok here in a Flash 8 fla
    (close your infoPreset tag - </infoPreset>]]></info> )
    PHP Code:
    _xml = new XML();
    _xml.ignoreWhite true;
    _xml.load("option.xml");

    _xml.onLoad = function(){
    node this.firstChild.childNodes[4].firstChild.nodeValue;
    ta.html true// AS 2 TextArea component
    ta.text node;
    dt.html true// dynamic textfield
    dt.htmlText node;


  3. #3
    Senior Member
    Join Date
    Aug 2001
    Location
    New York City
    Posts
    409
    your right it actually is working...with one problem.
    I clicked on the very top of the image and ...bam...it worked
    1. it seems like the whole image is not clickable.
    2. the whole image gets the hand curser but is not all linking out.

    Any thoughts about this strange problem ?

  4. #4
    Senior Member
    Join Date
    Aug 2001
    Location
    New York City
    Posts
    409
    ...through further investigation the entire button is clickable.
    It seems that only sometimes does the click spawn the window...this is strange...any suggestions ?

  5. #5
    Interactive Developer
    Join Date
    May 2009
    Location
    Boston
    Posts
    3

    Unhappy

    I have this problem too. Did you figure it out?

    If I click on the image under "News / Updates" at www.carmenberniergrand.com, it begins highlighting instead of opening the link! I have to double-click to make it work! If I set selectable = false, then double-clicking won't work either

  6. #6
    Senior Member
    Join Date
    Aug 2001
    Location
    New York City
    Posts
    409
    You'll need to assign a function in Action Script to accord with the variable from XML



    Design is not a crime.
    http://www.micelistudios.com

  7. #7
    Interactive Developer
    Join Date
    May 2009
    Location
    Boston
    Posts
    3
    What variable are you referring to?

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