1 Replies - 3259 Views - Last Post: 09 September 2008 - 02:59 PM

#1 nurapn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 03-September 08

change position of duplicate movieclip

Posted 09 September 2008 - 03:33 AM

hi all experts...

following is the code im using to load images dynamically to the stage using xml. this works fine but displays only the last image.

pls correct this code to show each image one after the other

thanx in advance

	var myxml=new XML();
	myxml.ignoreWhite=true;
	myxml.load("data.xml");
	
	myxml.onload = function(success){
	if (success){
		for(i=0; i<=myxml.firstChild.childNodes.length-1;i++){
			_root.createEmptyMovieClip("image"+i, this.getNextHighestDepth(), {_x:i*100});
			

			loadMovie(myxml.firstChild.childNodes[i].firstChild, _root["image"+i]);





Is This A Good Question/Topic? 0
  • +

Replies To: change position of duplicate movieclip

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1199
  • View blog
  • Posts: 7,309
  • Joined: 07-September 06

Re: change position of duplicate movieclip

Posted 09 September 2008 - 02:59 PM

Try changing this:

 _root.createEmptyMovieClip("image"+i, this.getNextHighestDepth(), {_x:i*100});
			

			loadMovie(myxml.firstChild.childNodes[i].firstChild, _root["image"+i]);


to something like so:

 var mc:MovieClip = _root.createEmptyMovieClip("image"+i, this.getNextHighestDepth());
			mc._x = 100*i;
			mc._y;
			mc._xscale = mx._yscale = 10;
			loadMovie(myxml.firstChild.childNodes[i].firstChild, _root["image"+i]);


Hope that works for you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1