Hello FlexCoders!
I'm trying to make here pretty simple component which should involve
scale9Grid functionality.
I still don't feel professional in Flex UI components framework I might have
here something stupid, though i guess some of you should be able to help me.
What I am trying to make is resizable frame. Therefor I have created class
that extends UIComponent and I am creating 8 Sprite objects one for each
corner and one for each side and drawing graphics needed.
Concept seems to be alright, except that I am receiving this error, no
matter how I try:
ArgumentError: Error #2004: One of the parameters is invalid.
First of all I tried to set scale9Grid to whole component, then I even tried
to create container Sprite in which i placed all other Sprites and apply
scale9Grid to that object but still same.
Structure of my class is like this:
override protected function createChildren():void {
//create all Sprites, add subsprites to container Sprite, add container
Sprite to UIComponent display list
}
override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
// call function that draws graphics and set scale9Grid property
}
I guess at that point I am setting scale9Grid it already should be perfectly
fine, and component should be initialized.
Or am i missing something here?
Any help will be appreciated.
Janis