MenuNavigation and MenuItemsController problem

0 views
Skip to first unread message

peper

unread,
Feb 12, 2007, 7:35:39 AM2/12/07
to Gugga Flash Framework
Hi.
I'm Peter and this is my first post on that list.
I'm using gugga famework and I think it's really great work.

I've got a problem with MenuNavigation.
Is it possible to use MenuNavigation without SectionsController ? I
want to use it for switching thumbnails and showing employees
description on the page. The code is simple:

In a for loop:

var mc:MovieClip =
this.thumbnailsContainer.attachMovie("TeamThumbnail","TeamThumbnail"+i,this.thumbnailsContainer.getNextHighestDepth());
this.thumbnailsContainer.addSubItem(NavigationButton(mc),"TeamThumbnail"+i);

where thumbnailsContainer ia a gugga.navigation.MenuNavigation, and
thumbnails are NavigationButtons
and after that items are invisible.

Without the "..addSubitem.." line thumbnails are visible.

I tried to make:

this.thumbnailsContainer.show();

but nothing happens;
this.thumbnailsContainer.visible is true and
this.thumbnailsContainer.getItem() shows that everything is ok, but i
can't see any item.

I've got two other menus working on that page, but every time I use
"setNavigationInstance" for SectionsController. Is it necessary ? Or
maybe problem is somhere else ?

peper

unread,
Feb 12, 2007, 8:13:08 AM2/12/07
to Gugga Flash Framework
OK, I've made it work
I found in source that I should use this.thumbnailsContainer.start()
not this.thumbnailsContainer.show() ,and I found out that in this case
I have to select items "manually" which means

this.thumbnailsContainer.selectSubItem(ev.id);

in "navigate(ev)" handler

Thanks for great work once again.

If I can have a suggestion. It should be helpful if You write in docs
f.e. in gugga.navigation.MenuItemsController something like "use
rather MenuNavigation or extend this class". Also events should be
useful in docs.

Todor Kolev

unread,
Feb 12, 2007, 4:08:19 PM2/12/07
to gug...@googlegroups.com
Hello Peter,

Thank you for appreciating our work on GuggaFF.

You found it right - the navigation should be started to make it visible and working. We design it to be mainly used with SectionController and they are somehow coupled if you want everything to work without additional code. This is because when we need something to be switchable/navigable we make a structure of SectionControllers and Sections for it. Please note that you can override some methods in SectionController, like openSection() and make it work with your fictive sections, and not gugga.application.Section.

If you don't want to make fictive sections you should listen for the "navigate" event of the MenuNavigation and then call one of the select methods to select the item you want. These two are separated because in a more complicated case, like the one with the cancelable commands in GuggaFF, you can reject to select an menu item regardless of that it was clicked.

Greetings,
Todor

peper

unread,
Feb 13, 2007, 10:48:52 AM2/13/07
to Gugga Flash Framework
The idea with overriding openSection in section controller is a great
idea. I'll try it next time.

I've got another quesion about navigaion.
I've got my own accordion component. I'd like to make it work as
MenuNavigation. Where should I start? Should I extend MenuNavigation
or better MenuItemsController ? Or maybe I should make something like
tree or dropdnown (menu->submenu) ?? Where would You recommend to
start?
To be clear.
I've got all the opnenig/closing animation stuff and want to make it
work with sections controller.

By the way, where can I find some gugga.navigation.TreeNavigation
examples?

Todor Kolev

unread,
Feb 13, 2007, 11:18:46 AM2/13/07
to gug...@googlegroups.com
If you want to make your own accordion navigation the bast way is to implement gugga.navigation.INavigation. All INavigation-s can be registered in the SectionsController.

The gugga.navigation.TreeNavigation is still not finished and it's better to use something else.
Reply all
Reply to author
Forward
0 new messages