# Accessing an object placed on a frame with AS3

**URL:** <https://forum.kirupa.com/t/accessing-an-object-placed-on-a-frame-with-as3/300686>\
**Category:** flash\
**Created:** [November 25, 2009, 3:23pm UTC](https://forum.kirupa.com/t/accessing-an-object-placed-on-a-frame-with-as3/300686 "2009-11-25T15:23:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jik\_ff](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@jik\_ff](https://forum.kirupa.com/u/jik_ff)\
**Post date:** [November 25, 2009, 3:23pm UTC](https://forum.kirupa.com/t/accessing-an-object-placed-on-a-frame-with-as3/300686/1 "2009-11-25T15:23:05Z")

</div>

Ok, so I made a custom class, but I did not want to add all the text to it through code (much easier to type it in flash on the frame). I name the instance aScoreBoard.

As my code runs, I need to call some of the functions that are part of the ScoreBoard class. As the code gets to this point, I try this line:

aScoreBoard.UpdateScores(passArray);

which will update the scores on the scoreboard. When that line in AS3 tries to execute, I get this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at Main/Main::DayEnd()[C:\projects\Dev\_Learning\LongJump\src\Main.as:616]  
at Main/Main::ButtonAfterJump()[C:\projects\Dev\_Learning\LongJump\src\Main.as:606]

Is there a way to do things this way? or will I have to go and do all the extra text entering in the code?
