all groups > flash actionscript > september 2007 >
You're in the

flash actionscript

group:

Getting next Set


Getting next Set multi-task
9/11/2007 11:16:08 PM
flash actionscript: Hey yall I am trying to pull next set of 6 from xml and am getting undefin on
press. Right now 6 of the containers i made load up with proper xml data
loaded into them from library. Then on press nothing. Here is how I am going
about it: Any direction is much appreciated and respected.


var numOfItems:Number;
var logos:MovieClip = this;
var tain:MovieClip = this;
var inner:MovieClip = this;
// where to start on the x axis
xStart = Stage.width/2;
// where to start on the y axis
yStart = Stage.height/2;

//counter to keep track
counter = 0;
spacing = 190;


////GetEm
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
var nodes = this.firstChild.firstChild.childNodes;
//////////////////////////////////////////
///////// 3X2 following loops.

for (var b = 1; b <=3; b++) {
for (var c = 1; c <=2; c++) {
counter++;
var t = logos.attachMovie("iconMC", "icon_MC" +counter, counter);
t._x = xStart+(b*spacing)-216;
t._y = yStart+(c*spacing)-spacing;
///Assign an _x _y position to loaded items
//////////////////////////////////////////
////////////LoadrestSetFunc

t.logo.logoContainer.loadMovie(nodes[counter-1].firstChild.attributes.logos)
;
t.t1.tText.text = nodes[counter-1].firstChild.attributes.name;
t.link = nodes[counter-1].firstChild.parentNode.attributes.id;
t.onRollOver = over;
t.onRollOut = out;
t.onRelease = released;
}
}
};
////icons.xml
xml.load("logos");

////More button funcs, release, rollover and rollout
/////Release
more.onRelease = function() {
if (counter>0) {
counter++;
t.logo.logoContainer.loadMovie(nodes[counter].firstChild.attributes.logos);
t.t1.tText.text = nodes[counter].firstChild.attributes.name;
t.link = nodes[counter].firstChild.parentNode.attributes.id;
tains_mc.gotoAndPlay(26);
}
}
Re: Getting next Set multi-task
9/12/2007 9:11:44 PM
This is for the button but I know its not right because I am missing something
in my logic. Can a pro please advise me on how to best do this? I have
rewritten this thing like 4 times and cant grasp it.
AddThis Social Bookmark Button