It works absolutely fine for me! Using the html string you have below in a bare bones mxml project. Anything else you should mention?
-----Original Message----- From: flexcoders@yahoogroups.com on behalf of langdonjared Sent: Sun 30/11/2008 16:10 To: flexcoders@yahoogroups.com Subject: [flexcoders] AIR - Including an Image in mx:html using htmlText How does one reference files like images when using an mx:html tag and the htmlText property? Here's the basic idea: private var strHtmlText:XML = <html> <head> <title>Test</title> </head> <body> <img width="100px" height="100px" alt="image" src="foo.jpg" /> </body> </html> ... <mx:HTML width="800" height="800" htmlText="{strHtmlText.toString()}" /> This doesn't work. The image doesn't appear but the alt text does. I tried playing with the value in the src attribute of the image object in the html string to no avail. I tried app:foo.jpg, app:/foo.jpg, app://foo.jpg, and /foo.jpg. I event tried @Embed(source='foo.jpg'). I have copies of foo.jpg in the project root, the src directory, and in bin-debug. Nothing works. I feel a bit silly posting this because it must be obvious, but I've searched and searched for the answer with no luck. Thanks. ______________________________________________________________________ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. ______________________________________________________________________
<<winmail.dat>>