Hello everybody ! I am trying to customize my container with .... ..*drum rolls*.. a custom vertical scrollbar ! :D trying to change the width, the skins, placement of up/down buttons, etc..
this is my container: <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" verticalScrollBar="{new CustomVScrollBar()}"> .... in the CustomVScrollBar.as file I just extend a VScrollBar, nothing else: public class CustomVScroll extends VScrollBar { public function CustomVScroll() { super(); } } it does not work! I get these errors: vTypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.controls.scrollClasses::ScrollBar/setScrollProperties() at mx.core::Container/::createScrollbarsIfNeeded() at mx.core::Container/::createContentPaneAndScrollbarsIfNeeded() at mx.core::Container/validateDisplayList() at mx.managers::LayoutManager/::validateDisplayList() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() ---------------- I saw that in the container in "createChildren()" it has a reference to a private method called "createOrDestroyScrollbars(..)" that actually makes a "new VScrollBar()" instruction. ---------------- does anybody know the solution to this ? please help PS: my second problem is a minor one.. see this CSS file : VScrollBar { up-arrow-down-skin:Embed(source='assets/scrollSkins/upArrowSkin.png'); track-skin:Embed(source='assets/scrollSkins/trackSkin.png'); } the thumbSkin,upArrowSkin, downArrowSkin ALL appear with the standard width! EXCEPT for the trackSkin !!!! which is narrower than the other.. like it didn't scale corectly! what is wrong with that?