My health box text box is a movie clip with the instance name hpBar, currently it shows the value as blank. I need to make it so instead of the results being printed as a trace they are printed in the textbox.
Ah i can believe i did that again.
Right now its the trace window that opens and gives the reports. Can i make it so instead its the health bar that goes down and when it gets to 0 it says game over?
I just got 4 errors saying :
**Error** Scene=Scene 1, layer=Health, frame=1:Line 1: Statement must appear within on/onClipEvent handler
var hpAmount = 100;
**Error** Scene=Scene 1, layer=Health, frame=1:Line 2: Statement must appear within on/onClipEvent handler
var numEnemy = 8...
I swear i couldnt tell you how much you have just helped me, thanks so much.
..although i do have another problem.
onClipEvent (load) {
hpAmount = 100;
}
onClipEvent (enterFrame) {
this._width = _root.hpAmount;
if (_root.hpAmount>100) {
_root.hpAmount = 100;
}
if (_root.hpAmount<0) {...
I have put this in the background scene which was the first scene of the movie and this is the only thing in it.
numEnemy = 8;
for (i=1; i<=numEnemy; i++) {
var enemyMC:MovieClip = this.attachMovie("enemy", "enemy"+i, 100+i, {_x:Stage.width-50, _y:30*i});
enemyMC.onEnterFrame =...
numEnemy = 8;
for (i=1; i<=numEnemy; i++) {
this.attachMovie("enemy", "enemy"+i, 100+i);
}
This spawns one bad guy and positions it in a stationary position in the top right hand corner of the screen, the enemey needs to be reproduced and move around from the right side of the screen...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.