Groups | Blog | Home
all groups > flash actionscript > january 2004 >

flash actionscript : attachMovie (levels)????


Vega
1/30/2004 10:50:37 PM
hello,

i created this graph by the attach movie command, and i can not get it to go to the lowest level, I want the graph to appear beind the text, any ideas?


//
// set the array
//
arr = [temp1, temp2, temp3, temp4, temp5, temp6, temp7];
inc = 33; // x position increment
x = -19; // _x start position
y = 134; // _y start position
function addClip(limit,row){
if(row > arr.length){ delete init; n1=0; } else { n1++; }
n2++;
ref = attachMovie("bar","bar"+n1,n1+1000);
ref._x = x+inc*row;
ref._y = y-(ref._height/2)*n2 ;
trace(row+" | "+ref+" | "+limit);
if(n2 >= limit){
n2 = 0; clearInterval(addEm);
nxt++; init(nxt);
bar0.removeMovieClip();
}
};
function init(id){
rows++;
addEm = setInterval(addClip,2,arr[id],rows);
};
init(0);


if ( currentTime == hour1) {
trace ("working" );
date_mc ._x =325
date_mc ._y =224
}



thanks,

vega

http://webforums.macromedia.com/attachments/040130_graphingSolution.zip

Jack.
1/30/2004 11:11:12 PM
the attached movies are at depths n1+1000, so are at 1000,1001,1002,....

create your textfield at a higher depth,
this.createTextField("name", 5000, 0,0,200,100);

or put the textfield in a movieclip, give it an instance name, and use
testclip.swapDepths(5000);



regards
AddThis Social Bookmark Button