Loading ...
Sorry, an error occurred while loading the content.

2431Re: [ydn-flash] TabBar actual width

Expand Messages
  • Josh Tynjala
    Mar 8, 2012
    • 0 Attachment
      I think you can listen for a ComponentEvent.RESIZE event (or something very similar) on TabBar. After the listener is called, tabBar.width should be accurate.

      Alternatively, try calling tabBar.drawNow() to cause it to redraw immediately. After the call, check tabBar.width.

      - Josh

      On Thursday, March 8, 2012, martizhen <martizhen@...> wrote:
      > Hi, I'm new to as3 and I'm trying to figure out how to get the actual width of the TabBar object. TabButton width depends on the text content. My TabBar content changes dynamically so at some stage it overflows the container. I need to add a scroller when it happens but I need to know the current width of my tab menu. What I need is a xPosition from drawButtons method of TabBar.as. Is there any way of accessing that? Thanks in advance.
    • Show all 3 messages in this topic