-
Notifications
You must be signed in to change notification settings - Fork 0
/
coke.html
110 lines (90 loc) · 3.99 KB
/
coke.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/easeljs-0.7.0.min.js"></script>
<script type="text/javascript" src="js/preloadjs-0.4.0.min.js"></script>
<script type="text/javascript" src="js/soundjs-0.5.0.min.js"></script>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/project.js"></script>
<script type="text/javascript" src="js/cQuestion/Const.js"></script>
<script type="text/javascript" src="js/cQuestion/Question.js"></script>
<script type="text/javascript" src="js/cQuestion/QuestionManager.js"></script>
<script type="text/javascript" src="js/cQuestion/AessetsManager.js"></script>
<script type="text/javascript" src="js/cQuestion/QuestionRenderBase.js"></script>
<script type="text/javascript" src="js/cQuestion/MosaicGame.js"></script>
<script type="text/javascript" src="js/cQuestion/SoundManager.js"></script>
<!-- 以下是测试用的 -->
<script type="text/javascript" src="js/createjs/AbstractLoader.js"></script>
<script type="text/javascript" src="js/createjs/LoadQueue.js"></script>
<script type="text/javascript" src="js/createjs/TagLoader.js"></script>
<script type="text/javascript" src="js/createjs/XHRLoader.js"></script>
<script type="text/javascript" src="js/createjs/Sound.js"></script>
<script type="text/javascript" src="js/version.js"></script>
<title>coke</title>
</head>
<script>
var questionManager;
var initThis = function(){
cQuestion.AM.init();
cQuestion.AM.loader.on("complete",function(e){
initManager();
cQuestion.AM.loader.off("progress",prgressHandler);
var s = cQuestion.SM.play("bgSound");
trace(s.playState);
},null,true);
cQuestion.AM.loader.on("error",function(e){
alert("加载失败:" + e.item.src + "可能要在服务器环境下测试。。。")
});
cQuestion.AM.loader.on("progress",prgressHandler);
function prgressHandler(e){
var pre = (e.progress/e.total);
$("#progree").attr("value",pre);
}
}
var initManager = function(){
questionManager = new cQuestion.QustionManager($("#question"));
var questions = cQuestion.AM.getQuestions();
questionManager.setQuestions(questions) ;
questionManager.start();
questionManager.on("complete",function(e){
$("#question").html("完成了");
$("#time").hide();
updateScore();
});
questionManager.on("tick",function(e){
updateTime();
});
questionManager.on("questionChange",function(){
updateTime();
updateScore();
});
questionManager.on("rest",function(){
$("#question").html("休息时间");
updateTime();
updateScore();
});
//
updateTime();
function updateScore(){
$("#totalScore").html(questionManager.totalScore);
}
function updateTime(){
$("#time").html(questionManager.currentTime);
}
}
</script>
<body onload="initThis();">
加载进度222bbbbdddddssssvvvddhhhhhhh
sdfsdfsdf
<progress id="progree"></progress>
<div id="box">点我点我在</div>
剩余时间:<div id="time"></div>
总分:<div id="totalScore"></div>
<div id="loginInfoPanel">
</div>
<div id="question" >
</div>
</body>
</html>