A Flash Developer Resource Site

Results 1 to 20 of 23

Thread: hyperlinks in XML

Hybrid View

  1. #1
    Senior Member
    Join Date
    May 2002
    Posts
    1,017
    err... sorry .. it is not right. correct is

    newPiece.desc_txt.html = true;
    while (2+2 == 4) {
    drink ("bourbon");
    }
    gotoAndStop("bed");

  2. #2
    Junior Member
    Join Date
    Jun 2006
    Posts
    5
    Thank's but still it's not working:

    here is what I included in flash:

    I enabled the text field as html <> in flash.

    and this is the script:

    myXML = new XML();
    myXML.ignoreWhite = true;
    myXML.onLoad = function(ok) {
    if (ok) {
    //process data
    allGalleryData = this.firstChild.childNodes;
    for (i=0; i<allGalleryData.length; i++) {
    newPiece = sliderHolder_mc.slider_mc.attachMovie('template', 'piece'+i, i);
    newPiece._x = i*newPiece._width;
    newPiece.heading_txt.text = allGalleryData[i].firstChild.firstChild;
    newPiece.desc_txt.htmlText = allGalleryData[i].firstChild.nextSibling.firstChild;
    newPiece.load_btn.imageName = allGalleryData[i].firstChild.nextSibling.nextSibling.firstChild;
    newPiece.holder_mc.loadMovie('portfolio/Identity/'+newPiece.load_btn.imageName);
    newPiece.load_btn.onRelease=function(){
    bigImage_mc.loadMovie('images/'+this.imageName)


    }
    //trace(allGalleryData[i].firstChild.firstChild);
    newBut = _root.attachMovie('numTemplate', 'num'+i, i);
    newBut._y = sliderHolder_mc._y+sliderHolder_mc._height-15;
    newBut._x = (i*newBut._width)+sliderHolder_mc._x+15;
    newBut.myNum = i;
    newBut.num_txt.text = i+1;
    newBut.onRelease = function() {
    targX = 0-(this.myNum*360);
    };
    }
    targX = 0;
    sliderHolder_mc.slider_mc.onEnterFrame = function() {
    this._x -= (this._x-targX)/2;
    };
    } else {
    trace('what file?');
    }
    };
    myXML.load('xml/identity.xml');


    __________________________________________________ ___________

    I also added your script to the xml file as you point out (copy paste it)

    <?xml version="1.0" encoding="iso-8859-1"?>
    <gallery heading="Photography">

    <piece>
    <heading>Piece 1</heading>
    <desc><![CDATA[<a href='http://www.yourUrlGoesHere.com' target='_blank'>text</a>]]></desc>
    <image>1.jpg</image>
    </piece>

    <piece>
    <heading>Piece 2</heading>
    <desc><![CDATA[<a href='http://www.yourUrlGoesHere.com' target='_blank'>text</a>]]></desc>
    <image>2.jpg</image>
    </piece>

    </gallery>



    I need help again...Thank's

  3. #3
    Junior Member
    Join Date
    Jun 2006
    Posts
    5
    can you help me out?

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    1,017
    Hmm .. this xml worked for me
    ....
    <piece>
    <heading>Piece 1</heading>
    <desc><a href="http://www.yourUrlGoesHere.com" target="_blank">text</a></desc>
    <image>1.jpg</image>
    </piece>
    ....
    the AS is fine.
    while (2+2 == 4) {
    drink ("bourbon");
    }
    gotoAndStop("bed");

  5. #5
    Junior Member
    Join Date
    Jun 2006
    Posts
    5
    wow it's work Thank you! Thank you!

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