Copy link to clipboard
Copied
Hi
I need to know how to stop a function from happening until I get to a certain frame
I'm using class files
Thanks
Copy link to clipboard
Copied
something doesn't make sense. what does the following trace() reveal:
in Game.as:
function init(e:Event):void{
_stage=stage;
trace(stage); //is this line 38?
Key.initialize(stage);
Copy link to clipboard
Copied
i get this but it will carry on as it keeps saying the same thing when a enemy spawns
[object Stage]
[object Stage]
[object EnemyShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Game/sendEnemy()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
[object EnemyShip]
[object Stage]
[object Stage]
[object EnemyShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Game/sendEnemy()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
[object RocketShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Game/sendEnemyRocket()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
[object EnemyShip]
[object Stage]
[object RocketShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyShip/shoot()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
[object EnemyShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Ship/move()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Ship/move()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyBullet/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Bullet/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyShip/shoot()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Ship/move()
[object EnemyShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Game/sendEnemy()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
[object EnemyShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Bullet/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Ship/move()
[object RocketShip]
[object Stage]
[object EnemyShip]
[object Stage]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyBullet/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyShip/shoot()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyBullet/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at RocketShip/shoot()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Bullet/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyShip/kill()
at EnemyShip/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyShip/kill()
at EnemyShip/enterFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at EnemyShip/shoot()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Copy link to clipboard
Copied
you're reporting inconsistant results which is going to make it impossible to help you via a forum.
no code has changed between the code that triggered a Key.as error and the last example that does not contain a Key.as error.
Copy link to clipboard
Copied
What can I do because this is really annoying
Copy link to clipboard
Copied
you either need to use the same steps to test your swf so you can report consistant results or hire someone to fix this for you.
Copy link to clipboard
Copied
ok ill try but if that dosent word where would i find someone to hire?
Copy link to clipboard
Copied
send me an email: http://www.kglad.com > contact.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now