[haXe] attachBitmap

Krzysztof Rozalski lists at krzysztof-rozalski.com
Tue Feb 13 08:57:17 CET 2007


Hi,
Try this way:

var bdTemp:flash.display.BitmapData = BitmapData.loadBitmap( "someBitmap" );
var mcTemp:flash.MovieClip = flash.Lib.current.createEmptyMovieClip("m", 1);
mcTemp.attachBitmap(bdTemp, 1);

Cheers,
Krzysztof Rozalski
> I have a lib.swf containing bitmaps with linkage names all setup. I'm 
> trying to use attachBitmap on a mc but seems like I'm doing things the 
> wrong way.
>
> This is what I did:
>
> var bdTemp:flash.display.BitmapData = Reflect.field(flash.Lib.current, 
> "someBitmap");
> var mcTemp:flash.MovieClip = 
> flash.Lib.current.createEmptyMovieClip("m", 1);
> m.attachBitmap(bdTemp, 1);
>
> this shows nothing.. but can compile. this is in flash8 btw. help, 
> please?
>
> thanks,
> Guntur N. Sarwohadi





More information about the Haxe mailing list