1 / 11

伺服器程式實務

伺服器程式實務. 499K0112 鄭凱中. 基本操作流程. 點擊 開始進入遊戲 進入等待畫面等待遊戲開始 在 5 秒點擊畫面正中的表情 累積點擊次數達到高分 最高分的前 10 名將會登入到排行榜. FLASH 程式碼. 開始畫面(影格 1) stop(); import flash.events.MouseEvent; import flash.utils.Timer; import flash.events.TimerEvent; import flash.text.TextField;

keegan
Download Presentation

伺服器程式實務

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 伺服器程式實務 499K0112 鄭凱中

  2. 基本操作流程 • 點擊 開始進入遊戲 • 進入等待畫面等待遊戲開始 • 在5秒點擊畫面正中的表情 累積點擊次數達到高分 • 最高分的前10名將會登入到排行榜

  3. FLASH程式碼 開始畫面(影格1) stop(); import flash.events.MouseEvent; import flash.utils.Timer; import flash.events.TimerEvent; import flash.text.TextField; playBtn.addEventListener(MouseEvent.CLICK,playclick); function playclick (e:MouseEvent) { gotoAndStop("COUNT_DOWN"); }

  4. FLASH程式碼 等待畫面(影格2) stop(); var time:int = 5; var gameTimer:Timer = new Timer(1000, 5); gameTimer.addEventListener(TimerEvent.TIMER_COMPLETE, endGame); function endGame(event:TimerEvent):void { gotoAndStop("CLICK_GAME"); } gameTimer.start();

  5. FLASH程式碼 點擊畫面(影格3-1) stop(); import flash.events.MouseEvent; import flash.events.TimerEvent; var counttime:int = 6; var gameTimer1:Timer = new Timer(1000, 6); var winNum : int = 0;

  6. FLASH程式碼 點擊畫面(影格3-2) gameTimer1.addEventListener(TimerEvent.TIMER_COMPLETE,endTime); function endTime(event:TimerEvent):void { gotoAndStop("END"); }

  7. FLASH程式碼 點擊畫面(影格3-3) gameTimer1.addEventListener(TimerEvent.TIMER,countTime); function countTime(event:TimerEvent):void { counttime = counttime -1; timeTxt.text = String(counttime); trace(counttime); }

  8. FLASH程式碼 點擊畫面(影格3-4) btn_clk.addEventListener(MouseEvent.CLICK,btnf); function btnf(event:MouseEvent) { winNum++; hitTxt.text = String(winNum); } gameTimer1.start();

  9. FLASH程式碼 排名畫面(影格4) 本影格程式碼運用原本CatchGame的程式碼后稍做修改 新增 stop(); 刪除 Mouse.show();

  10. bugGame.php var $userName = "root"; var $password = "111"; var $hostName = "localHost";

  11. DataBase DataBase的部份使用的是原本的資料庫。

More Related