actionscript 3.0 help

Miscellaneous Forums/General Discussion/actionscript 3.0 help

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You have to set the instance variable to null. You can't set "this" to "null".

var Test:SomeClass = new SomeClass();
trace(Test); // --> [object SomeClass]
Test = null;
trace(Test); // --> null


You want to make another class that handles the bullets.

It will contain
- a static array
- a static method for adding a new bullet into the static array
- a static method for updating the bullets (loops thru the array and calls a method in the bullet class)
- a static method for removing a bullet instance from the static array (make the bullet instance in the array a null).

In the bullet class you will call the static method for remoting a bullet instance (pass "this" as parameter) when you want to delete the bullet.