首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > flex >

flex案例四

2012-09-22 
flex案例4package com.deng{??? import flash.geom.Point??? ??? import mx.core.UIComponent??? ??? pu

flex案例4

package com.deng
{
??? import flash.geom.Point;
???
??? import mx.core.UIComponent;
???
??? public class LinkLine extends UIComponent
??? {
??? ???
??? ??? //线起点
??? ??? private var startPoint:Point;
??? ??? //线终点
??? ??? private var endPoint:Point;
??? ??? //线条颜色
??? ??? private var lineColor:uint=0x000000;
??? ???
??? ???
??? ??? public function LinkLine()
??? ??? {
??? ??? ??? super();
??? ??? }
??? ???
??? ??? public function drawLine(): void{
??? ??? ??? this.graphics.clear();
??? ??? ??? this.graphics.lineStyle(2,lineColor);
??? ??? ??? this.graphics.moveTo(startPoint.x,startPoint.y);
??? ??? ??? this.graphics.lineTo(endPoint.x,endPoint.y);
??? ??? ???
??? ??? }
??? ???
??? ??? public function setStartPoint(point:Point):void{
??? ??? ??? this.startPoint=point;
??? ??? }
??? ??? public function setEndPoint(point:Point):void{
??? ??? ??? this.endPoint=point;
??? ??? }
??? ???
??? }
}

热点排行