全屏观看地址:
视频1地址
视频2地址
视频3地址
源文件及 PPT 下载:
http://www.fs2you.com/files/76b3bea8-41d3-11dd-ba6f-001143e7b41c/
代码发布(数字版):
Card.as:
package {
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.filters.*;
import flash.events.MouseEvent;
public class Card extends Sprite {
public var id:int;
public var W:Number = 30;
public var H:Number = 40;
public var i:int;
public var j:int;
public var TargetCard:Card;
private var color:uint = 0xcccccc;
public var Path:Array = new Array();
private var pressed:Boolean = false;
public var line:Sprite = new Sprite();
public function Card(id:int) {
this.id = id;
init();
}
function init():void {
graphics.beginFill(color);
graphics.drawRect(0,0,W,H);
graphics.endFill();
var Text:TextField = new TextField();
Text.text = String(id);
Text.selectable = false;
Text.autoSize = "left";
var tf:TextFormat = new TextFormat(null,25);
// tf.size = 25;
Text.setTextFormat(tf);
addChild(Text);
addEventListener(MouseEvent.MOUSE_OVER, MouseOver);
addEventListener(MouseEvent.MOUSE_OUT, MouseOut);
}
function setIndex(a:int, b:int):void {
i = a;
j = b;
}
function Pressed():void {
pressed = true;
}
function UnPressed():void {
p