Hello,
I have set up an animated, dropdown navigation MC and put it on my root slide. Problem I am running into is when I add actionscript to each of the buttons so that each one goes to a particular slide, nothing happens.
If I drag an instance of one of the buttons out onto any of the screens (root or any other one) and add actionscript to it, it works great.
I figure since my buttons are inside of an MC, the actionscript must need to change to recognize the screens outside of the MC…
How would I change my current script to do this? Here’s my script:
on (release) {
- // GoTo Screen behavior
if((this._parent.slide2 != undefined) && (this._parent.slide2 != null))
{
var screen = null;
var target = this;
while((screen == null) && (target != undefined) && (target != null))
{
if(target instanceof mx.screens.Screen)
{
screen = target;
}
else
{
target = target._parent;
}
}
if(screen instanceof mx.screens.Slide)
{
screen.gotoSlide(this._parent.slide2);
}
}
// End GoTo Screen behavior
}*