I've read through several threads about this error, but haven't been able to apply it to figure out my situation...
My flash file is an approx 5 second animation. Then, the last keyframe of each layer (frame #133) has a button in it. My flash file should stop on this last key frame, and you should be able to click on any of the 6 buttons to navigate to another html page in my website.
Here is the Action Script that I have applied to the frame in which the buttons exist (on a separate layer, see screenshot at: http://www.footprintsfamilyphoto.com/wp-content/themes/Footprints/images/flash_buttonissue.jpg
stop ();
function babieschildren(event:MouseEvent):void
{
trace("babies children method was called!!!");
var targetURL:URLRequest = new URLRequest("http://www.footprintsfamilyphoto.com/portfolio/babies-children");
navigateToURL(targetURL, "_self");
}
bc_btn1.addEventListener(MouseEvent.CLICK, babieschildren);
bc_btn2.addEventListener(MouseEvent.CLICK, babieschildren);
function fams(event:MouseEvent):void
{
trace("families method was called!!!");
var targetURL:URLRequest = new URLRequest("http://www.footprintsfamilyphoto.com/portfolio/families");
navigateToURL(targetURL, "_self");
}
f_btn1.addEventListener(MouseEvent.CLICK, fams);
f_btn2.addEventListener(MouseEvent.CLICK, fams);
function couplesweddings(event:MouseEvent):void
{
trace("couples weddings method was called!!!");
var targetURL:URLRequest = new URLRequest("http://www.footprintsfamilyphoto.com/portfolio/couples-weddings");
navigateToURL(targetURL, "_self");
}
cw_btn1.addEventListener(MouseEvent.CLICK, couplesweddings);
cw_btn2.addEventListener(MouseEvent.CLICK, couplesweddings);
When I test the movie, I get this error in the output box: "TypeError: Error #1009: Cannot access a property or method of a null object reference."
The test movie does stop on the appropriate frame, but the buttons don't do anything (no URL is opened, and the trace statements don't show up in the output box when the buttons are clicked on the test movie).
You can view the .swf file here: www.footprintsfamilyphoto.com/portfolio
I'm confident that all 6 buttons do exist in the appropriate frame (frame 133), so I don't think that's what's causing the 1009 error.
I also tried deleting each of the three function/addEventListener sections one at a time and testing, and I still got the 1009 error every time. If I delete ALL of the action script except for the "stop ()" line, then I do NOT get the 1009 error.
Any ideas?? I'm very new to Flash, so if I haven't clarified something that I need to, let me know!
Update: I'm getting the feeling that this has something to do with the construction of my file rather than the code itself - if anyone has suggestions for more screenshots/information I could include here that might help to reveal any constructional flaws, let me know, and I'll be glad to capture/post them. I'm just not sure what to be looking for as the source of Error 1009? I've confirmed and reconfirmed my instance names... all buttons exist in the same frame where the action script is located (frame 133). i'm not importing any external objects...
Any suggestions would be much appreciated!