# Delayed time-gap in flash cs3 while coding on the timeline

**URL:** <https://forum.kirupa.com/t/delayed-time-gap-in-flash-cs3-while-coding-on-the-timeline/313871>\
**Category:** flash\
**Created:** [September 12, 2010, 7:23pm UTC](https://forum.kirupa.com/t/delayed-time-gap-in-flash-cs3-while-coding-on-the-timeline/313871 "2010-09-12T19:23:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adBuryD](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@adBuryD](https://forum.kirupa.com/u/adBuryD)\
**Post date:** [September 12, 2010, 7:23pm UTC](https://forum.kirupa.com/t/delayed-time-gap-in-flash-cs3-while-coding-on-the-timeline/313871/1 "2010-09-12T19:23:22Z")

</div>

hi  
I would like to understand if such a problem exists in flash cs3 or is it just me.  
My problem is that while I try to code on the timeline in cs3 using as3 i hav encountered this issue of “**[COLOR=DarkRed]null references[/COLOR]**” every time i change frames.

let us assume I have 4 frames . withs buttons oR movieclip in each OF them. i have a code on all the frames each corresponding to the movclips present on that frame. so when i go from frame 1 to 2 and i have a code in frame to which is something line “_mc.addEventListener(event, func)_” flash throws an error of null reference … which after a lot of frustration I realized that my code was executed atleast 300 milliseconds before flash realizes that there are objects on that frame.  
My fix was  
_1. timers events call the function_ or

```auto

2. stage.addEventListener(event,chk) 
function chk (){
try{
if(mc!=null){
    //remove event listener
    // execute code

}
}catch(e){}
}

```

I would like to know if this is a known bug of cs3 or not… Also if there is any other solution to this…
