A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Using xml to hold and display info of some photo MC's???

  1. #1
    Member
    Join Date
    Feb 2001
    Location
    Barcelona, Spain
    Posts
    93

    Using xml to hold and display info of some photo MC's???

    Hi,

    I'm creating a movie where a photo appears ramdomly on the stage every couple of moments, (all the photos are movie clips from the library and are not external).
    When you rollover this photo MC a description box pops up with a few lines of text.

    Is it possible to use xml to import these descriptions texts, so that I can say that if the image name is 'image01', then to import the text in the xml file called 'info01', and then '02', '03', etc…?

    I've very limited knowledge of flash & xml and I've looked at the slideshow tutorials using xml and they seem very complicated.

    I'd like something simple so that it's easy to update the descriptions later on as there's 100 of them.

    Thanks for any help you can give me,

    Lenny.

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    351
    your in the xml forum, so heres an xml answer

    make it all xml:

    < images >
    ___< image file="image1.jpg" title="first image" desc="whatever" / >
    ___< image file="image2.jpg" title="second image" desc="more" / >
    < / images >

    create a class, i know, it sounds hard but here it is
    function anImage()
    {
    ___this.file="";
    ___this.title="";
    ___this.desc="";
    }

    now, read the xml, make a new anImage for each node
    push each anImage into an array
    load the images when ever you want

    good luck

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