PDA

View Full Version : Problem with movie clips behaviour


fido_glc
10-30-2007, 01:03 AM
I have a movie clip which is a small square that I attach from my library at load time and I apply to it some properties and behaviours like alpha and mouse behaviours. Most are working but some are not. I can't see what the problem is.
Pls help.

atomic
10-30-2007, 02:08 AM
Because clips _level0.mc_square111 to _level0.mc_square119, already exist in the second half of colum 1...

atomic
10-30-2007, 02:20 AM
Use this instead, so that index = 11 & index2 = 1 (result 111), is not confused with index = 1 & index2 = 11 (result also 111)...


...
for (index = 1; index <= widthNumber; index++) {
for (index2 = 1; index2 <= heightNumber; index2++) {
attachMovie("mc_square", "mc_square" + index +'_'+ index2, currentDepth, {_x:30 + 12 * index, _y:30 + 12 * index2});
currentDepth++;
_root["mc_square" + index +'_'+ index2]._alpha = 20;
_root["mc_square" + index +'_'+ index2].useHandCursor = false;



_root["mc_square" + index +'_'+ index2].onRollOver = function():Void {
this._alpha = 100;
}
_root["mc_square" + index +'_'+ index2].onRollOut = function():Void {
this._alpha = 20;
}
_root["mc_square" + index +'_'+ index2].onRelease = function():Void {


}
_root["mc_square" + index +'_'+ index2].onReleaseOutside = function():Void {
this._alpha = 20;
}


}


}


I've added an underscore between index & index 2 so that 1_11 is not confused with 11_1.

fido_glc
10-30-2007, 02:29 PM
Thanks.

atomic
10-30-2007, 04:28 PM
Grrrrrrrrrrrrrrrrreat! ;)