Error code 1009 CS6

Help!
I'm trying to revamp a flash for a website, but I'm getting stuck with the coding. I'm trying to link buttons to external URLs and I keep getting the error code
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Untitled_fla::MainTimeline/frame1()
I debugged the code and found the line that is having a problem (the "function" line in the code), but I still don't get it. I used the code
news_btn.addEventListener(MouseEvent.CLICK, move1);
function move1(event:MouseEvent):void{
    var newsLink:URLRequest = new URLRequest("http://www.powerquestglobal.com/news.htm");
    navigateToURL(newsLink, "_self");
for the first button and it works fine. But when I copy and paste it, changing "move1" to "move2" and changing the webaddress, error 1009 comes up. Can anyone help me out?? Please!

I did to the best of my ability, which I must admit is limited since I'm a newbie at Flash. From what I can see the button is located in frame 1 of the main timeline. In a nutshell, I have 9 pictures that are movie clips and have a tween to fade them in as they appear. On top of each picture I put a rectangle that is set Alpha 0%. I made these into buttons so that I could make it possible to link them to a URL. In my limited experience this was the best way I could find for it to work. Here is a copy of my action script so far. I've marked line 75 where it places the error.
import flash.events.MouseEvent;
stop()
btn1.addEventListener(MouseEvent.CLICK,play1);
function play1 (event:MouseEvent):void{
    gotoAndStop("news");
btn2.addEventListener(MouseEvent.CLICK,play2);
function play2 (event:MouseEvent):void{
    gotoAndStop("projects");
btn3.addEventListener(MouseEvent.CLICK,play3);
function play3 (event:MouseEvent):void{
    gotoAndStop("jackie");
btn4.addEventListener(MouseEvent.CLICK,play4);
function play4 (event:MouseEvent):void{
    gotoAndStop("solar");
btn5.addEventListener(MouseEvent.CLICK,play5);
function play5 (event:MouseEvent):void{
    gotoAndStop("xray");
btn6.addEventListener(MouseEvent.CLICK,play6);
function play6 (event:MouseEvent):void{
    gotoAndStop("hydro");
btn7.addEventListener(MouseEvent.CLICK,play7);
function play7 (event:MouseEvent):void{
    gotoAndStop("diesel");
btn8.addEventListener(MouseEvent.CLICK,play8);
function play8 (event:MouseEvent):void{
    gotoAndStop("power");
btn9.addEventListener(MouseEvent.CLICK,play9);
function play9 (event:MouseEvent):void{
    gotoAndStop("battery");
var nextImage:Timer = new Timer(7000);
nextImage.addEventListener(TimerEvent.TIMER, playNext);
nextImage.start();
function playNext(event:Event):void{
    nextFrame();
news_btn.addEventListener(MouseEvent.CLICK, move1);
function move1(event:MouseEvent):void{
    var newsLink:URLRequest = new URLRequest("http://www.powerquestglobal.com/news.htm");
    navigateToURL(newsLink, "_self");
projects_btn.addEventListener(MouseEvent.CLICK, move2);
***Line 75 is here***function move2(event:MouseEvent):void{
    var newsLink:URLRequest = new URLRequest("http://www.powerquestglobal.com/projects.htm");
    navigateToURL(newsLink, "_self");
Here's a screen shot of my timeline

Similar Messages

Maybe you are looking for