PDA

View Full Version : attachMovie (levels)????


cjob
01-30-2004, 04:58 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

Slowburn
01-30-2004, 08:00 PM
You must use the loadMovieNum action to load movies into the Flash Player before you use the _level property to target them. You can also use _levelN to target a loaded movie at the level assigned by N.

You cannot dunamically create or attach Movieclips into _levels.

If you are just attching your MC to _root or another MC, use the swapDepths() method. All your toher MC's that you want ontop, just set those to a higher level when attaching.

The lowest attchment depth is 0

divarch
01-30-2004, 11:31 PM
Originally posted by Slowburn

The lowest attchment depth is 0

Actually, it's -16384 :)

Anyway, cjob, try creating the text at runtime also, and setting it's own depth, in something like 'textContainer'.