views:

39

answers:

1

without getting too verbose....i have been learning AS3 over the last week by building a small Flash site. the navigation menu is constructed as a custom class rather than on a keyframe in the flash file itself. I now find myself simply needing to issue a command to control the main flash file's timeline in this manner...

pages.gotoAndPlay(framelabel);

from the custom class.

help.

A: 

The problem here you have is with scope.

There are two ways to do this in a simple way. You can path to the timeline that you require to change using the parent property e.g. this.parent.parent.parent.gotoAndStop(...) or just use the root value if the timeline you're trying to change is on the root root.gotoAndStop(...) or stage.gotoAndStop(...)

danjp