I'm working on an FPS-type flash game, and I'm getting compiler errors from my addChild area, I think. Can anyone help me fix this? It's linked to the stage.
package { import flash.display.MovieClip; import flash.events.Event; public class game extends MovieClip { public function game() { import flash.events.Event; import flash.display.MovieClip; stage.addEventListener(Event.ENTER_FRAME, tick); stage.addEventListener(Event.ENTER_FRAME, addShadow); //stage.addEventListener(Event.ENTER_FRAME, addNeoshadow); var timer:uint = 0; function tick(event:Event):void { timer += 1 / 24; } function addShadow(event:Event):void { if (timer >= 4.8) { if (rand(3) == 3) { addChild(enemy); } } } function rand(limit:Number):Number { var randomNumber:Number = Math.floor(Math.random() * (limit + 1)); return randomNumber; } } } }
Please help, and thanks in advance!
Offline
Does anyone on this forum even KNOW Actionscript 3.0?
Offline
maxskywalker wrote:
B•u•m•p
Cool!
Offline
fruitmanninja wrote:
maxskywalker wrote:
B•u•m•p
Cool!
*facepalm*
Offline
Could you post the error?
Offline
Don't know Actionscript, sorry
Wish I could help
Offline