dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: could use a no-frills xml sample

  1. #1
    ___________________
    Join Date
    May 2004
    Posts
    3,174

    could use a no-frills xml sample

    hi. if anybody has a basic xml/as script they'd be willing to share, id appreciate it... the less info it has the better - i'm only concerned with structuring the xml sheet and getting the xml data into flash... like to make the code below work (this isn't a real script i'm having trouble with, just a sample so if there's errors just ignore them)

    code:

    for (var i=1;i<=100;i++) {
    img:Array = new Array();
    img[i] = filename in <image> nodes in xml doc
    lbl:Array = new Array();
    lbl[i] = corresponding text description from <label> nodes
    this.createEmptyMovieClip("image"+i,i);
    this["image"+i].loadMovie(img[i]);
    this.createTextField("label"+i,i,0,0,100,20);
    this["label"+i].text = lbl[i];
    }



    and the xml sheet would read how? i'm guessing like this:
    code:

    <image>bf65543.jpg</image>
    <label>this is a picture of something.</label>
    <image>bf65544.jpg</image>
    <label>this is a picture of something else.</label>
    //etc...



    tyvmia

    (i cross posted. i feel naughty.)

  2. #2
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    Macromedia have a simple slide show in flash using xml to drive the location of the images. You should be able to find it on Macromedias site.

    Thanks

    Luke
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

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