Targeting the main timeline from within a MC
Hello all, I have this project that will basically work like a slideshow. I am trying to do things the right way and avoid scenes so I am building each slide as a separate mc and then placing them on the main timeline. What I'm trying to do is get the playback head to advance to the next frame on the main timeline once the mc reaches its last frame. I have found code that works but it seems pretty ghetto:
var _root:MovieClip = MovieClip(root)
stage.addEventListener(Event.ENTER_FRAME, text2);
function text2 (myevent:Event):void {
_root.gotoAndStop("slide2");
}
I guess I have two basic questions:
1. What is the proper way to target a frame on the main timeline from within a mc in as3?
2. Does the way I'm building this make sense or is there a better solution?
Thanks for reading!