# Accelerometer function issue

**URL:** https://forum.kirupa.com/t/accelerometer-function-issue/332462
**Category:** flash
**Created:** [June 16, 2014, 1:33pm UTC](https://forum.kirupa.com/t/accelerometer-function-issue/332462 "2014-06-16T13:33:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rworsl](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rworsl](https://forum.kirupa.com/u/rworsl)
#### Post date: [June 16, 2014, 1:33pm UTC](https://forum.kirupa.com/t/accelerometer-function-issue/332462/1 "2014-06-16T13:33:42Z")

</div>

Hi guys,

I’m very new to flash and AS3 and I’m getting an annoying issue. I’m currently trying to make a simple game using accelerometer controls, and it works fine for the first level, but as soon as it tries to jump to either another scene or frame 2 (I’ve tried having the different levels on either scenes or frames, and the error occurs regardless) I’m getting this error: [h=1][SIZE=2][TypeError: Error #1009: Cannot access a property or method of a null object reference.](https://forums.adobe.com/message/4317088#4317088)[/SIZE][/h]  
From looking around on the web I can see that it’s trying to load something that’s not there, but I’m not sure at what point it’s stopped existing. Do I need to terminate the function at the end of the 1st scene and then re-initialize?

Unfortunately I can’t upload any code until later on, but any thoughts would be much appreciated.
