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

    a bug in AS3 combobox component

    Level 7
      Hi,
      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
      reference.
      at
      fl.containers::BaseScrollPane/fl.containers:BaseScrollPane::drawBackground()
      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
      URLRequest("C:\\Users\\eRez\\Documents\\AllOfMe\\Timeline019\\swf\\balloon.swf");
      var loader:Loader = new Loader();
      loader.load(ur);
      this.addChild(loader);

      there were no problems at all.

      does anybody have any idea where all of this comes from?
      thanks in advacne,
      eRez
      www.AllofMe.com


        • 1. Re: a bug in AS3 combobox component
          lukewarm74
          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.
            thanks,
            eRez

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