我在舞台上添加了一个图形,我需要从动作脚本中访问它,知道怎么做吗?
You need to convert your graphic to a MovieClip:
You can then access the MovieClip from ActionScript.
Edit:
To convert the graphic to a BitmapData, just use the draw
function:
var bmpData:BitmapData = new BitmapData(yourMc.width, yourMc.height);
bmpData.draw(yourMc);
var bmp:Bitmap = new Bitmap(bmpData);
addChild(bmp);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.