В списке рассылки появилась информация о недокументированном пока теге SwfMill - bitmap и в частности о применении его для внедрения растровых изображений в swf как для Flash9, так и для haXe.
Человек, которого зовут Krzysztof Różalski (не возьмусь транслировать это на русский) нашёл её в рассылке по SWFMill.
Ниже приводится рабочий пример, который он использовал с swfmill 0.2.12:
It is important that both "name" and "id" attributes of swfmill bitmap tag are the same - otherwise it won't work in flash9. If "id" is not defined then no bitmap is compiled into swfmill output. On the other hand if "id" is different than "name" there is exception :
ReferenceError: Error #1065: Variable MyBitmapData_linkage is not defined.
MyBitmapData overwrites constructor to simplify creation - no arguments needed because width and height is already defined by imported file.jpg width and height ( in my case the last trace is "Test.hx:25 : BitmapData : 88 / 31" which is correct )
Hope someone will find this useful
P.S. To make it work with Adobe Flash CS3 generated swfs just change MyBitmapData to extern class ( remove class body ) and add width and height on instance creation ( e.g. bitmapData = new MyBitmapData(0,0); ). This is probably forced by fact that MyBitmapData class compiled by CS3 is not overwritten by haXe compiled one - anybody knows is it possible to force that?