Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash MX2004 Slide Presentation back/forward

Status
Not open for further replies.

bllgnn

Programmer
Jan 20, 2002
42
Can someone please point me to some documentation regarding how to get the next or previous slide to show? I have tried using a Template (Tech Slide Presentation), but if I insert a nested screen, it does not show its parent.

I want to create a slide show showing how something is built, slide by slide. So, each slide is a nested screen of the one before it, adding more to what was there before. But when I test it, using the buttons from the template, it skips from the presentation slide to the last great-great-great grandchild.

Any help will be appreciated.

Bill
 
Here is the ActionScript from the Template: Tech Slide Presentation.

Would someone kindly give me a rough translation in everyday words as to what is happening here in this code?

Maybe then I can figure out how to play many slides with one child in many generations one after the other.

btn,next,<forwardBtn>
on (release) {

// Locate the screen holding the anchor for this behavior
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 there's a Slide to apply the behavior to, then do so
if(screen instanceof mx.screens.Slide)
{
screen.rootSlide.currentSlide.gotoNextSlide();
}


}
on (keyPress "<Down>") {

// Locate the screen that is the target of the behavior
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 there's a Slide to apply the behavior to, then do so
if(screen instanceof mx.screens.Slide)
{
screen.rootSlide.gotoLastSlide();
}

}

I'm really looking forward to understanding this!

Thanks,

Bill


 
Never mind. I figured it out by trial and error.

An undocumented feature is that with a parent and child relationship, only the child will appear. A parent never appears. So, to show the incremental steps, a parent (Step1) has to have two children: one identical to the parent (Step1A) and another with the additional information (Step2). Step2 has two kids: Step2A and Step3 and so on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top