作者:LAMP小白 点击:1972 发布日期:2012-10-15 23:38:00 返回列表
alpha 透明度
height 高度
width 宽度
rotation 对象旋转角度
scaleX 水平方向比例
scaleY 垂直方向比例
visible 表示对象是否可见
x 对象在舞台上的水平位置
y 对象在舞台上的垂直距离
z 对象在3D空间的深度
scaleZ 对象在3D空间内的比例
rotationX 对象在X轴上面的旋转角度
rotationY 对象在Y轴上面的旋转角度
rotationZ 对象在Z轴上面的旋转角度
package { import flash.display.MovieClip; import flash.events.MouseEvent; public class Main extends MovieClip { var startPage:StartPage; var leftPage:LeftPage; var rightPage:RightPage; public function Main() { startPage = new StartPage; leftPage = new LeftPage; rightPage = new RightPage; //init index page addChild(startPage); //add eventListener startPage.cloudButton.addEventListener(MouseEvent.CLICK, leftPageShow); startPage.seaButton.addEventListener(MouseEvent.CLICK, rightPageShow); leftPage.goMainLeft.addEventListener(MouseEvent.CLICK, startPageShowLeft); rightPage.goMainRight.addEventListener(MouseEvent.CLICK, startPageShowRight); //up down left right startPage.upBtn.addEventListener(MouseEvent.CLICK, mioUp); startPage.downBtn.addEventListener(MouseEvent.CLICK, mioDown); startPage.leftBtn.addEventListener(MouseEvent.CLICK, mioLeft); startPage.rightBtn.addEventListener(MouseEvent.CLICK, mioRight); //bigger smaller startPage.smallBtn.addEventListener(MouseEvent.CLICK, mioSmall); startPage.bigBtn.addEventListener(MouseEvent.CLICK, mioBig); //display and visibility startPage.displayBtn.addEventListener(MouseEvent.CLICK, mioDisplay); startPage.visibilityBtn.addEventListener(MouseEvent.CLICK, mioVisibility); } public function mioDisplay(event:MouseEvent):void { startPage.cat.visible = true; } public function mioVisibility(event:MouseEvent):void { startPage.cat.visible = false; } public function mioSmall(event:MouseEvent):void { startPage.cat.scaleX -= 0.1; startPage.cat.scaleY -= 0.1; } public function mioBig(event:MouseEvent):void { startPage.cat.scaleX += 0.1; startPage.cat.scaleY += 0.1; } public function mioLeft(event:MouseEvent):void { if(startPage.cat.x - 10 mio_gt;= 0){ startPage.cat.x -= 10; }else{ startPage.cat.x = 0; } } public function mioRight(event:MouseEvent):void { if(startPage.cat.x + 10 mio_lt;= 550){ startPage.cat.x += 10; }else{ startPage.cat.x = 550; } } public function mioUp(event:MouseEvent):void { if(startPage.cat.y - 10 mio_gt;= 0){ startPage.cat.y -= 10; }else{ startPage.cat.y = 0; } } public function mioDown(event:MouseEvent):void { if(startPage.cat.y + 10 mio_lt;= 400){ startPage.cat.y += 10; }else{ startPage.cat.y = 400; } } public function startPageShowLeft(event:MouseEvent):void { removeChild(leftPage); addChild(startPage); } public function startPageShowRight(event:MouseEvent):void { removeChild(rightPage); addChild(startPage); } public function leftPageShow(event:MouseEvent):void { removeChild(startPage); addChild(leftPage); } public function rightPageShow(event:MouseEvent):void { removeChild(startPage); addChild(rightPage); } } }
上一篇:PHP://input 获取输入流 下一篇:快递查询API