Go Back   OXYLUS Flash Board > Support > Flash Menus > Sliding List

Reply
 
LinkBack Thread Tools Display Modes
Old 12-16-2008, 12:06 PM   #1 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 4
Default Showing complete route to last clicked item

Hi again Adrian,

I have now the need to show in the textbox (result_txt) not only the name of the item clicked but the complete route (category1/category2/.../item).

This way the user could see the position within the contents tree of the last clicked item (that is, the last loaded external movie clip or actual content of the screen), while he surfs the menu looking for another item to click on (another different content to be loaded).

Could you give a hand here?

Regards,

Javier
javierdealfonso is offline   Reply With Quote
Old 12-18-2008, 11:42 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

Try this:

Code:
PList_mc.onItemSelect = function(n:XMLNode) {
    var path:String = "";
    while (n.parentNode != null) {
        path = n.attributes.title+"/"+path;
        n = n.parentNode;
    }
    result_txt.text = path;
    
    trace(path);
};

Last edited by Adrian; 04-23-2009 at 06:36 PM.
Adrian is offline   Reply With Quote
Old 04-23-2009, 10:08 AM   #3 (permalink)
Junior Member
 
Join Date: Mar 2009
Posts: 5
Default

Hi Adrian,

i tried your code but it wouldn't work. It will freeze Flash and after a couple of seconds i can stop the script so i can work again.
Any hints?
Thanks in advance
guze is offline   Reply With Quote
Old 04-23-2009, 06:37 PM   #4 (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

I've updated the code above. Sorry for the error.
Adrian is offline   Reply With Quote
Old 04-24-2009, 08:53 AM   #5 (permalink)
Junior Member
 
Join Date: Mar 2009
Posts: 5
Default

sweet! thanks alot Adrian!
One more thing, is there a way to show the tree in the top title, but adding every submenu, i.e.: my menu goes like: framework -> management -> methods > items. I want to show in the top title the path im going (clicking) down the menu. Is that possible?

many thanks in advance!
cheers
guze is offline   Reply With Quote
Old 04-24-2009, 09:46 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

I'm not sure the whole path will fit in the top title. But, if you want this addition, send me an email, and I'll reply with a quote.
Adrian 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 01:50 AM.