This is the code I am using but there seems to be some problem-
a.) Sometimes the MC doesnt show up at all?
b.) Sometimes the MC disappears without going through its timeline.
Please Help, Maybe I am doing something wrong on the code?
Note: On the Last frame of the “bonus” MC- I have:
=======
bonus();
On the “bonus” MC I have this code:
====================================================
onClipEvent (enterFrame) {
function bonus() {
xValue = Math.floor(Math.random()*400+50);
yValue = Math.floor(Math.random()*350+100);
bonusShow = false;
}
}
onClipEvent (enterFrame) {
if (!bonusShow) {
bonusNum = Math.floor(Math.random()*5);
}
if (bonusNum == 7) {
bonusShow = true;
this._visible = true;
this._x = xValue;
this._y = yValue;
} else {
if (bonusNum != 7) {
this._visible= false
}
}
}
on (press) {
_root.health += 25;
}
Any help would be appreciated.