A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: xml based image gallery

Threaded View

  1. #5
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Ok...as delivered I changed three things:

    1. set the textfield to be html enabled (the one in the zip wasn't)

    2. Changed the functions (next,prev) to the correct syntax to populate an html enabled field instead of a standard textfield:

    function nextImage() {
    if (p<(total-1)) {
    p++;
    if (loaded == filesize) {
    picture._alpha = 0;
    picture.loadMovie(image[p], 1);
    //desc_txt.text = description[p];//old way
    desc_txt.htmlText = description[p];
    picture_num();
    }
    }
    }
    function prevImage() {
    if (p>0) {
    p--;
    picture._alpha = 0;
    picture.loadMovie(image[p], 1);
    //desc_txt.text = description[p];//old way
    desc_txt.htmlText = description[p];
    picture_num();
    }
    }


    3. Wrapped the node you are using for html formatted text in a CDATA tag:

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <images>
    <pic>
    <image>images/image-1.jpg</image>
    <caption>Image Title 1</caption>
    </pic>
    <pic>
    <image>images/image-2.jpg</image>
    <caption>Image Title 2</caption>
    </pic>
    <pic>
    <image>images/image-3.jpg</image>
    <caption><![CDATA[ <a href="www.flashkit.com">Image Title 3</a>]]></caption>
    </pic>

    </images>


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