# Help on Timeline / Playhead movement

**URL:** <https://forum.kirupa.com/t/help-on-timeline-playhead-movement/270016>\
**Category:** Uncategorized\
**Created:** [September 4, 2008, 8:39am UTC](https://forum.kirupa.com/t/help-on-timeline-playhead-movement/270016 "2008-09-04T08:39:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![florencec2046](https://avatars.discourse-cdn.com/v4/letter/f/4bbf92/32.png) [@florencec2046](https://forum.kirupa.com/u/florencec2046)\
**Post date:** [September 4, 2008, 8:39am UTC](https://forum.kirupa.com/t/help-on-timeline-playhead-movement/270016/1 "2008-09-04T08:39:28Z")

</div>

Hi all,

I have 3 movieClips on main timeline named, mat01mc,mat02mc,mat04mc. Also I have 5 buttons to control the play and pause, but I get errors message when click the buttons : TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at matrix0904\_simplfied\_fla::MainTimeline/gItems()

My code is as below :

===========================================

goStart.addEventListener(MouseEvent.CLICK,gStart);

function gStart(e:MouseEvent):void {  
gotoAndPlay(“start”)  
mat01mc.gotoAndPlay(1);  
}

goMile.addEventListener(MouseEvent.CLICK,gMile);

function gMile(e:MouseEvent):void {  
gotoAndPlay(“itemL”)  
mat02mc.gotoAndPlay(1);  
}

goItems.addEventListener(MouseEvent.CLICK,gItems);

function gItems(e:MouseEvent):void {  
gotoAndPlay(“items”)  
mat04mc.gotoAndPlay(1);  
}

stopM.addEventListener(MouseEvent.CLICK,gStop);

function gStop(e:MouseEvent):void {  
mat01mc.stop();  
mat02mc.stop();  
mat04mc.stop();  
stop();  
}

playM.addEventListener(MouseEvent.CLICK,gPlay);

function gPlay(e:MouseEvent):void {  
mat01mc.play();  
mat02mc.play();  
mat04mc.play();  
play();  
}

===========================================================

Would you tell me what’s wrong ? all buttons are located at the main timeline.

Thank you in advance.

Florence
