# SHould be easy But Here We Are

**URL:** <https://forum.kirupa.com/t/should-be-easy-but-here-we-are/313671>\
**Category:** flash\
**Created:** [September 7, 2010, 12:12am UTC](https://forum.kirupa.com/t/should-be-easy-but-here-we-are/313671 "2010-09-07T00:12:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimacy](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Post date:** [September 7, 2010, 12:12am UTC](https://forum.kirupa.com/t/should-be-easy-but-here-we-are/313671/1 "2010-09-07T00:12:31Z")

</div>

please look at the attatchment

here’s the text portion:  
the above seem to be the order things are happening

im trying to gey my ship added @ center stage  
in “level1” i listen for “level1” to be added then i do the stage deal:

mySampleMC.x = (mySampleMC.stage.stageWidth / 2) - (mySampleMC.width / 2);  
mySampleMC.y = (mySampleMC.stage.stageHeight / 2) - (mySampleMC.height / 2);

and i’m getting:  
TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at Level1/level1Added()  
at flash.display::DisplayObjectContainer/addChild()  
at DocumentClass()  
leve1added  
(this last line is the listener i put in the handler the added event
