flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Raddle <dennis.rad...@gmail.com>
Subject Re: mixing flex components and Sprites
Date Wed, 17 Jul 2013 16:57:44 GMT
Okay I'm trying to figure out how to write code that would let me add
Sprite-based objects to a Flex framework. Looking at the bigger picture, I
don't know if this is right way to go. My larger goal is to mix buttons and
layouts and things that Flex provides, with animation of graphics. But
anyway, here is my first attempt to code something. I'm stuck in the
function addStuff(). Let's say that I create a class called AddSprites that
does the work of adding Sprites and animating them. I'm going to need to
pass the UIComponent into its constructor. How do I do that?

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

      import exper AddSprites;
      private var e:AddSprites;
      public function addStuff():void {
        .... ???? problem is next line ...
        e = new AddSprites(..UIComponent?..);



  <s:Button click="addStuff()" />

  <mx:UIComponent id="uic"/>

On Wed, Jul 17, 2013 at 9:22 AM, Alex Harui <aharui@adobe.com> wrote:

> 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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message