jeangj
06-15-2008, 02:34 PM
hi
I'm working on my AS3 shooting game class. The targets come down the stage randomly within a timer. timer = new Timer(Math.random() * 6000);
If i shoot before the target objects are on the stage, I get this error:
TypeError: Error #2007: Parameter hitTestObject must be non-null.
at flash.display:DisplayObject/flash.display:DisplayObject::_hitTest()
at flash.display:DisplayObject/hitTestObject()
at UfoGame/:moveBullet()
What I need to do is a check, if a target object is on the stage or not.
Has somebody and idea or example how to do that?
I'm working on my AS3 shooting game class. The targets come down the stage randomly within a timer. timer = new Timer(Math.random() * 6000);
If i shoot before the target objects are on the stage, I get this error:
TypeError: Error #2007: Parameter hitTestObject must be non-null.
at flash.display:DisplayObject/flash.display:DisplayObject::_hitTest()
at flash.display:DisplayObject/hitTestObject()
at UfoGame/:moveBullet()
What I need to do is a check, if a target object is on the stage or not.
Has somebody and idea or example how to do that?