--- In [email protected], "Merrill, Jason" 
<[EMAIL PROTECTED]> wrote:
>
> >>You can draw those graphics in a UIComponent so I would 
> >>have grouphandle subclass UIComponent and not Sprite.
> 
> Thanks Alex, I tried that, but still no joy, AND the graphics don't 
render now either for some strange reason.  All I did is change my 
previously posted code to:  public class GroupHandle extends 
UIComponent (and I also imported UIComponent of course).  Here is the 
class, still not showing the image.  Thanks for any further help  you 
can provide:
> 
> package com.venice.view.network.groupingTool 
> {
>       import mx.controls.Image;
>       import mx.core.UIComponent;
>       
>       public class GroupHandle extends UIComponent
>       {               
>               public const FILL_COLOR:uint = 0xffffff;
>               public const FILL_ALPHA:Number = .5;
>               public const STROKE_COLOR:uint = 0x000000;
>               public const STROKE_THICKNESS:Number = 1;
>               public const STROKE_ALPHA:Number = 1.0;
>               public const SIZE:Number = 10;
>               
>               [Embed(source 
= "/media/icons/control_repeat_blue.png")]
>               private var _moveGroupImage:Class;
>               
>               public function GroupHandle():void
>               {
>                       graphics.clear();
>                       graphics.lineStyle(STROKE_THICKNESS, 
STROKE_COLOR, STROKE_ALPHA);
>                       graphics.beginFill(FILL_COLOR, FILL_ALPHA);
>                       graphics.drawRect(-(SIZE/2), -(SIZE/2), 
SIZE/2, SIZE/2);
>                       graphics.endFill();
>                       
>                       var icon:Image = new Image();
>                       icon.source = _moveGroupImage;
>                       icon.setActualSize(100, 100)
>                       addChild(icon);
>               }       
>       }
> }

Have you tried overriding the addChildren() method?  Possibly it 
might make sense to do the addChild in commitProperties and the 
layout in updateDisplayList.

Just a thought;

Amy

Reply via email to