You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik Lundgren <er...@lndgrn.se> on 2012/04/07 15:53:09 UTC
FXGImage
Hi Jeffry!
Saw your commit of the FXGImage!
Just out of curiosity (and checking my own understanding of FXG), when should I use the FXGImage?
In Flex 4 ...
If I have an FXG-asset I can add it to a MXML-file just by using its name as a tag.
Eg:
<s:Group><loacal:MyFXG></s:Group>
The compiler transforms it into a SpriteVisualElement I believe.
In ActionScript I can create a new FXG instance as a SpriteVisualElement.
var myGroup:Group; var myFXG:SpriteVisualElement;
myFXG = new MyFXG;
myGroup.addElement( myFXG );
SpriteVisualElement inherits from FlexSprite, but implements IVisualElement – giving us access to properties like: x, y, postLayoutTransform ... etc.
Did you create FXGImage because you needed stuff from UIComponent not implemented in SpriteVisualElement? Is FXGImage aimed at FLEX 3?
Just checking.
Keep up good work.
/Erik
Re: FXGImage
Posted by Jeffry Houser <je...@dot-com-it.com>.
On 4/7/2012 9:53 AM, Erik Lundgren wrote:
> Hi Jeffry!
>
> Saw your commit of the FXGImage!
> Just out of curiosity (and checking my own understanding of FXG), when should I use the FXGImage?
I really built it as a helper class. I did know it was usable
directly in MXML, but it's been a while since I've tried that. I do not
remember what limitations I Ran into with that approach. I didn't know
it was turned into a SpriteVisualElement. I had no idea you could just
create an FXG asset directly in ActionScript as a SpriteVisualElement.
If it always worked like that; I completely missed it.
In theory the same class I provided could be used to encapsulate
library elements from a Flash Pro SWF; but I haven't tested that approach.
The extra properties I have on the class (xOffset, yOffset,
heightIncrement, and widthIncrement) actually exist because of problems
I had with Flash Pro animations showing up in the wrong locations on
different DPIs in mobile applications. This was a quick way to tweak
the positioning.
--
Jeffry Houser
Technical Entrepreneur
203-379-0773
--
http://www.flextras.com?c=104
UI Flex Components: Tested! Supported! Ready!
--
http://www.theflexshow.com
http://www.jeffryhouser.com
http://www.asktheflexpert.com
--
Part of the DotComIt Brain Trust