flashWord文档下载推荐.docx

上传人:b****2 文档编号:15279694 上传时间:2022-10-29 格式:DOCX 页数:10 大小:16.80KB
下载 相关 举报
flashWord文档下载推荐.docx_第1页
第1页 / 共10页
flashWord文档下载推荐.docx_第2页
第2页 / 共10页
flashWord文档下载推荐.docx_第3页
第3页 / 共10页
flashWord文档下载推荐.docx_第4页
第4页 / 共10页
flashWord文档下载推荐.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

flashWord文档下载推荐.docx

《flashWord文档下载推荐.docx》由会员分享,可在线阅读,更多相关《flashWord文档下载推荐.docx(10页珍藏版)》请在冰豆网上搜索。

flashWord文档下载推荐.docx

sample.txt"

));

functiontextLoaded(e:

Event):

void

{

vartxt:

String=URLLoader(e.target).dataasString;

t.text=txt;

tf.color=0x336633;

tf.font="

Arial"

;

tf.size=14;

t.setTextFormat(tf);

}

varformatClip:

Formatter=newFormatter();

varshowFormat:

Boolean=true;

stage.addEventListener(KeyboardEvent.KEY_DOWN,showFormatter);

functionshowFormatter(e:

KeyboardEvent):

if(e.keyCode==70)

{

if(showFormat)

{

addChild(formatClip);

formatClip.x=t.width;

formatClip.addEventListener(MouseEvent.MOUSE_DOWN,drag);

showFormat=false;

}

else

formatClip.removeEventListener(MouseEvent.MOUSE_DOWN,drag);

removeChild(formatClip);

showFormat=true;

}

functiondrag(e:

formatClip.startDrag();

formatClip.addEventListener(MouseEvent.MOUSE_UP,noDrag);

functionnoDrag(e:

formatClip.stopDrag();

formatClip.fontList.addEventListener(Event.CHANGE,setFont);

formatClip.fontSizer.addEventListener(Event.CHANGE,setFontSize);

formatClip.colorPicker.addEventListener(Event.CHANGE,setColor);

formatClip.columnNum.addEventListener(Event.CHANGE,setColumns);

functionsetFont(e:

tf.font=e.target.selectedItem.label;

functionsetFontSize(e:

tf.size=e.target.value;

functionsetColor(e:

tf.color=e.target.selectedColor;

functionsetColumns(e:

t.columnCount=e.target.value;

varscroller:

UIScrollBar=newUIScrollBar();

scroller.move(t.x+t.width,t.y);

scroller.height=t.height;

scroller.scrollTarget=t;

addChild(scroller);

scroller.visible=false;

formatClip.addEventListener(MouseEvent.CLICK,setScrollbar);

functionsetScrollbar(e:

if(t.textHeight>

scroller.height)

scroller.visible=true;

else

{

scroller.visible=false;

t.scrollV=1;

圆的的类

Ellipse.as

package{

importflash.display.MovieClip;

publicclassEllipseextendsMovieClip{

publicfunctionEllipse(w:

Number=40,h:

Number=40,color:

Number=0xff0000){

graphics.beginFill(color);

graphics.drawEllipse(0,0,w,h);

graphics.endFill();

矩形的类

Rect.as

importflash.display.MovieClip;

publicclassRectextendsMovieClip{

publicfunctionRect(w:

Number=40,h:

Number=40,color:

Number=0x0000ff){

graphics.beginFill(color);

graphics.drawRect(0,0,w,h);

graphics.endFill();

//constructorcode

画图

paint

importflash.events.KeyboardEvent;

importflash.events.MouseEvent;

varcolor:

Number;

varshapeType:

String;

stage.addEventListener(MouseEvent.MOUSE_DOWN,startDrawing);

stage.addEventListener(MouseEvent.MOUSE_UP,stopDrawing);

stage.addEventListener(KeyboardEvent.KEY_DOWN,keyHandler);

functionkeyHandler(e:

KeyboardEvent):

void{

if(e.keyCode=="

E"

.charCodeAt()){

shapeType="

ellipse"

elseif(e.keyCode=="

R"

rectangle"

functionstartDrawing(e:

MouseEvent):

stage.addEventListener(MouseEvent.MOUSE_MOVE,makeShapes);

color=Math.random()*0xffffff;

functionstopDrawing(e:

stage.removeEventListener(MouseEvent.MOUSE_MOVE,makeShapes);

functionmakeShapes(e:

if(shapeType=="

){

varellipse:

Ellipse=newEllipse(10,10,color);

addChild(ellipse);

ellipse.x=mouseX;

ellipse.y=mouseY;

elseif(shapeType=="

varrectangle:

Rect=newRect(3,15,color);

addChild(rectangle);

rectangle.x=mouseX;

rectangle.y=mouseY;

图片

gallery

thumbs_mc.btn1.addEventListener(MouseEvent.CLICK,ldr1);

thumbs_mc.btn2.addEventListener(MouseEvent.CLICK,ldr2);

thumbs_mc.btn3.addEventListener(MouseEvent.CLICK,ldr3);

thumbs_mc.btn4.addEventListener(MouseEvent.CLICK,ldr4);

thumbs_mc.btn5.addEventListener(MouseEvent.CLICK,ldr5);

thumbs_mc.btn6.addEventListener(MouseEvent.CLICK,ldr6);

thumbs_mc.btn7.addEventListener(MouseEvent.CLICK,ldr7);

thumbs_mc.btn8.addEventListener(MouseEvent.CLICK,ldr8);

functionldr1(e:

Event){

ldr.source="

Picture/a.jpg"

textLoad("

Txt/a.txt"

0xFFE59A);

functionldr2(e:

Picture/b.jpg"

Txt/b.txt"

0xFFD0A8);

functionldr3(e:

Picture/c.jpg"

Txt/c.txt"

0xE6D6D5);

functionldr4(e:

Picture/d.jpg"

Txt/d.txt"

0xBAB883);

functionldr5(e:

E

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 图表模板

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1