PDA

View Full Version : Failing to use my movie clip in flex builder



devboy
May 13th, 2007, 01:07 PM
I'm creating a MovieClip in CS3 with a button component, expose the button to code with an instance name and export it as a swc file.
I then import that .swc into a flex project and display an instance of the movie clip. It throws this:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::LabelButton/fl.controls:LabelButton::draw()
at fl.controls::Button/fl.controls:Button::draw()
at fl.core::UIComponent/fl.core:UIComponent::callLaterDispatcher()

If I remove the button instance name from the MovieClip the error stops but then the movie clip just loops endlessly showing the button assets.

Anyone got any idea why?

devboy
May 13th, 2007, 04:29 PM
Let me rephrase.
Can anyone confirm success in creating a movie clip with a cs3 component embedded within it, exporting it to an external resource, then loading it in a different project and displaying?

snowboardfoo
August 29th, 2007, 09:54 PM
I am getting the similar error at runtime in Flash cs3....


TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/drawNow()
at fl.controls::ScrollBar/fl.controls:ScrollBar::draw()
at fl.controls::UIScrollBar/fl.controls:UIScrollBar::draw()
at fl.core::UIComponent/drawNow()
at fl.controls::TextArea/fl.controls:TextArea::updateScrollBars()
at fl.controls::TextArea/fl.controls:TextArea::drawLayout()
at fl.controls::TextArea/fl.controls:TextArea::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/drawNow()
at fl.controls::ScrollBar/fl.controls:ScrollBar::draw()
at fl.controls::UIScrollBar/fl.controls:UIScrollBar::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::LabelButton/fl.controls:LabelButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/drawNow()
at fl.controls::ScrollBar/fl.controls:ScrollBar::draw()
at fl.controls::UIScrollBar/fl.controls:UIScrollBar::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::LabelButton/fl.controls:LabelButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()

.... but no compile errors... I think this is something to do with after I added linkage to a button in my library and deleted some unused components, as I commented out the only code addition and it is still throwing the error.... quirky and annoying.

I am a n00b when it comes to AS3/CS3 ...it kind of seems like it is trying to draw components that aren't there? anyone got any idea why this is happening? I knew i shouldn't have started playing with the components..

snowboardfoo
August 29th, 2007, 09:59 PM
I am getting the similar error at runtime in Flash cs3....

:beer: well.. I seem to have eliminated the error pretty quickly by deleting the "component assets" folder in the library that I guess was added automatically by flash when I was messing around with some components, but not removed when I got rid of them.

I still have the text area component though, I guess that doesn't need any "assets" ... no clue really..