快速业务通道

AS3代码创建FLASH文本编辑器

作者 佚名技术 来源 服务器技术 浏览 发布时间 2012-07-07
():void {
my_btn_font.x = 230;
my_btn_font.y = 22;
for (var i:uint = 0; i < my_Arr_font.length; i++) {
//trace(my_Arr_font.fontName)
my_btn_font.addItem({label:my_Arr_font.fontName});
}
my_btn_font.textField.setStyle("textFormat", linkTextFormat);
my_btn_font.dropdown.setRendererStyle("textFormat", linkTextFormat);
my_btn_font.width = 115;
my_btn_font.addEventListener(Event.CHANGE,_setTextFormatNext);
}
//显示居左按钮
private function _showBtn_left():void {
my_btn_left.x = 355;
my_btn_left.y = 25;
my_btn_left.addEventListener(MouseEvent.ROLL_OVER, changeNext);
my_btn_left.addEventListener(MouseEvent.ROLL_OUT, changeCurrent);
my_btn_left.addEventListener(MouseEvent.CLICK, _setTextFormat);
}
//显示居中按钮
private function _showBtn_middle():void {
my_btn_middle.x = 380;
my_btn_middle.y = 25;
my_btn_middle.addEventListener(MouseEvent.ROLL_OVER, changeNext);
my_btn_middle.addEventListener(MouseEvent.ROLL_OUT, changeCurrent);
my_btn_middle.addEventListener(MouseEvent.CLICK, _setTextFormat);
}
//显示居右按钮
private function _showBtn_right():void {
my_btn_right.x = 405;
my_btn_right.y = 25;
my_btn_right.addEventListener(MouseEvent.ROLL_OVER, changeNext);
my_btn_right.addEventListener(MouseEvent.ROLL_OUT, changeCurrent);
my_btn_right.addEventListener(MouseEvent.CLICK, _setTextFormat);
}
//显示下划线按钮
private function _showBtn_xiahuaxian():void {
my_btn_xiahuaxian.x = 430;
my_btn_xiahuaxian.y = 25;
my_btn_xiahuaxian.addEventListener(MouseEvent.ROLL_OVER, changeNext);
my_btn_xiahuaxian.addEventListener(MouseEvent.ROLL_OUT, changeCurrent);
my_btn_xiahuaxian.addEventListener(MouseEvent.CLICK, _setTextFormat);
}
//显示超链接按钮
private function _showBtn_url():void {
my_btn_url.x = 455;
my_btn_url.y = 25;
my_btn_url.addEventListener(MouseEvent.ROLL_OVER, changeNext);
my_btn_url.addEventListener(MouseEvent.ROLL_OUT, changeCurrent);
my_btn_url.addEventListener(MouseEvent.CLICK, _setTextFormat);
}
//显示插入图片按钮
private function _showBtn_pic():void {
my_btn_pic.x = 170;
my_btn_pic.y = 25;
my_btn_pic.addEventListener(MouseEvent.ROLL_OVER, changeNext);
my_btn_pic.addEventListener(MouseEvent.ROLL_OUT, changeCurrent);
my_btn_pic.addEventListener(MouseEvent.CLICK, _setTextFormat);
}
//设置样式(A)
private function _setTextFormat(e:MouseEvent):void {
switch (e.currentTarget) {
case my_btn_bold :
_TextFormat_bold();
break;
case my_btn_itlic :
_TextFormat_italic();
break;
case my_btn_left :
_TextFormat_auto_left();
break;
case my_btn_middle :
_TextFormat_auto_middle();
break;
case my_btn_right :
_TextFormat_auto_right();
break;
case my_btn_xiahuaxian :
_TextFormat_xiahuaxian();
break;
case my_btn_url :
my_btn_url_shuru.x = 200;
my_btn_url_shuru.y = 130;
my_btn_url_shuru.ok.addEventListener(MouseEvent.CLICK, _TextFormat_url);
my_btn_url_shuru.cancel.addEventListener(MouseEvent.CLICK, _TextFormat_Clearurl);
my_btn_url_shuru.addEventListener(MouseEvent.MOUSE_DOWN, startDrags);
my_btn_url_shuru.addEventListener(MouseEvent.MOUSE_UP, stopDrags);
my_Sprite.ad

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号