I am trying to create a simple sprite that I can draw to during instantiation 
but I keep getting error after error and here is one of the most common one:

<error>
Multiple markers at this line:
-SkinnableContainer
-Could not resolve <s:Sprite> to a component implementation.
</error>

All I want to do is create a sprite with one color which then will listen to 
different events during the life of the application and then display a color 
that reflects the event dispatched.

Here is some code:

        <fx:Script>
                <![CDATA[
                        private const spr1:Sprite = new Sprite();
                        private const spr2:Sprite = new Sprite();
                         
                        private function init():void {
                                
                                spr1.graphics.beginFill(0xFF0000, 0.5);
                                spr1.graphics.drawRect(10, 10, 100, 80);
                                spr1.graphics.endFill();
                                dom.addChild(spr1);
                                 
                                spr2.graphics.beginFill(0x0000FF, 0.3);
                                spr2.graphics.drawRect(20, 20, 80, 100);
                                spr2.graphics.endFill();
                                dom.addChild(spr2);
                        }
                ]]>
        </fx:Script>
        <s:Sprite x="33" y="38" width="200" height="200" id="dom">
        </s:Sprite>

Now if I change the Sprite to a Button it works as expected and it does because 
the Button subclasses spark.components so if that is the only way to get around 
it what would be the spark.component that would give me the freedom I want?

TIA

Reply via email to