FD纯AS项目知识汇总
发布时间:2020-12-15 06:55:30 所属栏目:百科 来源:网络整理
导读:?设定文件尺寸 [SWF(width = 600,height = 300)] 直接嵌入图片 标签图片应该放在变量声明中 代码放在变量声明,就是类声明后,构造函数前 [Embed(source = "../ori.png")]private var Pori:Class; 注意 1 [Embed(source = "../ori.png")]后面没有分号,不要
?设定文件尺寸[SWF(width = 600,height = 300)] 直接嵌入图片标签图片应该放在变量声明中 [Embed(source = "../ori.png")] private var Pori:Class; 注意 1 [Embed(source = "../ori.png")]后面没有分号,不要加分号 private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE,init); // entry point var img:Bitmap = new Pori(); this.addChild(img); } Flash项目调库图片: var bmd:BitmapData = new img(60,60); var bm:Bitmap = new Bitmap(bmd); ???addChild(bm);
参考:http://bbs.9ria.com/thread-7843-1-1.html ?设置官方组件字体大小var txt:TextFormat = new TextFormat(); txt.size = 18; StyleManager.setStyle("textFormat",txt);
|