Go Back   OXYLUS Flash Board > Support > Flash Menus > 2 Levels Accordion Menu

Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2008, 12:14 AM   #1 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 4
Default How do I make the second level background stay on when clicked

Adrian,

I bought it, and love it... but I have one big need -- How do I make the second level background stay on when clicked...just the background. (not the letters highlight).So when clicked a second level choice, I want the background to stay on like it does on level 1.

I am using it to show a movie that has a few steps - Introduction, Features, Conclusion I also have the need to be able to call the second level background dynamically, I need to let the user know which part of the movie he is watching.

If I get this answered your work will be on a huge site in the US..and I will post it shortly after in your forum.

Please help I always like helping my Romanian friends with exposure...its the least I can do.

Multumesc mult - in avans,
Lenroc
Lenroc is offline   Reply With Quote
Old 11-19-2008, 09:51 PM   #2 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,981
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

Hi,
Open source\oxylus\TwoLevelsMenu\Level2Item.as and add the following code (written in bold):

Code:
	.....
	private var txtCol:Number;
	private static var crt:MovieClip;
	public function Level2Item() {
	....
	private function onRelease() {
		onClick.call(this, node, 2);
		crt.enabled = true;
		crt.onRollOut();
		crt = this;
		crt.enabled = false;
	}
Open source/main.fla and republish the swf to see the results.

All the best,
Adrian
Adrian is offline   Reply With Quote
Old 11-20-2008, 08:22 PM   #3 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 4
Default

You guys are Awesome .... it worked great.

Thank you for the help.
Cornel
Lenroc is offline   Reply With Quote
Old 03-25-2009, 03:51 PM   #4 (permalink)
Junior Member
 
Join Date: Mar 2009
Posts: 6
Default Help Please!

How do I get the second level buttons to reset after closing the accordion by clicking on Top level buttons.

The second level button stays highlighted/disabled after the accordion has been closed and reopened.
rdunn99 is offline   Reply With Quote
Old 03-27-2009, 02:52 AM   #5 (permalink)
Junior Member
 
Join Date: Mar 2009
Posts: 6
Default

Hey Oxylus,

Nice work!...I just have a small problem regarding the solution above...

The above solution was applied and it worked very well, thank you. But, how do I get the second level buttons to reset after closing the accordion by clicking on Top level buttons. Currently...The second level button stays highlighted/disabled after the accordion has been closed and reopened.

I want to have the second level buttons stay highlighted and disabled when they are selected and being used, but when the top level nav is engaged then I'd like the sub Nav to reset...

Thanks for your help...

Rico
rdunn99 is offline   Reply With Quote
Old 04-01-2009, 09:58 AM   #6 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,981
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

Add a static function in Level2Item.as:

Code:
public static function resetSub(){
crt.enabled = true;
crt.onRollOut();
}
Now, inside Level1Item.as, inside the onRelease method you should add:

Code:
oxylus.TwoLevelsMenu.Level2Item.resetSub();

Save and republish.
Adrian is offline   Reply With Quote
Old 04-06-2009, 08:58 PM   #7 (permalink)
Junior Member
 
Join Date: Mar 2009
Posts: 6
Default

Thank You Very Much!
rdunn99 is offline   Reply With Quote
Old 11-02-2009, 09:02 AM   #8 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 9
Default just to clarify...

does the second level stay open while on the page that the url pointed to from the home page.....?
pelsar is offline   Reply With Quote
Old 11-06-2009, 07:03 PM   #9 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 9
Default why are my AS files different?

both my as files do not have the same exact coding as you have shown here..which means i can't say i'm sure where i am putting in the changes...


Quote:
import mx.utils.Delegate;
import caurina.transitions.Tweener;
class oxylus.TwoLevelsMenu.Level1Item extends MovieClip {
private var Bg:MovieClip;
private var Lbl:TextField;
private var Arw:MovieClip;
private var node:XMLNode;
private var Msk:MovieClip;
private var w:Number;
private var mh:Number;
private var t:Number;
public var onClick:Function;
public var onHUpdate:Function;
private var subMenu:MovieClip;
private static var allItems:Array = new Array();
private static var crt:MovieClip;
private var idx:Number;
private var dly:Number = 0;
public function Level1Item() {
Quote:
private function onRelease() {
onClick.call(this, node, 2);
crt.enabled = true;
crt.onRollOut();
crt = this;
crt.enabled = false;

}
private function mcPlay(mc:MovieClip, f:Number) {
if (f == 0) {
f = mc._totalframes;
}
mc.onEnterFrame = function() {
var cf:Number = this._currentframe;
if (cf == f) {
delete this.onEnterFrame;
} else if (cf<f) {
this.nextFrame();
} else {
this.prevFrame();
}
};
}
private function onRollOver() {
mcPlay(Bg, 0);
mcPlay(Arw, 0);
}
private function onRollOut() {
mcPlay(Bg, 1);
mcPlay(Arw, 1);
}
private function onReleaseOutside() {
onRollOut();
}
}

Last edited by pelsar; 11-06-2009 at 07:12 PM.
pelsar is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:24 PM.