# Buttons Help

**URL:** <https://forum.kirupa.com/t/buttons-help/303416>\
**Category:** flash\
**Created:** [January 20, 2010, 2:32am UTC](https://forum.kirupa.com/t/buttons-help/303416 "2010-01-20T02:32:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeaDigital10](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@SeaDigital10](https://forum.kirupa.com/u/SeaDigital10)\
**Post date:** [January 20, 2010, 2:32am UTC](https://forum.kirupa.com/t/buttons-help/303416/1 "2010-01-20T02:32:20Z")

</div>

Hello & thank you for helping 🙂

I have 3 buttons. The 3 buttons are placed on 3 time lines within a movie clip callled Buttons\_Mov\_Btns. There is a time line dedicated to AS.

I want to click the button and have a movie play (Or load a scene which will be the web page contents) When I click another button, I would like to unload that scene or movie and play another (which will be another web pages contents)

My action script has an error message and I don’t know how to do this. All I have that functions correctly now is that on mouse over it plays a movie special effect I made in After Effects.

The AS is below:  
stop();

information\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, informationHandler);  
function informationHandler(event:MouseEvent):void {  
navigateToURL(new URLRequest(“[http://google.com](http://google.com)”));  
}  
testimonials\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, testimonialsHandler);  
function testimonialsHandler(event:MouseEvent):void {  
navigateToURL(new URLRequest(“[http://msdn2.microsoft.com/en-us/silverlight/default.aspx](http://msdn2.microsoft.com/en-us/silverlight/default.aspx)”));  
}  
purchase\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, purchaseHandler);  
function purchaseHandler(event:MouseEvent):void {  
navigateToURL(new URLRequest(“[http://www.adobe.com/devnet/flash/](http://www.adobe.com/devnet/flash/)”));  
}

The error message is:

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at 800\_fla::Buttons\_Mov\_Btns\_4/frame16()

The EXAMPLE that is not functioning in full is here:  
[http://kiwiglow.com/index3.html](http://kiwiglow.com/index3.html)

The Source File is here:  
[http://kiwiglow.com/800-600.fla](http://kiwiglow.com/800-600.fla)

If anyone knows of some good code that will work, can point me in the right direction I would be ever so thankful!!!

The movie for special effects is a separate Symbol than the button. The button is carefully placed in the same place so it looks like after the fade the buttons stay, but in actuality the buttons appear on the last frame and the movie elements go away the frame before the last.

The picture of the timeline for the buttons is in this picture:  
[![](http://img19.imageshack.us/img19/7281/kiwifla.jpg)](http://img19.imageshack.us/i/kiwifla.jpg/)
