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”);
var getMyspace:URLRequest =new URLRequest(“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