Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Marleyuk

  1. Marleyuk

    Problem removing 1 of 8 generated collisions

    Its direct on the stage, in my background scene.
  2. Marleyuk

    Problem removing 1 of 8 generated collisions

    Still the same results. Could i be something else ive messed up?
  3. Marleyuk

    Problem removing 1 of 8 generated collisions

    ah wait its giving me _level0.hpbar now.
  4. Marleyuk

    Problem removing 1 of 8 generated collisions

    //set health points var hpAmount = 100; //set amount of generated enemies var numEnemy = 8; for (i=1; i<=numEnemy; i++) { mcEnemy = this.attachMovie("enemy", "enemy"+i, 100+i); reset(mcEnemy); mcEnemy.onEnterFrame = moveEnemy; } function reset(mc:MovieClip):Void { mc._x = 300...
  5. Marleyuk

    Problem removing 1 of 8 generated collisions

    [code] var hpAmount = 100; var numEnemy = 8; for (i=1; i<=numEnemy; i++) { mcEnemy = this.attachMovie("enemy", "enemy"+i, 100+i); reset(mcEnemy); mcEnemy.onEnterFrame = moveEnemy; } function reset(mc:MovieClip):Void { mc._x = 300; mc._y = Math.floor((Math.random()*200+100))...
  6. Marleyuk

    Problem removing 1 of 8 generated collisions

    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.
  7. Marleyuk

    Problem removing 1 of 8 generated collisions

    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?
  8. Marleyuk

    Problem removing 1 of 8 generated collisions

    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...
  9. Marleyuk

    Problem removing 1 of 8 generated collisions

    Right.. numEnemy = 8; for (i=1; i<=numEnemy; i++) { mcEnemy = this.attachMovie("enemy", "enemy"+i, 100+i); reset(mcEnemy); mcEnemy.onEnterFrame = moveEnemy; } function reset(mc:MovieClip):Void { mc._x = 300; mc._y = Math.floor((Math.random()*200+100)); mc.enemySpeed =...
  10. Marleyuk

    Problem removing 1 of 8 generated collisions

    the function u made for me is the enemy function so can i just add the above to the bottom?
  11. Marleyuk

    Problem removing 1 of 8 generated collisions

    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) {...
  12. Marleyuk

    Problem removing 1 of 8 generated collisions

    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 =...
  13. Marleyuk

    Problem removing 1 of 8 generated collisions

    It still is only giving me one enemy now. Is it right that im putting this in the enemy movie clip action script?
  14. Marleyuk

    Problem removing 1 of 8 generated collisions

    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...
  15. Marleyuk

    Problem removing 1 of 8 generated collisions

    Thanks for the reply, How would i replace "duplicateMovieClip()" with "attachMovie()" and still generate 8 enemies?

Part and Inventory Search

Back
Top