ADOBE/ ActionScript

액션스크립트 sprite, MovieClip 등등 을 BitmapData 로 바꾸기

AlrepondTech 2014. 1. 8. 14:54
반응형

 

 

 

 

 

=================================

=================================

=================================

 

 

 

 

 

 

 

출처: http://202psj.tistory.com/639 //여기

 

var bd:MovieClip  = new MovieClip(); //sprite 도 된다.

var bitmapD:BitmapData = new BitmapData(bd.width, bd.height);

bitmapD.draw(bd);

 

 

 

 

=================================

=================================

=================================

 

 

 

출처: http://stackoverflow.com/questions/12074618/convert-drawn-lines-into-bitmapdata-bitmap-draw-sprite-graphics-wont-wor

 

Only use graphics when drawing. The actual Sprite object contains what you want, so following your convention, simply do:

BitmapData.draw(Sprite);

Although for a literal example:

var mySprite:Sprite = new Sprite(); // add lines etc using mySprite.graphics  var myBitmapData:BitmapData = new BitmapData(mySprite.width, mySprite.height); myBitmapData.draw(mySprite);

 

 

 

 

 

=================================

=================================

=================================

 

 

반응형