# TypeError: Error #1009 HELP

**URL:** <https://forum.kirupa.com/t/typeerror-error-1009-help/301533>\
**Category:** flash\
**Created:** [December 10, 2009, 9:10pm UTC](https://forum.kirupa.com/t/typeerror-error-1009-help/301533 "2009-12-10T21:10:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gkdave](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gkdave/32/1889_2.png) [@gkdave](https://forum.kirupa.com/u/gkdave)\
**Post date:** [December 10, 2009, 9:10pm UTC](https://forum.kirupa.com/t/typeerror-error-1009-help/301533/1 "2009-12-10T21:10:45Z")

</div>

Keep getting this output error when I test my movie. I started with the first button(Facebook) and then copied to the second button(myspace). Why does it error, if nothing is different?

Here is my code…

import flash.events.MouseEvent;  
var getFacebook:URLRequest =new URLRequest(“[http://www.facebook.com/armygoldenknights](http://www.facebook.com/armygoldenknights)”);  
var getMyspace:URLRequest =new URLRequest(“[http://www.myspace.com/armygoldenknights](http://www.myspace.com/armygoldenknights)”);

//—Facebook Property change—\  
facebook.addEventListener(MouseEvent.MOUSE\_OUT, fOut);  
facebook.addEventListener(MouseEvent.MOUSE\_OVER, fHover);

function fOut(event:MouseEvent):void{  
facebook.alpha = 1;  
}  
function fHover(event:MouseEvent):void{  
facebook.alpha -=.50;  
}

//—myspace Property Change–\  
myspace.addEventListener(MouseEvent.MOUSE\_OUT, mOut);  
myspace.addEventListener(MouseEvent.MOUSE\_OVER, mHover);

function mOut(event:MouseEvent):void{  
myspace.alpha = 1;  
}  
function mHover(event:MouseEvent):void{  
myspace.alpha -=.50;  
}

//—Facebook Get URL —\  
facebook.addEventListener(MouseEvent.CLICK, fClick);

function fClick(event:MouseEvent):void{  
navigateToURL(getFacebook);  
}

//–myspace geturl–\  
myspace.addEventListener(MouseEvent.CLICK, mClick);

function mClick(event:MouseEvent):void{  
navigateToURL(getMyspace);  
}

It worked for the first button, but when I copied to second button, it gave me this output error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at Untitled\_fla::MainTimeline/frame1()

thanks
