|
-
Need help targeting a duplicateMovieClip on a Vertical Scrolling Panorama Menu
First off I modified the Vertical Panorama 360 MX that can be found on Flash Kit to make my Seamless Panoramic Menu work. After some tweaking I've been able to make the menu work exactly the way I had planned except for one problem. Here is the scenario; if you click on the first button labeled TOP the button will become black to signal that you’re ON that section. Then, if you click the button below it, the TOP button will go back to its regular state and the 2nd button will turn ON. That works fine at first glance, but if you click on the TOP button then scroll the menu up and click on the BTM button directly above the TOP button, the BTM button will not turn the TOP button back to its current state and cause both buttons to be on the ON state. This happens because the movieclip that contains the list of seven buttons and actionscript for links and button states is duplicated to make the menu seamlessly scroll around infinitely. It uses the duplicateMovieClip method of creating a copy of the movieclip containing the buttons. This causes the movieclips to work independently of each other throwing off my method of changing the button states.
Here’s the method I use to change the button states. I have two movieclips for the button, regular and active. In the movieclip that contains the button list I add this actionscript. It just attaches the active movieclip on top of the current instance of the button. At the same time it loads a blank movieclip on top of every other button to clear out any other button(s) that currently have an active state on. Heres an example of the first 2 buttons, I repeat this for all 7 buttons.
Code:
section01_btn01.onPress = function() {
section01_btn01.attachMovie("section01_btn01_active", "section01_btn01_active", 2)
section01_btn02.attachMovie("blank", "blank", 2)
section01_btn03.attachMovie("blank", "blank", 2)
section01_btn04.attachMovie("blank", "blank", 2)
section01_btn05.attachMovie("blank", "blank", 2)
section01_btn06.attachMovie("blank", "blank", 2)
section01_btn07.attachMovie("blank", "blank", 2)
}
section01_btn02.onPress = function() {
section01_btn01.attachMovie("blank", "blank", 2)
section01_btn02.attachMovie("section01_btn01_active", "section01_btn01_active", 2)
section01_btn03.attachMovie("blank", "blank", 2)
section01_btn04.attachMovie("blank", "blank", 2)
section01_btn05.attachMovie("blank", "blank", 2)
section01_btn06.attachMovie("blank", "blank", 2)
section01_btn07.attachMovie("blank", "blank", 2)
}
This may not be the cleanliest way of achieving different button states, but it has worked fine for me up until building this complex scrolling menu. So, my problem lies in trying to change the above code to address the current movieclip and the duplicated instance of the movieclip. Unless someone has a suggestion on how I can make this work with another method.
Here is a link to the source FLA file. It’s in version MX2004 PRO.
http://www.rihlmann.com/flashkit/scroll_menu.fla
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|