|
-
Senior Member
I wrote this so far can anyone help with a better way i should have done this:
There is just six mcs on stage with a pic in each and named from 'mc6' though to 'mc11'
chechMc = setInterval(nextMC,500);
fadeturn=true;
myRandomMcs = new Array(6, 7, 8, 9, 10, 11);
function nextMc() {
nextMcToFade = myRandomMcs.splice(random(myRandomMcs.length), 1);
trace(["mc_"+nextMcToFade]);
fadeClips();
if (nextMcToFade.length == isNaN(0)) {
trace("Empty array");
//this is where I need the alternating tricker each time to set fadeturn true or false
myRandomMcs.push(6, 7, 8, 9, 10, 11);
nextMcToFade = myRandomMcs.splice(random(myRandomMcs.length), 1);
}
}
MovieClip.prototype.fadeClips = function() {
this.onEnterFrame = function() {
if (fadeturn=true) {
//do fade up
this["mc_"+nextMcToFade]._alpha += 3;
}
if (fadeturn=false) {
this["mc_"+nextMcToFade]._alpha -= 3;
}
};
};
Last edited by Jaffasoft; 07-13-2006 at 09:39 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|