# Buttons: How to use later in the timeline without getting error 1009?

**URL:** <https://forum.kirupa.com/t/buttons-how-to-use-later-in-the-timeline-without-getting-error-1009/327607>\
**Category:** flash\
**Created:** [March 14, 2012, 6:21am UTC](https://forum.kirupa.com/t/buttons-how-to-use-later-in-the-timeline-without-getting-error-1009/327607 "2012-03-14T06:21:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drabski](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@drabski](https://forum.kirupa.com/u/drabski)\
**Post date:** [March 14, 2012, 6:21am UTC](https://forum.kirupa.com/t/buttons-how-to-use-later-in-the-timeline-without-getting-error-1009/327607/1 "2012-03-14T06:21:19Z")

</div>

hi everyone, I’m new to AS3 and I cannot find a **simple** answer to this question and have been looking for some time now. My problem is a simple one.

I have a button symbol in the Library that I want to use _later_ in the movie (i.e. not on frame 1!). When I get to frame 50 in my movie I want to stop the timeline and have the button appear at that point but not before. At the moment there is _nothing else_ in my movie apart from an instance of the button named ‘button01’ placed at frame 50 on its own layer, a stop action on the timeline at frame 50 and the following code on frame 1:

```auto
button01.addEventListener(MouseEvent.CLICK, goClick, false, 0, true);

function goClick(evt:MouseEvent):void{
    
    play();
}

```

Every time I run the movie I get this error:

[COLOR=#b22222]Error #1009: Cannot access a property or method of a null object reference at \_004c2ActionScriptSimple\_fla::MainTimeline/frame1()[\_004c2ActionScriptSimple\_fla.MainTimeline::frame1:6][/COLOR]

Is there something I must do to instantiate the button before I can use it later in the movie? I don’t want to have to put it on the stage at frame 1 and make it alpha=0 as I saw suggested somewhere else I’d like the button to appear only when I need it.

Now I know there must be a simple solution to this but I have searched a lot for an answer and cannot find information that addresses this exactly. I’m sorry if this has been answered already and if it has please point me in the direction of that thread and I will duly go and read it . . .
