2 Replies Latest reply on Aug 30, 2007 1:55 AM by Newsgroup_User

    a bug in AS3 combobox component

    Level 7
      i'm working in flash 9/AS 3, and added to one of my swf (which loads into
      the main one) a combo-box component. when its data provider property is
      empty, and i play the main swf - the combo box is there, empty of-course,
      and nothing happens when i click it. however, when i add data manually to
      the data provider property of the component (single item), and then play the
      main swf - the combo-box is still empty, and when clicked (doesn't matter
      where on the component), i get the following error:
      TypeError: Error #1009: Cannot access a property or method of a null object
      at fl.controls::List/fl.controls:List::draw()
      at fl.core::UIComponent/drawNow()
      at fl.controls::List/scrollToIndex()
      at fl.controls::SelectableList/scrollToSelected()
      at fl.controls::ComboBox/open()
      at fl.controls::ComboBox/fl.controls:ComboBox::onToggleListVisibility()

      and when clicked again, this error pops:
      ArgumentError: Error #2025: The supplied DisplayObject must be a child of
      the caller.
      at flash.display::DisplayObjectContainer/removeChild()
      at fl.controls::ComboBox/close()
      at fl.controls::ComboBox/fl.controls:ComboBox::onToggleListVisibility()

      when i tested the inner swf, there was no problem, and when i made another
      test, with an empty movie, containing only the following code:

      var ur:URLRequest = new
      var loader:Loader = new Loader();

      there were no problems at all.

      does anybody have any idea where all of this comes from?
      thanks in advacne,

        • 1. Re: a bug in AS3 combobox component
          That's weird, is it possible that the main movie has a combo box in its library conflicting with the loaded one?
          • 2. indeed
            Level 7
            my problem was that i had in my main movie's library a 'text input'
            component and a folder full of 'component assets' - once i removed the
            coponent and the folder, OR added the combo-box component (with all its
            sub-assets) the problem was solved.

            "Luke867" <webforumsuser@macromedia.com> wrote in message
            > That's weird, is it possible that the main movie has a combo box in its
            > library conflicting with the loaded one?