Well, SkinnableComponent will probably require a Skin. It is possible to use subclasses of UIComponent or SpriteVisualElement to do low-level Flash stuff.
It is also possible to create a single UIComponent that will reserve a bunch of screen space for you to add any combination of Sprites and Shapes that don't subclass Flex stuff. On 7/17/13 7:20 AM, "Kessler CTR Mark J" <[email protected]> wrote: >You may want to try SkinnableComponent as lowest point to easily inherit >from. > >-Mark > >-----Original Message----- >From: Dennis Raddle [mailto:[email protected]] >Sent: Wednesday, July 17, 2013 10:00 AM >To: users >Subject: mixing flex components and Sprites > >I have a vision for my educational software, in which part of the stage >will have buttons (maybe radio buttons and checkboxes) and part of the >screen will have animated Sprites or some kind of visual objects. How do I >write an mxml file that includes custom visual elements? Can they be >extensions of Sprite? In a little example program I wrote, I got an error >that said something about my object declaration was not assignable to >mx.core.IVisualElement. > >Here's what I wrote. The second to last line contains the declaration for >a >Sprite-based class. The error I got was > >- 'AnotherSprite' declaration must be contained within the Declarations >tag, since it is not assignable to the default property's element type >'mx.core.IVisualElement' > ><?xml version="1.0" encoding="utf-8"?> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:s="library://ns.adobe.com/flex/spark" > xmlns:exper="exper.*"> > <s:layout> > <s:VerticalLayout/> > </s:layout> > > <s:TextInput id="myTI" text="Enter text here"/> > <s:Label id="myText" text="{myTI.text.toUpperCase()}"/> > <exper:AnotherSprite/> ></s:Application>
