# Externally handle two shows in AS2 with a dynamic button at highest depth?

**URL:** <https://forum.kirupa.com/t/externally-handle-two-shows-in-as2-with-a-dynamic-button-at-highest-depth/317003>\
**Category:** flash\
**Created:** [December 7, 2010, 4:49pm UTC](https://forum.kirupa.com/t/externally-handle-two-shows-in-as2-with-a-dynamic-button-at-highest-depth/317003 "2010-12-07T16:49:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrankin913](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@rrankin913](https://forum.kirupa.com/u/rrankin913)\
**Post date:** [December 7, 2010, 4:49pm UTC](https://forum.kirupa.com/t/externally-handle-two-shows-in-as2-with-a-dynamic-button-at-highest-depth/317003/1 "2010-12-07T16:49:18Z")

</div>

Hello everyone,

I have been coding in AS3 for about 6 months (love it) and now it seems I am forced to go back and learn some AS2. I feel it necessary to mention, this is a pure code project. No drawing with the mouse.

I have two .swf movies with which to work.

1. movie introduction written in AS2. Cannot edit this file.
2. Slide show that I wrote in AS3.

The final product includes two important buttons:

1. “SkipIntro” button to skip ahead to the slide show .swf.
2. “ReplayIntro” button to skip back to the introduction .swf.

I have created a 3rd file in AS2 as a controls mechanism to coordinate the loading of the external movies. At first I tried AS3 but the AS2 introduction .swf was missing elements at load time. I am using  
loadMovie(“introduction.swf”, this.getNextHighestDepth()); to load the movies without problems.

My problem is that I need some way to keep the “ReplayIntro” button at a higher depth than the slide show .swf so it will remain visible and accessible.

Originally, the “ReplayIntro” button resided **IN** the slide show .swf. This created the same problems loading the AS2 show from AS3 so I am looking for a new approach.

My inclination is to create some kind of dynamic text button that changes from a “SkipIntro” to a “ReplayIntro” depending on which show is displaying while constantly maintaining the button at the highest depth.

Any thoughts or pointers how to accomplish this with AS2?

Thanks,

Ryan Rankin
