1
即時嘗試製作圖片庫。as3:如何禁用事件監聽器
容器類,增加了縮略圖如下...
for (i=0; i < xmlLength; i++)
{
thumbnail[i] = new Image(relPath + "/images/" + imageList[i], imageTitle[i], stage);
thumbnail[i].addEventListener(MouseEvent.CLICK, shiftStack);
thumbnail[i].addEventListener(MouseEvent.MOUSE_OVER, trackIt);
thumbnail[i].name = "image_" + i;
thumbnail[i].buttonMode = true;
thumbnail[i].useHandCursor = true;
if (i != xmlLength - 1){
thumbnail[i].rotation = (Math.random() * rot) - 8;
}
galleryContainer.addChild(thumbnail[i]);
}
從圖像類,我如何禁用事件偵聽器(MouseEvent.CLICK,shiftStack)內。我希望能夠在Image類中添加一個全屏按鈕,但是每當它被點擊時,你所知道的shiftStack方法也會被調用。
哈哈... ... shitStack HTTP://www.youtube.com/watch V = CJQU22Ttpwc – mheavers 2011-03-14 16:10:00
@ mheavers ..... ssssshhhh! :P – 2011-03-14 16:53:08