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 Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-07-2007, 12:09 PM   #1
merlin20674
Junior Member
 
Join Date: Jan 2007
Posts: 3
Dynamic drop down menu

Hi,I downloaded a dynamic drop down menu from Geoff stearns off the ultrashock web site, and have so far managed to customize the fields and colours.

As i understand it when a sub menu is clicked it should load or display text in the current selection window. That is what i am stuck on. How?
i beleive i have found the relevant part to the action script but how do i modify it.

onClipEvent (load) {
// -- set up names of main items here
// -- you can add as many new sections as you want (or your computer can handle)
mainSections = new Array("Index", "Destiny", "Personality", "Heart", "Expression");
// -- one array for each main Section -
subSection0 = new Array("What is Numerology", "Learn More", "To Calculate");
subSection1 = new Array("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Eleven", "Twenty-Two");
subSection2 = new Array("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Eleven", "Twenty-Two");
subSection3 = new Array("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Eleven", "Twenty-Two");
subSection4 = new Array("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Eleven", "Twenty-Two");
// --
// --
// -- build the main buttons
for (i=0; i<mainSections.length; i++) {
attachMovie("mainButton", "main"+i, i+100);
myButton = this["main"+i];
myButton.subs = this["subSection"+i];
myButton.button.value = mainSections[i];
myButton._x = myButton._width*i;
// -- build subsection buttons for each main button
for (x=0; x<myButton.subs.length; x++) {
myButton.attachMovie("subButton", "sub"+x, x);
mySub = myButton["sub"+x];
mySub.button.value = myButton.subs[x];
mySub.button.outYpos = myButton._height+(mySub._height*x);
}
}
// -- function that opens the subsection on rollover
function openSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
subMenuCounter = 0;
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.outYpos;
currentOpen = target;
}
}
// -- close subsections function
function closeSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.oYpos;
}
}
// - this is the fuction you would change to load content, or add more functionality to the buttons
function doSubSection (target, sub) {
_root.currentSelection = target +" "+ sub;
closeSubs(currentOpen);
}

}
onClipEvent (enterFrame) {
// -- a timer that closes the menus after a certain amount of time
subMenuCounter++;
if (subMenuCounter>100) {
closeSubs(currentOpen);
subMenuCounter = 0;
}
}
onClipEvent (mouseUp) {
// -- this closes the curently open submenu if the user clicks outside of the menu
if (!this.hitTest(_root._xmouse, _root._ymouse)) {
closeSubs(currentOpen);
}
}

any help would be appreciated
thank you
merlin20674 is offline   Reply With Quote
Old 01-08-2007, 05:06 PM   #2
stormofsilence
Member
 
Join Date: Aug 2006
Location: St Austell, Cornwall, UK
Posts: 43
Um i wouldnt know where 2 start

But here is a cool tutorial that you may want to look at hope its what you kinda want.

Because its step by step you will learn the action scripts and change whatever you want!

Nice Tutorial

Hope It Helps
stormofsilence is offline   Reply With Quote
Old 01-11-2007, 05:44 AM   #3
merlin20674
Junior Member
 
Join Date: Jan 2007
Posts: 3
Thank you for the response but unfortunately i'm working with flash 5 and the tut. is for flash 8.
I will figure something else out.

Thank you
merlin20674 is offline   Reply With Quote
Old 01-11-2007, 11:09 AM   #4
stormofsilence
Member
 
Join Date: Aug 2006
Location: St Austell, Cornwall, UK
Posts: 43
Are you sure

Isnt flash 5 called Flash MX or am I being dumb? The turotial is MX, MX2004 and 8 compatable if not ill find u a better 1

Thanks
stormofsilence is offline   Reply With Quote
Old 01-11-2007, 05:10 PM   #5
merlin20674
Junior Member
 
Join Date: Jan 2007
Posts: 3
dunno, could be. Have got the MX2004 bible, but it ain't explained in their at all. Will look at the tut. again. I think the problem is in the bit in bold. linking the .rootcurrent selection to the buttons. seen a link on a diff forum and he loaded new movies for each button. just can't figure it out.Just the one paragraph is confusing me

_root.currentSelection = target +" "+ sub;

i understand _root.current selection being the area where the text will load.

but
= target+" "=sub;

think this is the area i need to load the text.

Sorry newbie and flash. any easier navigation bars i can download to modify?

Basic site needs nav bar that loads new content on same screen.
merlin20674 is offline   Reply With Quote
Reply

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

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 08:11 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.