If I'm not wrong, menu objects are directly parented by the system
manager. You can verify this by trace()'ing menu.parent. You want to
use that parent object with localToGlobal().
Let me know if that works.
On 4/24/07, kkinaru <[EMAIL PROTECTED]> wrote:
> thanks Manish, your idea sounds well,
>
> [CODE]
> var container_bounds: Rectangle = this.getBounds(this);
> var menu_bounds: Rectangle = event.menu.getBounds(this);
>
> if (!container_bounds.containsRect(menu_bounds)){
> //MOVE UP SUBMENU
> }
> [/CODE]
>
> event.menu gives me the submenu, correct, but submenu's position does
> not seem to be relative to the container, but to the own submenu
> option. (getBounds op gives me a Rectangle in (0,0) upper-left and
> (100,100) bottom-right). localToGlobal did not seem to work either.
>
> How can complete this solution? How can take the correct container (or
> application)
>
> >
> > You can listen for the "menuShow" event on the root menu object. The
> > event object's menu property actually points to the submenu that's
> > being popped up, through which you can check its position and size and
> > make sure it's within the screen area (move it).
> >
> > On 4/23/07, kkinaru <[EMAIL PROTECTED]> wrote:
> > > Hello all.
> > >
> > > This time, I have a Button in the bottom of my flex application. This
> > > button shows a Menu (like the start button in windows). First menu is
> > > OK, but the last submenu is clipped, because it exceeds the bottom
> > > edge of my flex app.
> > >
> > > Does exist a way for controlling that stuff in my submenus?
> > >
> > >
> > > Thankyou very much in advance.
> > >
> > >
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> >
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>