2 Replies Latest reply on Jan 8, 2010 12:16 PM by allanjard

    Add a Sprite (in AS3) to a Skin

    allanjard Level 1

      Hello all,

       

      Getting to grips with Skins at the moment in Gumbo, and enjoying the flexibility! I thought I would experiment with adding a drawn background (using AS3 code) to a SparkSkin MXML file. I've got the MXML setting up the display of a few regular components (rectangles etc), and would like to have a Sprite added so I can draw into it using AS3.

       

      So I've added an override for "createChildren" in a <fx:Script...> tag block, and that seems to run as required (adding a button for example works great). But I can't add a Sprite. I've tried creating a Group and adding the Sprite to the Group, but that also fails. Is there a way of doing this? I know I could use another class and create the sprite in that, but it seems like overkill to add another class for one little Sprite.

       

      Many thanks,

      Allan