close
Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
Free Bestselling eBooks

It's easy: sign up in under 10 seconds, tell us what kind of eBooks you love & we'll email you a list of deals every day - FREE! Join now!
From our sponsors
flash小遊戲簡單問題
Apr 17th 2014, 02:34

// 請利用Flash 動畫範本中的”布朗運動”, 複製killbugexam的元件庫中
// 基本要求:1. 將布朗運動的particle物件置換成蒼蠅
// 2. 遊戲隨機加入10隻蒼蠅並以亂數決定蒼蠅的位置
// 3. 動態加入拍子
// 4. 玩家可用滑鼠移動拍子拍打蒼蠅, 每打到一隻, 就將剩下蒼蠅數減1
// 加分題: 遊戲可以隨機加入蒼蠅或蚊子
// 如果10隻蟲子都打中時, 則顯示過關畫面
//完成後請將fla 檔email至 cshih1872@gmail.com 並於主旨註明姓名及學號
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
function mybug2(me:MouseEvent)
var mybug2:Array=new Array();
var scale=1;

for(i=0;i<10;i++){
mybug2[i]=new bug2();
mybug2[i].x=Math.random()*(500-10+1)+10;//math.random()*(b-a+1)+A回傳
mybug2[i].y=Math.random()*(635-100+1)+100;
scale=(Math.random()*(10-1+1)+1)/10;
mybug2[i].scaleX=scale;
mybug2[i].scaleY=scale;

stage.addChild(bug2[i]);
}

var killer_mc:killer=new killer();
var getscore=10;

stage.addChild(killer_mc);

stage.addEventListener(MouseEvent.CLICK,removehorse);
function removehorse(me:MouseEvent){
for(i=0;i<10;i++){

if(bug2[i].hitTestPoint(me.stageX,me.stageY,true)==true){
stage.removeChild(bug2[i]);//由舞台移除掉horse1的物件
getbug_txt--;
bug_txt.text=getbug_txt;
killer_mc.alpha +=0.1;
}
}
}
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragstar);
function dragstar(me:MouseEvent){
killer_mc.x = mouseX;
killer_mc.y = mouseY;
Mouse.hide();
}

stop();

可以幫我檢查一下那裡有誤嗎
他依直說我未定義函數...

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 kahntoue 的頭像
    kahntoue

    farm heroes saga手機版, farm heroes saga外掛無限道具, farm heroes saga 99攻略, farm heroes saga 157攻略, farm heroes saga 33, farm heroes saga 手機, farm heroes saga下載

    kahntoue 發表在 痞客邦 留言(0) 人氣()