[MX04] adding a timer on the frame
i have this code
-----------
var seconds = 6;
var PlaceGreen:Number = setInterval(placeG, seconds*1000);
function placeG():Void {
_root.attachMovie("greenGuy", "greenGuy"+_root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:36, _y:398});
}
var PlaceBlue:Number = setInterval(placeB, seconds*1000);
function placeB():Void {
_root.attachMovie("blueGuy", "blueGuy"+_root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:743, _y:398});
}
var PlaceRed:Number = setInterval(placeR, seconds*1000);
function placeR():Void {
_root.attachMovie("redGuy", "redGuy"+_root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:36, _y:398});
}
var PlaceYellow:Number = setInterval(placeY, seconds*1000);
function placeY():Void {
_root.attachMovie("yellowGuy", "yellowGuy"+_root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:743, _y:398});
}
-------
it places four diffecrent MCs, exported as yellowGuy, redGuy, blueGuy and greenGuy. red and green are on the same side and yellow and blue are placed on the same side, i want the yellow and red guys to start being placed after 3 seconds instead of six but still be placed ever six seconds, so both sides will place every 3 seconds, alternating colors. i have tried making a veriable called time and then add numbers and make an if statement that will activate the bottom two when it hits a certain number, but that does not work for some reason :( please help