I need to add b8 to menuArray, but b8 is located in services_mc (services_mc.b8)
I’m currently getting an error: “Access of undfined property b8”
With out b8 in the array, this code works fine
How do I make this work?
package
{
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import caurina.transitions.properties.FilterShortcuts;
import caurina.transitions.properties.ColorShortcuts;
ColorShortcuts.init();
FilterShortcuts.init();
public class HorcogComplex extends MovieClip
{
private var whatPage:String;
private var menuArray:Array;
public function HorcogComplex()
{
whatPage = "b1";
menuArray = [b1,b2,b2,b3,b4,b5,b6,b7,b8];
for each (var navButtons in menuArray)
{
navButtons.addEventListener(MouseEvent.CLICK, butClick);
navButtons.addEventListener(MouseEvent.MOUSE_OVER, butOver);
navButtons.addEventListener(MouseEvent.MOUSE_OUT, butOut);
}
}
private function butClick(event:MouseEvent):void
{
if (whatPage == event.currentTarget.name)
{
}
else
{
Tweener.addTween(pmask,{alpha:0,scaleY:0,time:.4,onComplete:pmaskUnscaleY});
Tweener.addTween(b8p,{y:-480,alpha:0,time:.6,transition:"easeOutBack"});
Tweener.addTween(this[String(whatPage+"t")],{_color:0xFFFFFF,time:.6,transition:"easeOutBack"});
Tweener.addTween(this[String(whatPage+"p")],{delay:.2,y:-480,alpha:0,time:.6});
Tweener.addTween(this[String(event.currentTarget.name+"p")],{delay:.2,y:217,alpha:1,time:.6});
whatPage = event.currentTarget.name;
}
}
private function pmaskUnscaleY():void
{
Tweener.addTween(pmask,{alpha:1,scaleY:1,delay:.5,time:.5});
}
private function butOver(event:MouseEvent):void
{
Tweener.addTween(this[String(event.target.name+"t")],{_color:0xFAD183,time:.5,transition:"easeOutBack"});
}
private function butOut(event:MouseEvent):void
{
if (whatPage == event.currentTarget.name)
{
}
else
{
Tweener.addTween(this[String(event.target.name+"t")],{_color:0xFFFFFF,time:.5,transition:"easeOutBack"});
}
}
}
}