Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
package net.pixvi.myr.view.touchline
|
||||
{
|
||||
import com.greensock.TweenMax;
|
||||
import com.greensock.easing.Back;
|
||||
import flash.geom.Point;
|
||||
import net.pixvi.common.view.FF;
|
||||
import net.pixvi.common.view.ImgLine;
|
||||
import net.pixvi.pfw.display.PiSprite;
|
||||
|
||||
public class TouchLine extends PiSprite
|
||||
{
|
||||
|
||||
public var ui:TouchLineUI;
|
||||
|
||||
public var line:ImgLine;
|
||||
|
||||
public var startPoint:Point;
|
||||
|
||||
public function TouchLine()
|
||||
{
|
||||
super();
|
||||
this.mouseChildren = this.mouseEnabled = false;
|
||||
ui = new TouchLineUI(FF.getMC("ui.TouchLine"));
|
||||
ui.img_p2.stop();
|
||||
line = new ImgLine(ui.img_line);
|
||||
addChild(line);
|
||||
addChild(ui);
|
||||
}
|
||||
|
||||
public function set(x1:Number, y1:Number, x2:Number, y2:Number) : void
|
||||
{
|
||||
line.setByPoint(x2 - x1,y2 - y1);
|
||||
line.x = x1;
|
||||
line.y = y1;
|
||||
ui.img_p1.x = x1;
|
||||
ui.img_p1.y = y1;
|
||||
ui.img_p2.x = x2;
|
||||
ui.img_p2.y = y2;
|
||||
}
|
||||
|
||||
public function start() : void
|
||||
{
|
||||
TweenMax.fromTo(ui.img_p1,0.6,{
|
||||
"scaleX":0.1,
|
||||
"scaleY":0.1
|
||||
},{
|
||||
"scaleX":1,
|
||||
"scaleY":1,
|
||||
"ease":Back.easeOut
|
||||
});
|
||||
}
|
||||
|
||||
public function lightRed() : void
|
||||
{
|
||||
ui.img_p2.gotoAndStop(2);
|
||||
TweenMax.to(ui.img_p2,0.5,{
|
||||
"scaleX":0.7,
|
||||
"scaleY":0.7
|
||||
});
|
||||
}
|
||||
|
||||
public function lightBlue() : void
|
||||
{
|
||||
ui.img_p2.gotoAndStop(1);
|
||||
TweenMax.to(ui.img_p2,0.5,{
|
||||
"scaleX":1,
|
||||
"scaleY":1
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package net.pixvi.myr.view.touchline
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.MovieClip;
|
||||
import flash.display.Sprite;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
|
||||
public class TouchLineUI extends UIComponent
|
||||
{
|
||||
|
||||
public var img_p1:Sprite;
|
||||
|
||||
public var img_p2:MovieClip;
|
||||
|
||||
public var img_line:Sprite;
|
||||
|
||||
public function TouchLineUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user