# loadMovie instance help

**URL:** <https://forum.kirupa.com/t/loadmovie-instance-help/199835>\
**Category:** flash\
**Created:** [September 6, 2006, 2:17pm UTC](https://forum.kirupa.com/t/loadmovie-instance-help/199835 "2006-09-06T14:17:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)\
**Post date:** [September 6, 2006, 2:17pm UTC](https://forum.kirupa.com/t/loadmovie-instance-help/199835/1 "2006-09-06T14:17:55Z")

</div>

I have a scrollPane called _thumbs_ that I load images into. I also have a scrollPane called \*room. \*If I click on an image in thumbs this loads an swf into the room. I have accomplished this much, but If I click on the image again I want to add another instance of the swf. How do I do this? Is there a better way?

Any help appreciated.

my code thus far:

```auto

var myXML:XML = new XML();
myXML.ignoreWhite = true;
libraryList_ar = new Array();
combo_list.dataProvider = libraryList_ar;
myXML.onLoad = function(success) {
 if (success) {
  //trace(this);      
  var libraries = this.firstChild;
  var libCount = libraries.childNodes.length;
  trace(libCount);
  var libItems = libraries.firstChild.childNodes.length;
  trace(libItems);
  //
  for (var i = 0; i<libCount; i++) {
   //libraryList_ar* = libraries.childNodes*.childNodes[0].firstChild.nodeValue;
   libraryList_ar* = new Object();
   libraryList_ar*.label = libraries.childNodes*.attributes.name;
   libraryList_ar*.data = libraries.childNodes*;
   //save reference here
  }
 }
};
myXML.load("myXML.xml");
//
combo_list.change = function(eventObj) {
 thumbs.invalidate();
 thumbs.refreshPane();
 //
 var selItem:Object = eventObj.target.selectedItem;
 trace("Item selected was: "+selItem.label);
 var itemXML:XMLNode = selItem.data;
 //use saved reference to iterate through childNodes
 for (var idx = 0; idx<itemXML.childNodes.length; idx++) {
  trace("Item includes: "+itemXML.childNodes[idx].attributes.source);
  var t_mc:MovieClip;
  //t_mc = thumbs.content.attachMovie("thumb_mc", "thumb"+idx, idx, this.getNextHighestDepth());
  t_mc = thumbs.content.attachMovie("thumb_mc", "thumb"+idx, idx, this.getNextHighestDepth());
  t_mc._x = 5;
  t_mc._y = 5+(idx*80);
  t_mc.idx = idx;
  t_mc.now = itemXML.childNodes[idx].attributes.source;
  trace(t_mc.idx);
  //  
  t_mc.onRelease = function() {
   //trace(this);
   //trace(this.now);
   //room.content.myLoader.contentPath = this.now+".swf"; 
   room.content.myLoader.loadMovie(this.now+".swf", this.getNextHighestDepth());
   room.content.myLoader._x = 100;
   room.content.myLoader._y = 100;
   room.invalidate();
   //
   if (this._droptarget == "/room") {
    trace("landed")
   }
  };
 }
};
combo_list.addEventListener("change", combo_list);
//

```
