flash 游戏设计笔记:静止复制粘贴(不用TextArea)
2011-02-12 11:15
453 查看
private static function vBoxPane(_x:int,_y:int,_w : int, _h : int) : VBoxPane { var vboxPane : VBoxPane = new VBoxPane; SpriteUtil.setScrollPaneStyle(vboxPane); vboxPane.setStyle("upSkin", new Sprite); vboxPane.move(_x,_y); vboxPane.width = _w; vboxPane.height = _h; vboxPane.horizontalScrollPolicy="off"; vboxPane.paddingBottom=10; vboxPane.paddingTop=0; return vboxPane; }
public static function getTextField(_w:int):TextField{ var format : TextFormat = new TextFormat(); format.font = "宋体"; format.size = 12; format.color = 0xffffff; format.align = TextFormatAlign.LEFT; format.leading = 10; var contentText:TextField = new TextField(); contentText.setTextFormat(format); contentText.width =_w; contentText.multiline = true; contentText.wordWrap = true; contentText.height = 3000; // contentText.height = contentText.bottomScrollV * 16; contentText.selectable = false; return contentText; }
测试Main vboxPane = SpriteUtil.getScrollPane(17,160+37,390,80); this.addChild(vboxPane); contentText = SpriteUtil.getTextField(vboxPane.width-20); contentText.htmlText = desc; contentText.height = contentText.bottomScrollV * 16; vboxPane.addChild(contentText);
相关文章推荐
- flash 游戏设计笔记:禁止复制粘贴(用TextArea)
- flash 游戏设计笔记:textArea地scrollV
- flash游戏设计笔记:区块地图制作(一)
- flash 游戏设计笔记:删除对象
- 每天学习多一点flash(36) as2.0 游戏设计笔记
- 每天学习一点flash(33) as 3.0 游戏设计笔记(2)
- 每天学习多一点flash(36) as2.0 游戏设计笔记
- flash 游戏设计笔记:递归清除bitmapData
- 每天学习一点flash(33) as 3.0 游戏设计笔记(2)
- flash 游戏设计笔记:TextField确定一个坐标位置,坐标位置不动,文本是向上增长。
- flash 游戏设计笔记:bitmap.bitmapData.hitTest使用
- flash 游戏设计笔记:坚持几秒
- 每天学一点flash(34) as 3.0 游戏设计笔记(3)
- flash 游戏设计笔记:把一个按钮或者Sprite变灰(filters使用)
- flash 游戏设计笔记:人物行走一种做法
- flash 游戏设计笔记:坚持几秒
- 每天学习多一点flash(36) as2.0 游戏设计笔记
- Flash 游戏设计笔记: 制作炮台
- flash 游戏设计笔记:切割位图技术
- 每天学一点flash(34) as 3.0 游戏设计笔记(3)