# Loading movieclips from library via XML

**URL:** <https://forum.kirupa.com/t/loading-movieclips-from-library-via-xml/281135>\
**Category:** flash\
**Created:** [February 5, 2009, 9:22am UTC](https://forum.kirupa.com/t/loading-movieclips-from-library-via-xml/281135 "2009-02-05T09:22:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asparagus](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Asparagus](https://forum.kirupa.com/u/Asparagus)\
**Post date:** [February 5, 2009, 9:22am UTC](https://forum.kirupa.com/t/loading-movieclips-from-library-via-xml/281135/1 "2009-02-05T09:22:11Z")

</div>

I’ll do my best to keep this question as short as possible:

I’ve made 5 ‘fruit’ movieclips and they’re in my library.

And using **so.addVariable(“getNumber”, “003”);** in my HTML code, I’d like those particular fruit movieclips to play one after the other (and then loop).

I’ve had a look around for something similar, without luck, so I’m trying to make it from scratch. I got as far as getting it to load the first _number_ and then the first _type_ and _url_, but I’m stuck on getting to go onto the next _type_, also being able to define (with **addVariable** ) which _number_’s nodes gets played.

Here’s an example of my XML to show the structure.

```auto

<?xml version="1.0" encoding="utf-8"?>
<list>
    <number="001" >
        <fruit type="banana" url="http://www.google.com" />
        <fruit type="orange" url="http://www.google.com" />
        <fruit type="apple" url="http://www.google.com" />
        <fruit type="grape" url="http://www.google.com" />
        <fruit type="pear" url="http://www.google.com" />
    </number>
    <number="002" >
        <fruit type="banana" url="http://www.google.com" />
        <fruit type="pear" url="http://www.google.com" />
    </number>
    <number="003" >
        <fruit type="orange" url="http://www.google.com" />
        <fruit type="apple" url="http://www.google.com" />
    </number>
</list>

```

Many thanks to the kind soul(s) that can lend a helping hand or to point me in the right direction.
