PDA

View Full Version : cant get alpha


camilogo1
07-22-2005, 10:30 PM
I can't seem to access the _alpha property of dynamically loaded movies. here's the code:

var roomsAR = new Array("board", "club", "hall", "lobster", "privDining", "normandie", "intro");
//fades mid and footer movies, makes button white
function fader (roomNum) {
for (var i = 0; i < 7; i++) {
roomMC = roomsAR[i]+"MC";
trace(roomMC);
roomInstance = roomMC+i;
_root.emptyMC.attachMovie(roomMC,roomInstance,i);
//_root.emptyMC._alpha = 0;
trace(roomInstance);
trace(_root.emptyMC.hallMC._alpha);
}
}

The alpha test appears as undefined every time. Help!

red penguin
07-22-2005, 10:45 PM
attachMovie returns a reference to the attached clip!
Use that in the code:

var myClip:MovieClip = _root.emptyMC.attachMovie(roomMC,roomInstance,i);
myClip._alpha = 50;