I am using actionscript 3.0 and am having trouble accessing a movie clip on the root from a movieclip that is embedded in another movieclip. Basically I have animated symbols that are embedded inside movieclip A. All those symbols have an alpha = 0. On the root I have movieclip B. When I rollover movieclip B (called nineOval) I want it to react (which it does), but I also want to change the alpha of the embedded movieclip A to = 1 and then back to =0 on rollout. Here is the code below.
nineOval is on the root, and tank, jet2, missle, ect are embedded inside a movieclipA I called jet. When I rollover nineOval, nineOval should move outward, some text that is on the root should vanish, and the tank and jet2’s alpha should = 1, and then nineoval should move back on rollout and alpha on tank should = 0 and the text on the root should show again. This is not happening. NineOval moves as it should, but I never see the jet or any other armament, I just see the tank, but it doesn’t move at all, as it suppose to animate across the screen per the motion tween I created . On rollover, I get this error message: TypeError: Error #1009: Cannot access a property or method of a null object reference. at ball5_fla::jet_18/onRolloverNine(). All my code in place on the inner or child movieclip or inside movieclipA.
I am lost .
Here is my code:
MovieClip(this.parent).nineOval.addEventListener(M ouseEvent.ROLL_OVER, onRolloverNine);
MovieClip(this.parent).nineOval.addEventListener(M ouseEvent.ROLL_OUT, onRolloutNine);
jet2_mc.alpha = 0;
tank.alpha = 0;
missle.alpha = 0;
explosion.alpha = 0;
afburn.alpha = 0;
function onRolloverNine(event:MouseEvent):void
{
MovieClip(this.parent).rmr.alpha = 0;
MovieClip(this.parent).ovMess.alpha = 0;
MovieClip(this.parent).nineOval.x -= 30;
jet2_mc.alpha = 1;
tank.alpha = 1;
missle.alpha = 1;
explosion.alpha = 1;
afburn.alpha = 1;
}
function onRolloutNine(event:MouseEvent):void
{
jet2_mc.alpha = 0;
tank.alpha = 0;
missle.alpha = 0;
explosion.alpha = 0;
afburn.alpha = 0;
MovieClip(this.parent).rmr.alpha = 1;
MovieClip(this.parent).nineOval.x += 30;
MovieClip(this.parent).ovMess.alpha = 1;
}
MovieClip(this.parent).nineOval.buttonMode = true;