課堂範例 – UNIQLO衣服選單

暑假在幫學生加強Flash ActionScript利用UNIQLO衣服做了這樣的案例,提供大家參考,因為是上課作品,所以程式部分沒有太完美。

//變數宣告
var ldr:Loader=new Loader
var path:URLRequest=new URLRequest

//開始載入外部圖片
path.url="ut1.jpg"
ldr.load(path)
clothes.addChild(ldr)
ldr.x=-285
ldr.y=-300
clothes.scaleX=0.5
clothes.scaleY=0.5

//衣服拖曳監聽與函數
clothes.addEventListener(MouseEvent.MOUSE_DOWN,downFn)
clothes.addEventListener(MouseEvent.MOUSE_UP,upFn)
function downFn(e:MouseEvent){
	clothes.startDrag(false)
}
function upFn(e:MouseEvent){
	clothes.stopDrag()
}

//滑桿滑動監聽與函數
stage.addEventListener(MouseEvent.MOUSE_MOVE,moveFn)
function moveFn(e:MouseEvent){
	clothes.scaleX=slider.value/100
	clothes.scaleY=slider.value/100
}

//下拉式選單監聽與函數
changeBtn.addEventListener(MouseEvent.CLICK,changeFn)
function changeFn(e:MouseEvent){
	path.url=menu.value
	ldr.load(path)
	clothes.addChild(ldr)
	ldr.x=-285
	ldr.y=-300
}

UNIQLO 衣服選單 原始檔 下載

註:本範例所使用的圖片版權屬於UNIQLO公司所有。

You may also like...

13,183 Responses

  1. bamnkayb表示:

    buy modafinil 100mg online modafinil 200mg pill

  2. Normannok表示:

    online pharmacy india cheap generic drugs from india reputable online pharmacies in india

  3. Rtjleh表示:

    purchase rhinocort – budesonide over the counter disulfiram without prescription

  4. njvtqzxn表示:

    modafinil cost order provigil pills

  5. kdgkluhn表示:

    modafinil 100mg pills provigil 100mg generic order provigil 200mg

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。