I have tried a few different solutions for this problem but nothing seems to work. I understand the concept of AS3 but I don't know how to write it on my own.

The problem:
You will have to download the file from: http://www.kellykruschel.com/help.zip (sorry, it is over the limit a bit)

When I go into the clip brain_back on the second frame in the actions layer I reference two different movieclip rollover/out events. The second one which highlights the red area of the brain is not working and I get an error when I preview the file. Note: to see this error you need to click on the right arrow to rotate the brain and see what I am working on at the moment.

The error I get is:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at m1l3s2_fla::brain_back_2/frame2()
at flash.display::MovieClip/gotoAndPlay()
at m1l3s2_fla::MainTimeline/f()

From what I can tell is that it can't find where I want it to go. I've checked the spelling of the objects, everything looks good to me.

Narrowing down the issue:

The parietal object which plays frame 7 works fine.
The frontal object which plays frame 20 does not work.

If I change parietal to play frame 20 it will display the rollover but will not rollout. This probably has something to do with the error but I can't figure out how to solve it.

The actionscript I am having problems with:


import  flash.display.MovieClip;
import  flash.events.MouseEvent;

parietal.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
parietal.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler);
frontal.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler2);
frontal.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler2);

parietal.buttonMode = true;
parietal.useHandCursor = true;
frontal.buttonMode = true;
frontal.useHandCursor = true;

function onRollOverHandler(myEvent:MouseEvent){

function onRollOutHandler(myEvent:MouseEvent){
function onRollOverHandler2(myEvent:MouseEvent){

function onRollOutHandler2(myEvent:MouseEvent){