Jason, I use mx:Image all the time to load JPG's, GIF's, and PNG's. Have been using it for a year now. I use it for loading both at compile time and at runtime. Works great.
I think perhaps you are misinterpreting that section of the documentation a little. It's contrasting images with Flex apps, not "static images" with "dynamic images". HTH -Jim -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, January 10, 2007 1:47 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Some AS3 components troubles Try mx.controls.SWFLloader (or in MXML, <mx:SWFLoader> ) instead of mx.controls.image. My understanding of image (at least in a Flex context) is that it's only for static images, not dynamic images. Swfloader can do .swfs, .jpegs,.pngs, etc. Not sure if that is it, but that's what my experience has been. Also, the help docs on mx.controls.image say: "Flex also includes the SWFLoader control for loading Flex applications. You typically use the Image control for loading static graphic files and SWF files, and use the SWFLoader control for loading Flex applications. The Image control is also designed to be used in custom item renderers and item editors. " Jason Merrill Bank of America Learning & Organizational Effectiveness >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf Of Janis >>Radins >>Sent: Wednesday, January 10, 2007 12:37 PM >>To: [email protected] >>Subject: [Flashcoders] Some AS3 components troubles >> >>Hey people! >> >>I'm trying to make some pretty simple UI component in Flex and it >>seems like I'm missing something. >>I think I've read everything I could but I cannt find what is it I'm >>missing, maybe someone on this list knows wheres the problem. >>So what I am doing is: >>1. I create some pretty simple MXML project just for test with this >>content <?xml version="1.0" encoding="utf-8"?> <mx:Application >>xmlns:mx="http://www.adobe.com/2006/mxml" >>xmlns:myComp="components.*" layout="absolute"> >> <myComp:TestComponent></myComp:TestComponent> >></mx:Application> >> >>Pretty simple. >>xmlns:myComp="components.*" defines that components can be found in >>folder named components in root of project, where I have this file >>TestComponent.aswith following content package components { >> import mx.core.UIComponent; >> import mx.controls.Image; >> import flash.display.Shape; >> public class TestComponent extends UIComponent { >> private var imageInstance:Image = null; >> public function TestComponent() { >> super(); >> imageInstance = new Image(); >> imageInstance.source = "icon.gif"; >> addChild(imageInstance); >> trace("TestComponent initialized!"); >> var shape:Shape = new Shape(); >> shape.graphics.beginFill(0xFF0000); >> shape.graphics.drawCircle(50,50,25); >> addChild(shape); >> } >> } >>} >> >>"icon.gif" is bitmap stored in root folder of project. >>Seems like pretty stright forward and theres nothing to break, but it >>isnt so. Shape appears, which make me think that component instance is >>initialized and placed in display list. >>But I really have bad luck with creating mx.controls.Image i think I >>tried everything with no luck. >>There must be something I'm missing, but I have no idea what is it :) >> >>Oh, and when I tried to extend some component directly it works, seems >>like thers no blank components for me! >>Any help will be apreciated! >> >>Jānis >> _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

