Chaotic Horde

Flash Applications and Games Development

Admin wrote: 

if anyone can help, I believe it’s a scoping issue?????


//import mx.transitions.*;
//import mx.transitions.easing.*;

// Create a new XML object.
//var myPhoto:XML = new XML();
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
if (success) {

trace("success");

var numimages = this.firstChild.childNodes.length;
spacing = 70;
j = 0;

for (i=0; ipicHolder = this.firstChild.childNodes[i];
thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
thumbLoader = thumbholder.createEmptyMovieClip("thumbnail_image" , 0);
thumbLoader.loadMovie(picHolder.attributes.thmb);
trace(picHolder.attributes.thmb);
thumbHolder.style = picHolder.attributes.style;
thumbHolder.designer = picHolder.attributes.designer;
thumbHolder.cost = picHolder.attributes.cost;
thumbHolder.main = picHolder.attributes.main;
thumbHolder.caption = picHolder.attributes.caption;

thumbLoader.main = loader.createEmptyMovieClip("main_image", 0);

/////// load movie /////////

/*var mcl_obj:Object = new Object();
mcl_obj.onLoadInit = function(loader:MovieClip) {

//image_src._alpha=0;
new Tween(loader, "_alpha", Strong.easeIn, 0, 100, .8, true);
};

var my_mcl:MovieClipLoader = new MovieClipLoader();
my_mcl.addListener(mcl_obj);
my_mcl.loadClip(picHolder.attributes.main);*/


////////// end ////////////

if (j == 4) {
y += 50;
x = 0;
j = 0;
}
thumbHolder._y = y;
thumbHolder._x = j*spacing;
j++;

thumbHolder.onRollover = function() {
roll.gotoAndPlay(2);
roll.startDrag(this);
roll.test_txt.text = this.caption;
};
thumbHolder.onRollout = function() {
roll.gotoAndStop(1);
roll.test_txt.text = " ";
};
thumbHolder.onRelease = function() {
roll.gotoAndStop(1);
loader.loadMovie(this.main);
style.htmlText = this.style;
designer.htmlText = this.designer;
cost.htmlText = this.cost;
};
}
}
};
myPhoto.load("xmlphoto.xml");


(Link)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • Furl
  • StumbleUpon

Posted in Flash Application and Games Development |

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.