hello, I am new to AS and am trying to create a simple space invaders type game. you shoot bullets from a gun at enemies. i have created the function to fire bullets and also the create enemy function. i have tried to set an interval to call the function every 2000 ms. When i try call the function directly nothing appears on the screen. when i call a function to then call the enemy function the first enemy is created and behaves normally, however when the next is called it is deleted, replaced and the new enemy is placed randomly on the screen. i have done a trace of the "this" for my create enemy function and when it is called normally and works it says _level0. when i try call it using the interval the trace reveals that this is undefined. i am using initobjects as part of the movement. any help and advice would be welcome. thank you



Bookmarks