To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 03-15-2006, 11:32 PM   #1
Alphanumeric92
Member
 
Join Date: Jan 2005
Posts: 40
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
Alphanumeric92 is offline   Reply With Quote
Old 03-16-2006, 01:54 PM   #2
Alphanumeric92
Member
 
Join Date: Jan 2005
Posts: 40
ttt
Alphanumeric92 is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:30 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.