Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: fatmatekin/fastclick
base: master
...
head fork: Crowdpark/fastclick
compare: dev-francis
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 197 files changed
  • 0 commit comments
  • 3 contributors
Showing with 8,364 additions and 506 deletions.
  1. +1 −0  .gitignore
  2. +3 −0  .gitmodules
  3. +0 −18 .settings/com.powerflasher.fdt.core.prefs
  4. +0 −3  .settings/org.eclipse.core.resources.prefs
  5. 0  { → application/as3}/.project
  6. +2 −2 { → application/as3}/.settings/com.powerflasher.fdt.classpath
  7. +9 −0 application/as3/.settings/com.powerflasher.fdt.core.prefs
  8. +2 −2 { → application/as3}/.settings/launch/FastClick.launch
  9. BIN  application/as3/bin/FastClick.swf
  10. 0  { → application/as3}/bin/data/Config.json
  11. +40 −0 application/as3/build/bootstrap.php
  12. 0  application/as3/build/build.num
  13. +28 −0 application/as3/build/build.properties
  14. +145 −0 application/as3/build/build.xml
  15. +14 −0 application/as3/build/phpunit.xml
  16. 0  { → application/as3}/lib/as3-utils.swc
  17. 0  { → application/as3}/lib/as3corelib.swc
  18. 0  { → application/as3}/lib/flexunit-4.0.0.swc
  19. 0  { → application/as3}/lib/flexunit-aircilistener-4.0.0.swc
  20. 0  { → application/as3}/lib/flexunit-cilistener-4.0.0.swc
  21. 0  { → application/as3}/lib/flexunit-flexcoverlistener-4.0.0.swc
  22. 0  { → application/as3}/lib/flexunit-uilistener-4.0.0.swc
  23. 0  { → application/as3}/lib/greensock.swc
  24. 0  { → application/as3}/lib/hamcrest-as3-1.1.0.swc
  25. 0  { → application/as3}/lib/robotlegs-framework-v1.5.2.swc
  26. 0  { → application/as3}/src/FastClick.as
  27. 0  { → application/as3}/src/assets/pf_ronda_seven.ttf
  28. 0  { → application/as3}/src/com/bit101/charts/BarChart.as
  29. 0  { → application/as3}/src/com/bit101/charts/Chart.as
  30. 0  { → application/as3}/src/com/bit101/charts/LineChart.as
  31. 0  { → application/as3}/src/com/bit101/charts/PieChart.as
  32. 0  { → application/as3}/src/com/bit101/components/Accordion.as
  33. 0  { → application/as3}/src/com/bit101/components/Calendar.as
  34. 0  { → application/as3}/src/com/bit101/components/CheckBox.as
  35. 0  { → application/as3}/src/com/bit101/components/ColorChooser.as
  36. 0  { → application/as3}/src/com/bit101/components/ComboBox.as
  37. 0  { → application/as3}/src/com/bit101/components/Component.as
  38. 0  { → application/as3}/src/com/bit101/components/FPSMeter.as
  39. 0  { → application/as3}/src/com/bit101/components/HBox.as
  40. 0  { → application/as3}/src/com/bit101/components/HRangeSlider.as
  41. 0  { → application/as3}/src/com/bit101/components/HScrollBar.as
  42. 0  { → application/as3}/src/com/bit101/components/HSlider.as
  43. 0  { → application/as3}/src/com/bit101/components/HUISlider.as
  44. 0  { → application/as3}/src/com/bit101/components/IndicatorLight.as
  45. 0  { → application/as3}/src/com/bit101/components/InputText.as
  46. 0  { → application/as3}/src/com/bit101/components/Knob.as
  47. 0  { → application/as3}/src/com/bit101/components/Label.as
  48. 0  { → application/as3}/src/com/bit101/components/List.as
  49. 0  { → application/as3}/src/com/bit101/components/ListItem.as
  50. 0  { → application/as3}/src/com/bit101/components/Meter.as
  51. 0  { → application/as3}/src/com/bit101/components/NumericStepper.as
  52. 0  { → application/as3}/src/com/bit101/components/Panel.as
  53. 0  { → application/as3}/src/com/bit101/components/ProgressBar.as
  54. 0  { → application/as3}/src/com/bit101/components/PushButton.as
  55. 0  { → application/as3}/src/com/bit101/components/RadioButton.as
  56. 0  { → application/as3}/src/com/bit101/components/RangeSlider.as
  57. 0  { → application/as3}/src/com/bit101/components/RotarySelector.as
  58. 0  { → application/as3}/src/com/bit101/components/ScrollBar.as
  59. 0  { → application/as3}/src/com/bit101/components/ScrollPane.as
  60. 0  { → application/as3}/src/com/bit101/components/Slider.as
  61. 0  { → application/as3}/src/com/bit101/components/Style.as
  62. 0  { → application/as3}/src/com/bit101/components/Text.as
  63. 0  { → application/as3}/src/com/bit101/components/TextArea.as
  64. 0  { → application/as3}/src/com/bit101/components/UISlider.as
  65. 0  { → application/as3}/src/com/bit101/components/VBox.as
  66. 0  { → application/as3}/src/com/bit101/components/VRangeSlider.as
  67. 0  { → application/as3}/src/com/bit101/components/VScrollBar.as
  68. 0  { → application/as3}/src/com/bit101/components/VSlider.as
  69. 0  { → application/as3}/src/com/bit101/components/VUISlider.as
  70. 0  { → application/as3}/src/com/bit101/components/WheelMenu.as
  71. 0  { → application/as3}/src/com/bit101/components/Window.as
  72. 0  { → application/as3}/src/com/bit101/utils/MinimalConfigurator.as
  73. 0  { → application/as3}/src/com/crowdpark/base/BaseDataEvent.as
  74. 0  { → application/as3}/src/com/crowdpark/base/BaseVO.as
  75. +0 −1  { → application/as3}/src/com/crowdpark/fastclick/mvcs/FastClickContext.as
  76. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/assets/FastClickBall.as
  77. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/assets/ScoreBox.as
  78. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/assets/ball/BaseGraphic.as
  79. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/assets/ball/BlueBall.as
  80. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/assets/ball/RedBall.as
  81. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/commands/CountDownCommand.as
  82. +3 −1 { → application/as3}/src/com/crowdpark/fastclick/mvcs/commands/FinishGameCommand.as
  83. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/commands/SetPlayerCommand.as
  84. +13 −3 { → application/as3}/src/com/crowdpark/fastclick/mvcs/commands/StartGameCommand.as
  85. +39 −0 application/as3/src/com/crowdpark/fastclick/mvcs/commands/StartUpCompleteCommand.as
  86. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/commands/UpdateTimeCommand.as
  87. +36 −0 application/as3/src/com/crowdpark/fastclick/mvcs/commands/retryGameCommand.as
  88. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/commands/updateScoreCommand.as
  89. +4 −0 { → application/as3}/src/com/crowdpark/fastclick/mvcs/core/base/BaseEvent.as
  90. +46 −0 application/as3/src/com/crowdpark/fastclick/mvcs/core/base/BaseView.as
  91. +1 −1  ...dpark/fastclick/mvcs/models/vo → application/as3/src/com/crowdpark/fastclick/mvcs/core/base}/BaseVo.as
  92. +5 −6 { → application/as3}/src/com/crowdpark/fastclick/mvcs/core/statemachine/StateMachineEvents.as
  93. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/core/statemachine/StateMachineMediator.as
  94. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/core/statemachine/StateMachineModel.as
  95. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/core/statemachine/StateMachineState.as
  96. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/events/GameEvents.as
  97. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/events/LeaderboardEvent.as
  98. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/events/PointClickEvent.as
  99. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/interfaces/InterfaceBall.as
  100. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/interfaces/InterfaceConfigService.as
  101. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/interfaces/InterfaceVO.as
  102. +15 −0 application/as3/src/com/crowdpark/fastclick/mvcs/interfaces/InterfaceView.as
  103. +3 −3 { → application/as3}/src/com/crowdpark/fastclick/mvcs/models/ConfigModel.as
  104. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/models/HighestScoreModel.as
  105. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/models/PlayerModel.as
  106. +1 −0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/models/vo/BallVo.as
  107. +1 −15 { → application/as3}/src/com/crowdpark/fastclick/mvcs/models/vo/PlayerVo.as
  108. +28 −0 application/as3/src/com/crowdpark/fastclick/mvcs/services/BackendService.as
  109. +0 −3  { → application/as3}/src/com/crowdpark/fastclick/mvcs/services/ConfigService.as
  110. +2 −1  { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/countrdown/CountDownView.as
  111. +1 −7 { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/countrdown/CountDownViewMeditor.as
  112. +57 −0 application/as3/src/com/crowdpark/fastclick/mvcs/views/footer/FooterView.as
  113. +1 −14 { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/footer/FooterViewMediator.as
  114. +7 −7 { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/game/GameView.as
  115. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/game/GameViewMediator.as
  116. +119 −0 application/as3/src/com/crowdpark/fastclick/mvcs/views/hud/HudView.as
  117. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/hud/HudViewEvent.as
  118. +62 −0 application/as3/src/com/crowdpark/fastclick/mvcs/views/hud/HudViewMediator.as
  119. +6 −5 { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/leaderboard/LeaderboardView.as
  120. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/leaderboard/LeaderboardViewMediator.as
  121. +11 −0 application/as3/src/com/crowdpark/fastclick/mvcs/views/points/PointsView.as
  122. +4 −4 { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/points/PointsViewMediator.as
  123. +12 −13 { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/result/ResultView.as
  124. 0  { → application/as3}/src/com/crowdpark/fastclick/mvcs/views/result/ResultViewMediator.as
  125. +131 −0 application/as3/src/com/crowdpark/fastclick/mvcs/views/start/StartView.as
  126. +45 −0 application/as3/src/com/crowdpark/fastclick/mvcs/views/start/StartViewMediator.as
  127. 0  { → application/as3}/src/com/crowdpark/interfaces/InterfaceVO.as
  128. 0  { → application/as3}/src/com/crowdpark/net/rpc/json/InterfaceJsonRpcClient.as
  129. 0  { → application/as3}/src/com/crowdpark/net/rpc/json/JsonRpcClient.as
  130. 0  { → application/as3}/src/com/crowdpark/net/rpc/json/JsonRpcClientEvent.as
  131. +32 −0 application/coffeescript/app.coffee
  132. +90 −0 application/coffeescript/app.controller.app.coffee
  133. +84 −0 application/coffeescript/app.model.member.coffee
  134. +26 −0 application/coffeescript/app.view.layout.coffee
  135. +54 −0 application/less/app.less
  136. +50 −0 application/php/Application/ApplicationBootstrap.php
  137. +68 −0 application/php/Application/ApplicationContext.php
  138. +179 −0 application/php/Application/Config/config.php
  139. +25 −0 application/php/Application/Dto/FbBasicDto.php
  140. +22 −0 application/php/Application/JsonRpc/V1/App/Auth.php
  141. +19 −0 application/php/Application/JsonRpc/V1/App/Gateway.php
  142. +11 −0 application/php/Application/JsonRpc/V1/App/Request.php
  143. +11 −0 application/php/Application/JsonRpc/V1/App/Response.php
  144. +16 −0 application/php/Application/JsonRpc/V1/App/Server.php
  145. +35 −0 application/php/Application/JsonRpc/V1/App/Service/User.php
  146. 0  application/php/Application/Task/.keep
  147. 0  application/php/Application/Tests/.keep
  148. +76 −0 application/php/Application/Tests/AuthTest.php
  149. +30 −0 application/sql/initschema.sql
  150. BIN  bin/FastClick.swf
  151. +12 −0 bin/speedy.php
  152. +35 −0 bin/worker.sh
  153. +18 −0 htdocs/api/v1/app/index.php
  154. +28 −0 htdocs/assets.php
  155. +1,158 −0 htdocs/assets/contrib/backbone/backbone.js
  156. +113 −0 htdocs/assets/contrib/bootstrap/bootstrap-alerts.js
  157. +62 −0 htdocs/assets/contrib/bootstrap/bootstrap-buttons.js
  158. +55 −0 htdocs/assets/contrib/bootstrap/bootstrap-dropdown.js
  159. +260 −0 htdocs/assets/contrib/bootstrap/bootstrap-modal.js
  160. +90 −0 htdocs/assets/contrib/bootstrap/bootstrap-popover.js
  161. +107 −0 htdocs/assets/contrib/bootstrap/bootstrap-scrollspy.js
  162. +80 −0 htdocs/assets/contrib/bootstrap/bootstrap-tabs.js
  163. +321 −0 htdocs/assets/contrib/bootstrap/bootstrap-twipsy.js
  164. +356 −0 htdocs/assets/contrib/bootstrap/bootstrap.min.css
  165. +4 −0 htdocs/assets/contrib/jquery/jquery-1.7rc1.min.js
  166. +275 −0 htdocs/assets/contrib/jquery/jquery.sensible.datetime.js
  167. +10 −0 htdocs/assets/contrib/jquery/jquery.tmpl.min.js
  168. +11 −0 htdocs/assets/contrib/jquery/jquery.tmplPlus.min.js
  169. +480 −0 htdocs/assets/contrib/json2/json2.js
  170. +117 −0 htdocs/assets/contrib/quirksmode/browser-detect.js
  171. +30 −0 htdocs/assets/contrib/underscore/underscore.min.js
  172. +38 −0 htdocs/assets/css/app.css
  173. +357 −0 htdocs/assets/css/application-20c875ea8a2304d59b1fb2aad2ba24e7.css
  174. +1 −0  htdocs/assets/css/latest-css.bundle
  175. BIN  htdocs/assets/img/default_avatar.png
  176. +82 −0 htdocs/assets/js/app.controller.app.js
  177. +34 −0 htdocs/assets/js/app.js
  178. +59 −0 htdocs/assets/js/app.model.member.js
  179. +2,034 −0 htdocs/assets/js/application-7a845c20107513410b9cb81b12f75eea.js
  180. +3 −0  htdocs/assets/js/latest-js.bundle
  181. +27 −0 htdocs/assets/tmpl/social_shizzle.html
  182. +108 −0 htdocs/index.php
  183. +161 −0 htdocs/lib/build.php
  184. +112 −0 htdocs/lib/clean.php
  185. +1 −0  library/Processus
  186. BIN  src/com/.DS_Store
  187. BIN  src/com/bit101/.DS_Store
  188. +0 −25 src/com/crowdpark/fastclick/mvcs/commands/StartUpCompleteCommand.as
  189. +0 −17 src/com/crowdpark/fastclick/mvcs/commands/retryGameCommand.as
  190. +0 −27 src/com/crowdpark/fastclick/mvcs/views/footer/FooterView.as
  191. +0 −70 src/com/crowdpark/fastclick/mvcs/views/hud/HudView.as
  192. +0 −100 src/com/crowdpark/fastclick/mvcs/views/hud/HudViewMediator.as
  193. +0 −11 src/com/crowdpark/fastclick/mvcs/views/points/PointsView.as
  194. +0 −87 src/com/crowdpark/fastclick/mvcs/views/start/StartView.as
  195. +0 −60 src/com/crowdpark/fastclick/mvcs/views/start/StartViewMediator.as
  196. BIN  src/com/crowdpark/net/.DS_Store
  197. BIN  src/com/crowdpark/net/rpc/.DS_Store
View
1  .gitignore
@@ -0,0 +1 @@
+*.DS*
View
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "library/Processus"]
+ path = library/Processus
+ url = git://github.com/Crowdpark/processus.git
View
18 .settings/com.powerflasher.fdt.core.prefs
@@ -1,18 +0,0 @@
-#Tue Jun 05 10:09:03 CEST 2012
-AnesChanged=0
-com.powerflasher.fdt.core.CompatiblePlayers=External_SWF_Viewer\:Browser\:Standalone_Flash_Player
-com.powerflasher.fdt.core.CompilerArguments=-static-link-runtime-shared-libraries\=true\n-target-player\={playerVersion}\n-library-path+\="{flexSDK}/frameworks/locale/en_US"\n-default-size\=550,400
-com.powerflasher.fdt.core.DefaultOutputFolder=bin
-com.powerflasher.fdt.core.DefaultPlayer=External_SWF_Viewer
-com.powerflasher.fdt.core.Language=AS3
-com.powerflasher.fdt.core.PassClasspath=true
-com.powerflasher.fdt.core.PassExterns=false
-com.powerflasher.fdt.core.PassMainclass=true
-com.powerflasher.fdt.core.PassRsls=false
-com.powerflasher.fdt.core.PassSwcs=true
-com.powerflasher.fdt.core.PlatformType=WEB
-com.powerflasher.fdt.core.PlayerVersion=11.1
-com.powerflasher.fdt.core.ProjectTypeHint=Web
-com.powerflasher.fdt.core.Runtime=Flash_Player
-com.powerflasher.fdt.core.SdkName=Flex 4.6.0
-eclipse.preferences.version=1
View
3  .settings/org.eclipse.core.resources.prefs
@@ -1,3 +0,0 @@
-#Tue May 22 17:22:11 CEST 2012
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
View
0  .project → application/as3/.project
File renamed without changes
View
4 .settings/com.powerflasher.fdt.classpath → ...tion/as3/.settings/com.powerflasher.fdt.classpath
@@ -8,8 +8,6 @@
<AS3Classpath generateProblems="false" sdkBased="true" type="lib" useAsSharedCode="false">frameworks/libs/authoringsupport.swc</AS3Classpath>
<AS3Classpath generateProblems="false" sdkBased="true" type="lib" useAsSharedCode="false">frameworks/libs/core.swc</AS3Classpath>
<AS3Classpath generateProblems="true" sdkBased="false" type="source" useAsSharedCode="false">src</AS3Classpath>
- <AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/robotlegs-framework-v1.5.2.swc</AS3Classpath>
- <AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/greensock.swc</AS3Classpath>
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/as3-utils.swc</AS3Classpath>
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/as3corelib.swc</AS3Classpath>
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/flexunit-4.0.0.swc</AS3Classpath>
@@ -17,5 +15,7 @@
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/flexunit-cilistener-4.0.0.swc</AS3Classpath>
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/flexunit-flexcoverlistener-4.0.0.swc</AS3Classpath>
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/flexunit-uilistener-4.0.0.swc</AS3Classpath>
+ <AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/greensock.swc</AS3Classpath>
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/hamcrest-as3-1.1.0.swc</AS3Classpath>
+ <AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">lib/robotlegs-framework-v1.5.2.swc</AS3Classpath>
</AS3Classpath>
View
9 application/as3/.settings/com.powerflasher.fdt.core.prefs
@@ -0,0 +1,9 @@
+#Fri Jun 08 15:33:06 CEST 2012
+AnesChanged=0
+com.powerflasher.fdt.core.Language=AS3
+com.powerflasher.fdt.core.PlatformType=WEB
+com.powerflasher.fdt.core.PlayerVersion=11.1
+com.powerflasher.fdt.core.ProjectTypeHint=Web
+com.powerflasher.fdt.core.Runtime=Flash_Player
+com.powerflasher.fdt.core.SdkName=Flex 4.6.0
+eclipse.preferences.version=1
View
4 .settings/launch/FastClick.launch → application/as3/.settings/launch/FastClick.launch
@@ -5,14 +5,14 @@
<booleanAttribute key="KILL_PREVIOUS_VIEWER" value="true"/>
<stringAttribute key="LAUNCHER_DEPENDENCIES" value="[Self]"/>
<stringAttribute key="MAIN_CLASS" value="src/FastClick.as"/>
-<stringAttribute key="OUTPUT" value="bin/FastClick.swf"/>
+<stringAttribute key="OUTPUT" value="FastClick.swf"/>
<booleanAttribute key="PASS_CP" value="true"/>
<booleanAttribute key="PASS_MAIN_CLASS" value="true"/>
<booleanAttribute key="PASS_RSLS" value="false"/>
<booleanAttribute key="PASS_SWCS" value="true"/>
<stringAttribute key="PROJECT_NAME" value="FastClick"/>
<booleanAttribute key="START_SWF_ENABLED" value="true"/>
-<stringAttribute key="START_SWF_LOCATION" value="bin/FastClick.swf"/>
+<stringAttribute key="START_SWF_LOCATION" value="FastClick.swf"/>
<stringAttribute key="START_SWF_WITH" value="External SWF Viewer"/>
<booleanAttribute key="USE_PROJECT_COMPILER_ARGUMENTS" value="true"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
View
BIN  application/as3/bin/FastClick.swf
Binary file not shown
View
0  bin/data/Config.json → application/as3/bin/data/Config.json
File renamed without changes
View
40 application/as3/build/bootstrap.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Created by JetBrains PhpStorm.
+ * User: francis
+ * Date: 12/20/11
+ * Time: 3:55 PM
+ * To change this template use File | Settings | File Templates.
+ */
+
+print_r("=== Init Bootstrap ===" . PHP_EOL);
+
+$processusCorePath = dirname(__FILE__) . "/../core/";
+
+print_r("=== After define paths ===" . PHP_EOL);
+
+//############################################################################################
+// Processus Dependecies
+//############################################################################################
+
+print_r("=== Includes ===" . PHP_EOL);
+
+include_once($processusCorePath . 'Interfaces/InterfaceBootstrap.php');
+include_once($processusCorePath . 'Interfaces/InterfaceApplicationContext.php');
+include_once($processusCorePath . 'ProcessusBootstrap.php');
+include_once($processusCorePath . 'ProcessusContext.php');
+
+print_r("=== Before require ApplicationBootstrap ===" . PHP_EOL);
+
+print_r("=== After require ApplicationBootstrap ===" . PHP_EOL);
+
+$processusBootstrap = new \Processus\ProcessusBootstrap();
+$processusBootstrap->init();
+
+print_r("=== After init ApplicationBootstrap ===" . PHP_EOL);
+
+//############################################################################################
+// Processus Dependecies
+//############################################################################################
+
+?>
View
0  application/as3/build/build.num
No changes.
View
28 application/as3/build/build.properties
@@ -0,0 +1,28 @@
+#-----------------------------------------------------------
+# App
+#-----------------------------------------------------------
+app.basedir = .
+app.script.folder = bin/scripts
+app.skeleton.root = build/example/project/
+
+#-----------------------------------------------------------
+# Database
+#-----------------------------------------------------------
+db.sql.folder = application/sql/
+db.mysql.host = localhost
+db.mysql.userid = root
+db.mysql.password = root
+
+#-----------------------------------------------------------
+# phpunit properties
+#-----------------------------------------------------------
+phpUnit.log.dir = logs/build
+phpUnit.class.folder = application/php/Test/
+phpUnit.config = build/phpunit.xml
+phpUnit.enabled = true
+phpUnit.memory_limit = 512M
+
+#-----------------------------------------------------------
+# build
+#-----------------------------------------------------------
+build.mode.interactive = true
View
145 application/as3/build/build.xml
@@ -0,0 +1,145 @@
+<project name="project" default="build" basedir="..">
+
+
+ <!--
+ #################################################################
+ Properties Targets
+ #################################################################
+ -->
+ <property file="build/build.properties" description="Base Properties"/>
+ <!--
+ #################################################################
+ Properties Targets
+ #################################################################
+ -->
+
+ <!--
+ #################################################################
+ Setup Targets
+ #################################################################
+ -->
+
+ <!--
+ #################################################################
+ Setup Targets
+ #################################################################
+ -->
+
+ <!--
+ #################################################################
+ Major Targets
+ #################################################################
+ -->
+
+ <!--
+ #################################################################
+ Major Targets
+ #################################################################
+ -->
+ <target name="build" depends="clean, prepare">
+
+ </target>
+ <target name="completeTest">
+
+ </target>
+ <target name="phpUnitApplication" depends="clean, prepare">
+ <echo message="--- Starting Build ---"/>
+ <echo message="loading -> ${phpUnit.config}"/>
+ <echo message="execute -> phpunit --verbose --configuration ${phpUnit.config} ${phpUnit.class.folder}" />
+ <exec command="phpunit --verbose --configuration ${phpUnit.config} ${phpUnit.class.folder}"
+ dir="."
+ logoutput="true"
+ checkreturn="true">
+ </exec>
+ <echo message="--- End Build ---"/>
+ </target>
+ <target name="phpUnitProcessus" depends="clean, prepare">
+ <echo message="--- Starting Build ---"/>
+ <echo message="loading -> ${phpUnit.config}"/>
+ <echo message="execute -> phpunit --verbose --configuration ${phpUnit.config} ${phpUnit.class.folder}" />
+ <exec command="phpunit --verbose --configuration ${phpUnit.config} ${phpUnit.class.folder}"
+ dir="."
+ logoutput="true"
+ checkreturn="true">
+ </exec>
+ <echo message="--- End Build ---"/>
+ </target>
+ <!--
+ #################################################################
+ Test Targets
+ #################################################################
+ -->
+ <target name="testCreateBet">
+
+ </target>
+
+ <target name="testAcceptBet">
+
+ </target>
+
+ <target name="testCancelBet">
+
+ </target>
+ <!--
+ #################################################################
+ Test Targets
+ #################################################################
+ -->
+
+ <!--
+ #################################################################
+ Sub Targets
+ #################################################################
+ -->
+ <target name="clean">
+ <echo message="--- Starting Clean ---"/>
+ <delete dir="${app.basedir}/logs/"/>
+ <echo message="Delete logs dir"/>
+ <!--<exec command="php -f ${app.script.folder}/blowJob.php" checkreturn="true"/>-->
+ <echo message="blowJobed the enviroment" />
+ <echo message="--- End Clean ---"/>
+ </target>
+
+ <target name="prepare">
+ <echo message="--- Starting Prepare ---"/>
+ <mkdir dir="${app.basedir}/logs/build"/>
+ <touch file="${app.basedir}/logs/build/.keep"/>
+ <mkdir dir="${app.basedir}/logs/application/debug"/>
+ <mkdir dir="${app.basedir}/logs/application/error"/>
+ <mkdir dir="${app.basedir}/logs/application/profiling"/>
+ <echo message="--- End Prepare ---"/>
+ </target>
+ <target name="permissions" depends="clean, prepare">
+ <echo message="--- Setting Permission ---"/>
+ <chmod file="logs/build/" mode="0777" verbose="true"/>
+ <chmod file="logs/application/debug/" mode="0777" verbose="true"/>
+ <chmod file="logs/application/error/" mode="0777" verbose="true"/>
+ <chmod file="logs/application/profiling/" mode="0777" verbose="true"/>
+ <echo message="--- Setting Permission ---"/>
+ </target>
+ <!--
+ #################################################################
+ Sub Targets
+ #################################################################
+ -->
+
+ <!--
+ #################################################################
+ SetUp Project
+ #################################################################
+ -->
+ <target name="setup" depends="-initDb">
+
+ </target>
+ <target name="-initDb">
+ <pdosqlexec url="mysql:host=localhost;dbname=">
+
+ </pdosqlexec>
+ </target>
+ <!--
+ #################################################################
+ SetUp Project
+ #################################################################
+ -->
+
+</project>
View
14 application/as3/build/phpunit.xml
@@ -0,0 +1,14 @@
+<phpunit bootstrap="./bootstrap.php"
+ colors="true"
+ stopOnFailure="true"
+ strict="true"
+ verbose="true">
+ <filter>
+ <blacklist>
+ <file>../application/php/ApplicationBootstrap.php</file>
+ <file>../application/php/ApplicationContext.php</file>
+ <file>../library/Processus/core/ProcessusBootstrap.php</file>
+ <file>../library/Processus/core/ProcessusContext.php</file>
+ </blacklist>
+ </filter>
+</phpunit>
View
0  lib/as3-utils.swc → application/as3/lib/as3-utils.swc
File renamed without changes
View
0  lib/as3corelib.swc → application/as3/lib/as3corelib.swc
File renamed without changes
View
0  lib/flexunit-4.0.0.swc → application/as3/lib/flexunit-4.0.0.swc
File renamed without changes
View
0  lib/flexunit-aircilistener-4.0.0.swc → application/as3/lib/flexunit-aircilistener-4.0.0.swc
File renamed without changes
View
0  lib/flexunit-cilistener-4.0.0.swc → application/as3/lib/flexunit-cilistener-4.0.0.swc
File renamed without changes
View
0  lib/flexunit-flexcoverlistener-4.0.0.swc → ...tion/as3/lib/flexunit-flexcoverlistener-4.0.0.swc
File renamed without changes
View
0  lib/flexunit-uilistener-4.0.0.swc → application/as3/lib/flexunit-uilistener-4.0.0.swc
File renamed without changes
View
0  lib/greensock.swc → application/as3/lib/greensock.swc
File renamed without changes
View
0  lib/hamcrest-as3-1.1.0.swc → application/as3/lib/hamcrest-as3-1.1.0.swc
File renamed without changes
View
0  lib/robotlegs-framework-v1.5.2.swc → application/as3/lib/robotlegs-framework-v1.5.2.swc
File renamed without changes
View
0  src/FastClick.as → application/as3/src/FastClick.as
File renamed without changes
View
0  src/assets/pf_ronda_seven.ttf → application/as3/src/assets/pf_ronda_seven.ttf
File renamed without changes
View
0  src/com/bit101/charts/BarChart.as → application/as3/src/com/bit101/charts/BarChart.as
File renamed without changes
View
0  src/com/bit101/charts/Chart.as → application/as3/src/com/bit101/charts/Chart.as
File renamed without changes
View
0  src/com/bit101/charts/LineChart.as → application/as3/src/com/bit101/charts/LineChart.as
File renamed without changes
View
0  src/com/bit101/charts/PieChart.as → application/as3/src/com/bit101/charts/PieChart.as
File renamed without changes
View
0  src/com/bit101/components/Accordion.as → ...cation/as3/src/com/bit101/components/Accordion.as
File renamed without changes
View
0  src/com/bit101/components/Calendar.as → ...ication/as3/src/com/bit101/components/Calendar.as
File renamed without changes
View
0  src/com/bit101/components/CheckBox.as → ...ication/as3/src/com/bit101/components/CheckBox.as
File renamed without changes
View
0  src/com/bit101/components/ColorChooser.as → ...ion/as3/src/com/bit101/components/ColorChooser.as
File renamed without changes
View
0  src/com/bit101/components/ComboBox.as → ...ication/as3/src/com/bit101/components/ComboBox.as
File renamed without changes
View
0  src/com/bit101/components/Component.as → ...cation/as3/src/com/bit101/components/Component.as
File renamed without changes
View
0  src/com/bit101/components/FPSMeter.as → ...ication/as3/src/com/bit101/components/FPSMeter.as
File renamed without changes
View
0  src/com/bit101/components/HBox.as → application/as3/src/com/bit101/components/HBox.as
File renamed without changes
View
0  src/com/bit101/components/HRangeSlider.as → ...ion/as3/src/com/bit101/components/HRangeSlider.as
File renamed without changes
View
0  src/com/bit101/components/HScrollBar.as → ...ation/as3/src/com/bit101/components/HScrollBar.as
File renamed without changes
View
0  src/com/bit101/components/HSlider.as → application/as3/src/com/bit101/components/HSlider.as
File renamed without changes
View
0  src/com/bit101/components/HUISlider.as → ...cation/as3/src/com/bit101/components/HUISlider.as
File renamed without changes
View
0  src/com/bit101/components/IndicatorLight.as → ...n/as3/src/com/bit101/components/IndicatorLight.as
File renamed without changes
View
0  src/com/bit101/components/InputText.as → ...cation/as3/src/com/bit101/components/InputText.as
File renamed without changes
View
0  src/com/bit101/components/Knob.as → application/as3/src/com/bit101/components/Knob.as
File renamed without changes
View
0  src/com/bit101/components/Label.as → application/as3/src/com/bit101/components/Label.as
File renamed without changes
View
0  src/com/bit101/components/List.as → application/as3/src/com/bit101/components/List.as
File renamed without changes
View
0  src/com/bit101/components/ListItem.as → ...ication/as3/src/com/bit101/components/ListItem.as
File renamed without changes
View
0  src/com/bit101/components/Meter.as → application/as3/src/com/bit101/components/Meter.as
File renamed without changes
View
0  src/com/bit101/components/NumericStepper.as → ...n/as3/src/com/bit101/components/NumericStepper.as
File renamed without changes
View
0  src/com/bit101/components/Panel.as → application/as3/src/com/bit101/components/Panel.as
File renamed without changes
View
0  src/com/bit101/components/ProgressBar.as → ...tion/as3/src/com/bit101/components/ProgressBar.as
File renamed without changes
View
0  src/com/bit101/components/PushButton.as → ...ation/as3/src/com/bit101/components/PushButton.as
File renamed without changes
View
0  src/com/bit101/components/RadioButton.as → ...tion/as3/src/com/bit101/components/RadioButton.as
File renamed without changes
View
0  src/com/bit101/components/RangeSlider.as → ...tion/as3/src/com/bit101/components/RangeSlider.as
File renamed without changes
View
0  src/com/bit101/components/RotarySelector.as → ...n/as3/src/com/bit101/components/RotarySelector.as
File renamed without changes
View
0  src/com/bit101/components/ScrollBar.as → ...cation/as3/src/com/bit101/components/ScrollBar.as
File renamed without changes
View
0  src/com/bit101/components/ScrollPane.as → ...ation/as3/src/com/bit101/components/ScrollPane.as
File renamed without changes
View
0  src/com/bit101/components/Slider.as → application/as3/src/com/bit101/components/Slider.as
File renamed without changes
View
0  src/com/bit101/components/Style.as → application/as3/src/com/bit101/components/Style.as
File renamed without changes
View
0  src/com/bit101/components/Text.as → application/as3/src/com/bit101/components/Text.as
File renamed without changes
View
0  src/com/bit101/components/TextArea.as → ...ication/as3/src/com/bit101/components/TextArea.as
File renamed without changes
View
0  src/com/bit101/components/UISlider.as → ...ication/as3/src/com/bit101/components/UISlider.as
File renamed without changes
View
0  src/com/bit101/components/VBox.as → application/as3/src/com/bit101/components/VBox.as
File renamed without changes
View
0  src/com/bit101/components/VRangeSlider.as → ...ion/as3/src/com/bit101/components/VRangeSlider.as
File renamed without changes
View
0  src/com/bit101/components/VScrollBar.as → ...ation/as3/src/com/bit101/components/VScrollBar.as
File renamed without changes
View
0  src/com/bit101/components/VSlider.as → application/as3/src/com/bit101/components/VSlider.as
File renamed without changes
View
0  src/com/bit101/components/VUISlider.as → ...cation/as3/src/com/bit101/components/VUISlider.as
File renamed without changes
View
0  src/com/bit101/components/WheelMenu.as → ...cation/as3/src/com/bit101/components/WheelMenu.as
File renamed without changes
View
0  src/com/bit101/components/Window.as → application/as3/src/com/bit101/components/Window.as
File renamed without changes
View
0  src/com/bit101/utils/MinimalConfigurator.as → ...n/as3/src/com/bit101/utils/MinimalConfigurator.as
File renamed without changes
View
0  src/com/crowdpark/base/BaseDataEvent.as → ...ation/as3/src/com/crowdpark/base/BaseDataEvent.as
File renamed without changes
View
0  src/com/crowdpark/base/BaseVO.as → application/as3/src/com/crowdpark/base/BaseVO.as
File renamed without changes
View
1  src/com/crowdpark/fastclick/mvcs/FastClickContext.as → .../com/crowdpark/fastclick/mvcs/FastClickContext.as
@@ -51,7 +51,6 @@ package com.crowdpark.fastclick.mvcs
commandMap.mapEvent(ContextEvent.STARTUP_COMPLETE, StartUpCompleteCommand,ContextEvent);
commandMap.mapEvent(StateMachineEvents.START, CountDownCommand,StateMachineEvents);
commandMap.mapEvent(GameEvents.SET_PLAYER, SetPlayerCommand,GameEvents);
-
commandMap.mapEvent(StateMachineEvents.GAME,StartGameCommand,StateMachineEvents);
commandMap.mapEvent(StateMachineEvents.FINISH, FinishGameCommand,StateMachineEvents);
commandMap.mapEvent(StateMachineEvents.RETRY, RetryGameCommand,StateMachineEvents);
View
0  .../crowdpark/fastclick/mvcs/assets/FastClickBall.as → .../crowdpark/fastclick/mvcs/assets/FastClickBall.as
File renamed without changes
View
0  src/com/crowdpark/fastclick/mvcs/assets/ScoreBox.as → ...c/com/crowdpark/fastclick/mvcs/assets/ScoreBox.as
File renamed without changes
View
0  ...owdpark/fastclick/mvcs/assets/ball/BaseGraphic.as → ...owdpark/fastclick/mvcs/assets/ball/BaseGraphic.as
File renamed without changes
View
0  .../crowdpark/fastclick/mvcs/assets/ball/BlueBall.as → .../crowdpark/fastclick/mvcs/assets/ball/BlueBall.as
File renamed without changes
View
0  ...m/crowdpark/fastclick/mvcs/assets/ball/RedBall.as → ...m/crowdpark/fastclick/mvcs/assets/ball/RedBall.as
File renamed without changes
View
0  ...dpark/fastclick/mvcs/commands/CountDownCommand.as → ...dpark/fastclick/mvcs/commands/CountDownCommand.as
File renamed without changes
View
4 ...park/fastclick/mvcs/commands/FinishGameCommand.as → ...park/fastclick/mvcs/commands/FinishGameCommand.as
@@ -20,7 +20,9 @@ package com.crowdpark.fastclick.mvcs.commands
override public function execute() : void
{
contextView.removeChildAt(0);
- contextView.addChild(new ResultView().init());
+ var resultView:ResultView = new ResultView();
+ resultView.init();
+ contextView.addChild(resultView);
highestScoreModel.setHighscoreList(playerModel.getPlayerArray());
}
View
0  ...dpark/fastclick/mvcs/commands/SetPlayerCommand.as → ...dpark/fastclick/mvcs/commands/SetPlayerCommand.as
File renamed without changes
View
16 ...dpark/fastclick/mvcs/commands/StartGameCommand.as → ...dpark/fastclick/mvcs/commands/StartGameCommand.as
@@ -1,5 +1,7 @@
package com.crowdpark.fastclick.mvcs.commands
{
+ import flash.net.SharedObject;
+ import com.crowdpark.fastclick.mvcs.models.PlayerModel;
import com.crowdpark.fastclick.mvcs.models.ConfigModel;
import com.crowdpark.fastclick.mvcs.views.game.GameView;
@@ -12,12 +14,20 @@ package com.crowdpark.fastclick.mvcs.commands
{
[Inject]
public var configModel : ConfigModel;
-
+
+ [Inject]
+ public var playerModel : PlayerModel;
+
override public function execute() : void
{
contextView.removeChildAt(0);
- contextView.addChild(new GameView().init());
-
+ var gameView : GameView = new GameView();
+ gameView.init();
+
+ var flashCookie : SharedObject = SharedObject(playerModel.getFlashCookie());
+
+ gameView.hudView.getDataProvider().setValueByKey('playerName', flashCookie.data.playername);
+ contextView.addChild(gameView);
configModel.startTimer();
}
}
View
39 application/as3/src/com/crowdpark/fastclick/mvcs/commands/StartUpCompleteCommand.as
@@ -0,0 +1,39 @@
+package com.crowdpark.fastclick.mvcs.commands
+{
+ import com.crowdpark.fastclick.mvcs.models.PlayerModel;
+
+ import flash.net.SharedObject;
+
+ import com.crowdpark.fastclick.mvcs.services.ConfigService;
+ import com.crowdpark.fastclick.mvcs.views.start.StartView;
+
+ import org.robotlegs.mvcs.Command;
+
+ /**
+ * @author fatmatekin
+ */
+ public class StartUpCompleteCommand extends Command
+ {
+ [Inject]
+ public var configService : ConfigService;
+ [Inject]
+ public var playerModel : PlayerModel;
+
+ override public function execute() : void
+ {
+ var startView : StartView = new StartView();
+ startView.init();
+
+ var flashCookie : SharedObject = SharedObject(playerModel.getFlashCookie());
+
+ if (flashCookie.data.playername)
+ {
+ startView.getDataProvider().setValueByKey('playerName', flashCookie.data.playername);
+ startView.updatePlayerNameField();
+ }
+
+ contextView.addChild(startView);
+ configService.fetchData("data/Config.json");
+ }
+ }
+}
View
0  ...park/fastclick/mvcs/commands/UpdateTimeCommand.as → ...park/fastclick/mvcs/commands/UpdateTimeCommand.as
File renamed without changes
View
36 application/as3/src/com/crowdpark/fastclick/mvcs/commands/retryGameCommand.as
@@ -0,0 +1,36 @@
+package com.crowdpark.fastclick.mvcs.commands
+{
+ import flash.net.SharedObject;
+
+ import com.crowdpark.fastclick.mvcs.models.PlayerModel;
+ import com.crowdpark.fastclick.mvcs.views.start.StartView;
+
+ import org.robotlegs.mvcs.Command;
+
+ /**
+ * @author fatmatekin
+ */
+ public class RetryGameCommand extends Command
+ {
+ [Inject]
+ public var playerModel : PlayerModel;
+
+ override public function execute() : void
+ {
+ contextView.removeChildAt(0);
+
+ var startView : StartView = new StartView();
+ startView.init();
+
+ var flashCookie : SharedObject = SharedObject(playerModel.getFlashCookie());
+
+ if (flashCookie.data.playername)
+ {
+ startView.getDataProvider().setValueByKey('playerName', flashCookie.data.playername);
+ startView.updatePlayerNameField();
+ }
+
+ contextView.addChild(startView);
+ }
+ }
+}
View
0  ...ark/fastclick/mvcs/commands/updateScoreCommand.as → ...ark/fastclick/mvcs/commands/updateScoreCommand.as
File renamed without changes
View
4 ...m/crowdpark/fastclick/mvcs/core/base/BaseEvent.as → ...m/crowdpark/fastclick/mvcs/core/base/BaseEvent.as
@@ -18,6 +18,10 @@ package com.crowdpark.fastclick.mvcs.core.base
public function getDataprovider() : InterfaceVO
{
+ if(!_dataprovider)
+ {
+ _dataprovider = new BaseVo();
+ }
return _dataprovider;
}
View
46 application/as3/src/com/crowdpark/fastclick/mvcs/core/base/BaseView.as
@@ -0,0 +1,46 @@
+package com.crowdpark.fastclick.mvcs.core.base
+{
+ import com.crowdpark.fastclick.mvcs.interfaces.InterfaceView;
+ import flash.events.Event;
+
+ import com.crowdpark.fastclick.mvcs.interfaces.InterfaceVO;
+
+ import flash.display.Sprite;
+
+ /**
+ * @author fatmatekin
+ */
+ public class BaseView extends Sprite implements InterfaceView
+ {
+ private var _dataProvider : InterfaceVO;
+
+ public function BaseView()
+ {
+ addEventListener(Event.ADDED_TO_STAGE, onAddedToStageListener);
+ }
+
+ public function onAddedToStageListener(e : Event) : void
+ {
+ }
+
+ public function init() : void
+ {
+
+ }
+
+ public function getDataProvider() : InterfaceVO
+ {
+ if (!_dataProvider)
+ {
+ _dataProvider = new BaseVo();
+ }
+ return _dataProvider;
+ }
+
+ public function setDataProvider(dataProvider : InterfaceVO) : BaseView
+ {
+ _dataProvider = dataProvider;
+ return this;
+ }
+ }
+}
View
2  src/com/crowdpark/fastclick/mvcs/models/vo/BaseVo.as → .../com/crowdpark/fastclick/mvcs/core/base/BaseVo.as
@@ -1,4 +1,4 @@
-package com.crowdpark.fastclick.mvcs.models.vo
+package com.crowdpark.fastclick.mvcs.core.base
{
import com.crowdpark.fastclick.mvcs.interfaces.InterfaceVO;
/**
View
11 ...lick/mvcs/core/statemachine/StateMachineEvents.as → ...lick/mvcs/core/statemachine/StateMachineEvents.as
@@ -1,21 +1,20 @@
package com.crowdpark.fastclick.mvcs.core.statemachine
{
import com.crowdpark.fastclick.mvcs.core.base.BaseEvent;
-
+
/**
* @author fatmatekin
*/
public class StateMachineEvents extends BaseEvent
{
- public static const START:String = "startGame";
- public static const GAME:String = "playGame";
+ public static const START : String = "startGame";
+ public static const GAME : String = "playGame";
public static const FINISH : String = "finishGame";
- public static const RETRY: String = "retryGame";
+ public static const RETRY : String = "retryGame";
public function StateMachineEvents(type : String, bubbles : Boolean = false, cancelable : Boolean = true)
{
- super(type,bubbles,cancelable);
+ super(type, bubbles, cancelable);
}
-
}
}
View
0  ...ck/mvcs/core/statemachine/StateMachineMediator.as → ...ck/mvcs/core/statemachine/StateMachineMediator.as
File renamed without changes
View
0  ...click/mvcs/core/statemachine/StateMachineModel.as → ...click/mvcs/core/statemachine/StateMachineModel.as
File renamed without changes
View
0  ...click/mvcs/core/statemachine/StateMachineState.as → ...click/mvcs/core/statemachine/StateMachineState.as
File renamed without changes
View
0  ...com/crowdpark/fastclick/mvcs/events/GameEvents.as → ...com/crowdpark/fastclick/mvcs/events/GameEvents.as
File renamed without changes
View
0  ...owdpark/fastclick/mvcs/events/LeaderboardEvent.as → ...owdpark/fastclick/mvcs/events/LeaderboardEvent.as
File renamed without changes
View
0  ...rowdpark/fastclick/mvcs/events/PointClickEvent.as → ...rowdpark/fastclick/mvcs/events/PointClickEvent.as
File renamed without changes
View
0  ...wdpark/fastclick/mvcs/interfaces/InterfaceBall.as → ...wdpark/fastclick/mvcs/interfaces/InterfaceBall.as
File renamed without changes
View
0  ...stclick/mvcs/interfaces/InterfaceConfigService.as → ...stclick/mvcs/interfaces/InterfaceConfigService.as
File renamed without changes
View
0  ...rowdpark/fastclick/mvcs/interfaces/InterfaceVO.as → ...rowdpark/fastclick/mvcs/interfaces/InterfaceVO.as
File renamed without changes
View
15 application/as3/src/com/crowdpark/fastclick/mvcs/interfaces/InterfaceView.as
@@ -0,0 +1,15 @@
+package com.crowdpark.fastclick.mvcs.interfaces
+{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
+ import flash.events.Event;
+ /**
+ * @author fatmatekin
+ */
+ public interface InterfaceView
+ {
+ function init() : void;
+ function onAddedToStageListener(e : Event) : void;
+ function getDataProvider() : InterfaceVO;
+ function setDataProvider(dataProvider : InterfaceVO) : BaseView;
+ }
+}
View
6 ...om/crowdpark/fastclick/mvcs/models/ConfigModel.as → ...om/crowdpark/fastclick/mvcs/models/ConfigModel.as
@@ -1,18 +1,18 @@
package com.crowdpark.fastclick.mvcs.models
{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseVo;
import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineEvents;
import com.crowdpark.fastclick.mvcs.events.LeaderboardEvent;
import com.crowdpark.fastclick.mvcs.interfaces.InterfaceVO;
import com.crowdpark.fastclick.mvcs.models.vo.BallVo;
- import com.crowdpark.fastclick.mvcs.models.vo.BaseVo;
import com.crowdpark.fastclick.mvcs.views.hud.HudViewEvent;
-
import flash.events.TimerEvent;
import flash.geom.Point;
import flash.utils.Timer;
-
import org.robotlegs.mvcs.Actor;
+
+
/**
* @author fatmatekin
*/
View
0  ...wdpark/fastclick/mvcs/models/HighestScoreModel.as → ...wdpark/fastclick/mvcs/models/HighestScoreModel.as
File renamed without changes
View
0  ...om/crowdpark/fastclick/mvcs/models/PlayerModel.as → ...om/crowdpark/fastclick/mvcs/models/PlayerModel.as
File renamed without changes
View
1  src/com/crowdpark/fastclick/mvcs/models/vo/BallVo.as → .../com/crowdpark/fastclick/mvcs/models/vo/BallVo.as
@@ -1,5 +1,6 @@
package com.crowdpark.fastclick.mvcs.models.vo
{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseVo;
import flash.geom.Point;
/**
View
16 ...om/crowdpark/fastclick/mvcs/models/vo/PlayerVo.as → ...om/crowdpark/fastclick/mvcs/models/vo/PlayerVo.as
@@ -1,5 +1,6 @@
package com.crowdpark.fastclick.mvcs.models.vo
{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseVo;
/**
* @author fatmatekin
*/
@@ -27,20 +28,5 @@ package com.crowdpark.fastclick.mvcs.models.vo
return this;
}
- public function getScoreArray() : Array
- {
- return (this.getValueByKey('scoreArray') as Array);
- }
-
- public function setScoreArray(scoreArray : Array) : PlayerVo
- {
- this.setValueByKey('scoreArray', scoreArray);
- return this;
- }
-
- public function addNewScore() : void
- {
- getScoreArray().push(getCurrentScore());
- }
}
}
View
28 application/as3/src/com/crowdpark/fastclick/mvcs/services/BackendService.as
@@ -0,0 +1,28 @@
+package com.crowdpark.fastclick.mvcs.services
+{
+ import com.crowdpark.net.rpc.json.JsonRpcClientEvent;
+ import com.crowdpark.net.rpc.json.JsonRpcClient;
+ import com.crowdpark.fastclick.mvcs.models.vo.PlayerVo;
+
+ import org.robotlegs.mvcs.Actor;
+
+ /**
+ * @author fatmatekin
+ */
+ public class BackendService extends Actor
+ {
+ public function storePoints(point : PlayerVo) : void
+ {
+ var jsonClient : JsonRpcClient = new JsonRpcClient();
+ jsonClient.params = [point.getValues()];
+ jsonClient.method = 'App.';
+ jsonClient.url = '';
+
+ jsonClient.addEventListener(JsonRpcClientEvent.RESULT, onStorePointResult);
+ }
+
+ private function onStorePointResult(event : JsonRpcClientEvent) : void
+ {
+ }
+ }
+}
View
3  ...rowdpark/fastclick/mvcs/services/ConfigService.as → ...rowdpark/fastclick/mvcs/services/ConfigService.as
@@ -1,8 +1,5 @@
package com.crowdpark.fastclick.mvcs.services
{
- import com.crowdpark.fastclick.mvcs.interfaces.InterfaceVO;
- import com.crowdpark.net.rpc.json.JsonRpcClientEvent;
- import com.crowdpark.net.rpc.json.JsonRpcClient;
import com.crowdpark.fastclick.mvcs.models.ConfigModel;
import com.adobe.serialization.json.JSONDecoder;
View
3  .../fastclick/mvcs/views/countrdown/CountDownView.as → .../fastclick/mvcs/views/countrdown/CountDownView.as
@@ -1,5 +1,6 @@
package com.crowdpark.fastclick.mvcs.views.countrdown
{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
import utils.textField.createField;
import utils.draw.createCircleShape;
@@ -8,7 +9,7 @@ package com.crowdpark.fastclick.mvcs.views.countrdown
/**
* @author fatmatekin
*/
- public class CountDownView extends Sprite
+ public class CountDownView extends BaseView
{
public function createNumber(number : uint) : Sprite
{
View
8 ...ick/mvcs/views/countrdown/CountDownViewMeditor.as → ...ick/mvcs/views/countrdown/CountDownViewMeditor.as
@@ -3,9 +3,8 @@ package com.crowdpark.fastclick.mvcs.views.countrdown
import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineEvents;
import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineMediator;
import com.greensock.TweenMax;
- import flash.display.Sprite;
-
+ import flash.display.Sprite;
/**
* @author fatmatekin
@@ -37,11 +36,6 @@ package com.crowdpark.fastclick.mvcs.views.countrdown
}
}
- override protected function handleGame(e : StateMachineEvents) : void
- {
- super.handleGame(e);
- }
-
private function continueCount(numberSprite : Sprite) : void
{
view.removeChild(numberSprite);
View
57 application/as3/src/com/crowdpark/fastclick/mvcs/views/footer/FooterView.as
@@ -0,0 +1,57 @@
+package com.crowdpark.fastclick.mvcs.views.footer
+{
+ import com.bit101.components.HBox;
+
+ import flash.events.Event;
+
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
+ import com.bit101.components.ScrollPane;
+
+ import flash.display.Sprite;
+
+ /**
+ * @author fatmatekin
+ */
+ public class FooterView extends BaseView
+ {
+ public var ballPanel : ScrollPane = new ScrollPane();
+ private var hbox : HBox = new HBox();
+
+ override public function init() : void
+ {
+ super.init();
+
+ addBallPane();
+ ballPanel.addChild(hbox);
+ }
+
+ override public function onAddedToStageListener(e : Event) : void
+ {
+ super.onAddedToStageListener(e);
+
+ hbox.x = 30;
+ hbox.y = 30;
+ hbox.spacing = 20;
+
+ ballPanel.move(0, stage.stageHeight - 60);
+ ballPanel.setSize(stage.stageWidth, 60);
+ }
+
+ public function addBallPane() : void
+ {
+ trace('onfooter');
+
+ ballPanel.color = 0xffffff;
+ ballPanel.shadow = false;
+ ballPanel.showGrid = false;
+ ballPanel.autoHideScrollBar = true;
+ addChild(ballPanel);
+ }
+
+ public function addBallToHbox(ballShape : Sprite) : void
+ {
+ hbox.addChild(ballShape);
+ ballPanel.update();
+ }
+ }
+}
View
15 ...fastclick/mvcs/views/footer/FooterViewMediator.as → ...fastclick/mvcs/views/footer/FooterViewMediator.as
@@ -1,7 +1,6 @@
package com.crowdpark.fastclick.mvcs.views.footer
{
import com.crowdpark.fastclick.mvcs.assets.FastClickBall;
- import com.bit101.components.HBox;
import com.crowdpark.fastclick.mvcs.assets.ball.BaseGraphic;
import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineMediator;
import com.crowdpark.fastclick.mvcs.events.PointClickEvent;
@@ -17,21 +16,10 @@ package com.crowdpark.fastclick.mvcs.views.footer
*/
public class FooterViewMediator extends StateMachineMediator
{
- private var hbox : HBox = new HBox();
-
override public function onRegister() : void
{
super.onRegister();
- view.addBallPane();
- view.ballPanel.move(0, contextView.stage.stageHeight - 60);
-
- hbox.x = 30;
- hbox.y = 30;
- hbox.spacing = 20;
-
- view.ballPanel.addChild(hbox);
-
addContextListener(PointClickEvent.POINT_CLICK, handlePoinClick);
}
@@ -59,8 +47,7 @@ package com.crowdpark.fastclick.mvcs.views.footer
var shapeSprite : Sprite = new Sprite();
shapeSprite.addChild(shape);
- hbox.addChild(shapeSprite);
- view.ballPanel.update();
+ view.addBallToHbox(shapeSprite);
}
}
View
14 ...m/crowdpark/fastclick/mvcs/views/game/GameView.as → ...m/crowdpark/fastclick/mvcs/views/game/GameView.as
@@ -1,32 +1,32 @@
package com.crowdpark.fastclick.mvcs.views.game
{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
import com.crowdpark.fastclick.mvcs.views.footer.FooterView;
import com.crowdpark.fastclick.mvcs.views.hud.HudView;
import com.crowdpark.fastclick.mvcs.views.points.PointsView;
- import flash.display.Sprite;
-
- /**
+ /**
* @author fatmatekin
*/
- public class GameView extends Sprite
+ public class GameView extends BaseView
{
public var hudView : HudView;
public var pointsView : PointsView;
public var footerView : FooterView;
- public function init() : GameView
+ override public function init() : void
{
pointsView = new PointsView();
addChild(pointsView);
hudView = new HudView();
- hudView.name = "hudView";
+ hudView.init();
addChild(hudView);
footerView = new FooterView();
+ footerView.init();
addChild(footerView);
- return this;
+
}
}
}
View
0  ...ark/fastclick/mvcs/views/game/GameViewMediator.as → ...ark/fastclick/mvcs/views/game/GameViewMediator.as
File renamed without changes
View
119 application/as3/src/com/crowdpark/fastclick/mvcs/views/hud/HudView.as
@@ -0,0 +1,119 @@
+package com.crowdpark.fastclick.mvcs.views.hud
+{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
+ import com.greensock.TweenMax;
+ import com.greensock.easing.Linear;
+
+ import flash.events.Event;
+ import flash.display.Shape;
+
+ import utils.draw.createRectangleShape;
+
+ import flash.text.TextField;
+
+ import utils.textField.createField;
+
+ import flash.display.Sprite;
+
+ /**
+ * @author fatmatekin
+ */
+ public class HudView extends BaseView
+ {
+ public var scoreTitle : TextField = new TextField();
+ public var score : TextField = new TextField();
+ public var timeSprite : Sprite = new Sprite();
+ public var time : TextField = new TextField();
+ public var timeBarSprite : Sprite = new Sprite();
+ public var playerNameField : TextField = new TextField();
+ public var playerNameSprite : Sprite = new Sprite();
+
+
+ override public function init() : void
+ {
+
+ createScoreView();
+ createTimeView();
+ createTimeBar();
+ createPlayerName();
+
+
+ }
+ override public function onAddedToStageListener(e : Event) : void
+ {
+ var hudViewBackground : Shape = createRectangleShape(stage.stageWidth, 60, 0x000000);
+ addChildAt(hudViewBackground,0);
+
+ var timeBar : Shape = createRectangleShape(10, stage.stageHeight - 120, 0, 10, stage.stageWidth - 10, this.height);
+ var barMask : Shape = createRectangleShape(10, stage.stageHeight - 120, 0, 10, stage.stageWidth - 10, this.height);
+ timeBar.mask = barMask;
+
+ TweenMax.to(barMask, uint(this.getDataProvider().getValueByKey('gameDuration')), {y:stage.stageHeight - 60, ease:Linear.easeNone});
+
+ addChild(timeBar);
+ addChild(barMask);
+
+
+ scoreTitle.y = 20;
+ scoreTitle.x = 5;
+ score.x = 5;
+ timeSprite.x = stage.stageWidth - timeSprite.width - 20;
+ playerNameSprite.x = timeSprite.x - 70;
+
+ playerNameField.text = String(this.getDataProvider().getValueByKey('playerName'));
+
+ playerNameSprite.getChildAt(0).width = playerNameField.width + 6;
+ playerNameSprite.getChildAt(0).height = playerNameField.height + 6;
+
+ playerNameField.x = (playerNameSprite.width - playerNameField.width) / 2;
+ playerNameField.y = (playerNameSprite.height - playerNameField.height) / 2;
+
+ time.text = String(this.getDataProvider().getValueByKey('gameDuration'));
+ timeSprite.x = stage.stageWidth - timeSprite.width - 20;
+ playerNameSprite.x = timeSprite.x - 70;
+ }
+
+ private function createPlayerName() : void
+ {
+ var playerNameBackground : Shape = createRectangleShape(100, 30, 0xcacaca);
+ playerNameField = createField("", 0, 0, 100, 20, false, "Verdana", 12, 0xffffff);
+ playerNameSprite = new Sprite();
+
+ playerNameSprite.addChild(playerNameBackground);
+ playerNameSprite.addChild(playerNameField);
+
+ addChild(playerNameSprite);
+ }
+
+ private function createTimeBar() : void
+ {
+ timeBarSprite = new Sprite();
+ }
+
+ private function createTimeView() : void
+ {
+ timeSprite = new Sprite();
+
+ time = createField("", 0, 0, 200, 20, false, "Verdana", 25, 0xffffff);
+
+ timeSprite.addChild(time);
+ addChild(timeSprite);
+ }
+
+ private function createScoreView() : void
+ {
+ scoreTitle = createField("score", 0, 0, 200, 20, false, "Verdana", 15, 0xffffff);
+ addChild(scoreTitle);
+
+ score = createField("0", 0, 0, 200, 20, false, "Verdana", 20, 0xffffff);
+ addChild(score);
+ }
+
+ public function updateTime() : void
+ {
+ time.text = String(this.getDataProvider().getValueByKey('time'));
+ timeSprite.x = stage.stageWidth - timeSprite.width - 20;
+ playerNameSprite.x = timeSprite.x - 70;
+ }
+ }
+}
View
0  ...rowdpark/fastclick/mvcs/views/hud/HudViewEvent.as → ...rowdpark/fastclick/mvcs/views/hud/HudViewEvent.as
File renamed without changes
View
62 application/as3/src/com/crowdpark/fastclick/mvcs/views/hud/HudViewMediator.as
@@ -0,0 +1,62 @@
+package com.crowdpark.fastclick.mvcs.views.hud
+{
+ import com.crowdpark.fastclick.mvcs.assets.ball.BaseGraphic;
+ import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineEvents;
+ import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineMediator;
+ import com.crowdpark.fastclick.mvcs.events.PointClickEvent;
+ import com.crowdpark.fastclick.mvcs.interfaces.InterfaceBall;
+ import com.greensock.TweenMax;
+
+ import flash.display.DisplayObject;
+
+ /**
+ * @author fatmatekin
+ */
+ public class HudViewMediator extends StateMachineMediator
+ {
+ override public function onRegister() : void
+ {
+ super.onRegister();
+ view.getDataProvider().setValueByKey('playerName', playerModel.getCurrentPlayer().getValueByKey('playerName'));
+ view.getDataProvider().setValueByKey('gameDuration', configModel.getGameDuration());
+
+ addContextListener(HudViewEvent.UPDATE, updateTime);
+ addContextListener(PointClickEvent.POINT_CLICK, handlePointClickEvent);
+ }
+
+ private function updateTime(e : HudViewEvent) : void
+ {
+ view.getDataProvider().setValueByKey('time', String(configModel.getTime()));
+ view.updateTime();
+ }
+
+ private function handlePointClickEvent(event : PointClickEvent) : void
+ {
+ view.score.text = String(playerModel.getCurrentPlayer().getValueByKey('currentScore'));
+
+ var scoreBox : BaseGraphic = BaseGraphic(event.getDataprovider().getValueByKey('scoreBox'));
+ scoreBox.alpha = 0;
+ view.addChild(scoreBox);
+
+ TweenMax.to(scoreBox, 0.3, {alpha:1, x:scoreBox.getEndPoint().x, y:scoreBox.getEndPoint().y, onComplete:handleTweenComplete, onCompleteParams:[scoreBox]});
+ }
+
+ private function handleTweenComplete(scoreBox : InterfaceBall) : void
+ {
+ if (view)
+ {
+ view.removeChild(DisplayObject(scoreBox));
+ }
+ }
+
+ override protected function handleFinish(e : StateMachineEvents) : void
+ {
+ super.handleFinish(e);
+ }
+
+ public function get view() : HudView
+ {
+ return viewComponent as HudView;
+ }
+ }
+}
View
11 ...stclick/mvcs/views/leaderboard/LeaderboardView.as → ...stclick/mvcs/views/leaderboard/LeaderboardView.as
@@ -1,20 +1,21 @@
package com.crowdpark.fastclick.mvcs.views.leaderboard
{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
import flash.text.TextField;
import com.bit101.components.ScrollPane;
- import flash.display.Sprite;
-
+
/**
* @author fatmatekin
*/
- public class LeaderboardView extends Sprite
+ public class LeaderboardView extends BaseView
{
public var leaderboardPanel : ScrollPane;
public var playerName : TextField;
- public function init(): LeaderboardView
+ override public function init() :void
+
{
leaderboardPanel = new ScrollPane();
leaderboardPanel.color = 0xffffff;
@@ -26,7 +27,7 @@ package com.crowdpark.fastclick.mvcs.views.leaderboard
leaderboardPanel.autoHideScrollBar = true;
addChild(leaderboardPanel);
- return this;
+
}
}
}
View
0  ...mvcs/views/leaderboard/LeaderboardViewMediator.as → ...mvcs/views/leaderboard/LeaderboardViewMediator.as
File renamed without changes
View
11 application/as3/src/com/crowdpark/fastclick/mvcs/views/points/PointsView.as
@@ -0,0 +1,11 @@
+package com.crowdpark.fastclick.mvcs.views.points
+{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
+
+ /**
+ * @author fatmatekin
+ */
+ public class PointsView extends BaseView
+ {
+ }
+}
View
8 ...fastclick/mvcs/views/points/PointsViewMediator.as → ...fastclick/mvcs/views/points/PointsViewMediator.as
@@ -1,23 +1,23 @@
package com.crowdpark.fastclick.mvcs.views.points
{
import com.crowdpark.fastclick.mvcs.assets.FastClickBall;
- import com.crowdpark.fastclick.mvcs.interfaces.InterfaceVO;
- import com.crowdpark.fastclick.mvcs.models.vo.BaseVo;
import com.crowdpark.fastclick.mvcs.assets.ScoreBox;
import com.crowdpark.fastclick.mvcs.assets.ball.BaseGraphic;
+ import com.crowdpark.fastclick.mvcs.core.base.BaseVo;
import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineMediator;
import com.crowdpark.fastclick.mvcs.events.PointClickEvent;
import com.crowdpark.fastclick.mvcs.interfaces.InterfaceBall;
+ import com.crowdpark.fastclick.mvcs.interfaces.InterfaceVO;
import com.crowdpark.fastclick.mvcs.models.vo.BallVo;
import com.greensock.TweenMax;
-
import flash.events.MouseEvent;
import flash.geom.Point;
-
import utils.display.addChild;
import utils.geom.randomPoint;
import utils.number.randomIntegerWithinRange;
+
+
/**
* @author fatmatekin
*/
View
25 ...owdpark/fastclick/mvcs/views/result/ResultView.as → ...owdpark/fastclick/mvcs/views/result/ResultView.as
@@ -1,5 +1,6 @@
package com.crowdpark.fastclick.mvcs.views.result
{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
import com.crowdpark.fastclick.mvcs.views.leaderboard.LeaderboardView;
import utils.draw.createRectangleShape;
@@ -11,40 +12,38 @@ package com.crowdpark.fastclick.mvcs.views.result
/**
* @author fatmatekin
*/
- public class ResultView extends Sprite
+ public class ResultView extends BaseView
{
public var resultText : TextField;
public var result : TextField;
public var retryButton : Sprite;
public var leaderboardView : LeaderboardView;
- public var leaderboardTitle:TextField;
-
- public function init() : ResultView
+ public var leaderboardTitle : TextField;
+
+ override public function init() : void
{
resultText = createField("Your Score", 0, 0, 200, 20, false, "Verdana", 13);
result = createField("", 0, 0, 200, 20, false, "Verdana", 22);
- leaderboardTitle = createField("HIGHEST SCORES",0, 0, 200, 20, false, "Verdana", 15);
-
+ leaderboardTitle = createField("HIGHEST SCORES", 0, 0, 200, 20, false, "Verdana", 15);
+
addChild(result);
addChild(resultText);
addChild(leaderboardTitle);
-
+
retryButton = new Sprite;
- retryButton.addChild(createRectangleShape(80, 30,0x00e0e6));
+ retryButton.addChild(createRectangleShape(80, 30, 0x00e0e6));
var title : TextField = createField("RETRY", 0, 0, 200, 20, false, "Verdana", 15, 0xffffff);
title.x = (retryButton.width - title.width) / 2;
- title.y = (retryButton.height - title.height)/2;
+ title.y = (retryButton.height - title.height) / 2;
retryButton.addChild(title);
addChild(retryButton);
- leaderboardView = new LeaderboardView().init();
+ leaderboardView = new LeaderboardView();
+ leaderboardView.init();
addChild(leaderboardView);
-
- return this;
}
-
}
}
View
0  ...fastclick/mvcs/views/result/ResultViewMediator.as → ...fastclick/mvcs/views/result/ResultViewMediator.as
File renamed without changes
View
131 application/as3/src/com/crowdpark/fastclick/mvcs/views/start/StartView.as
@@ -0,0 +1,131 @@
+package com.crowdpark.fastclick.mvcs.views.start
+{
+ import com.crowdpark.fastclick.mvcs.core.base.BaseView;
+
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextFieldType;
+ import flash.display.Shape;
+
+ import utils.draw.createRectangleShape;
+ import utils.textField.createField;
+
+ import flash.text.TextFormat;
+ import flash.display.Sprite;
+ import flash.text.TextField;
+
+ /**
+ * @author fatmatekin
+ */
+ public class StartView extends BaseView
+ {
+ public var gameTitleSprite : Sprite = new Sprite();
+ public var startButtonSprite : Sprite = new Sprite();
+ public var playerNameSprite : Sprite = new Sprite();
+ private var _playerNameField : TextField;
+ private var tfm : TextFormat;
+ public static const START_GAME : String = "START_GAME";
+
+ override public function onAddedToStageListener(e : Event) : void
+ {
+ gameTitleSprite.x = (stage.stageWidth - gameTitleSprite.width) / 2;
+ gameTitleSprite.y = 30;
+
+ playerNameSprite.x = (stage.stageWidth - playerNameSprite.width) / 2;
+ playerNameSprite.y = gameTitleSprite.y + gameTitleSprite.height + 60;
+
+ startButtonSprite.y = 230;
+ startButtonSprite.x = (stage.stageWidth - startButtonSprite.width) / 2;
+ startButtonSprite.buttonMode = true;
+
+ startButtonSprite.addEventListener(MouseEvent.CLICK, handleStartClickEvent);
+ }
+
+ override public function init() : void
+ {
+ tfm = new TextFormat("Arial", 20, 0xffffff, true);
+
+ addChild(gameTitleSprite);
+ addChild(startButtonSprite);
+ addChild(playerNameSprite);
+
+ createGameTitle();
+ createStartButton();
+ createPlayerNameField();
+
+ //updatePlayerNameField();
+ }
+
+ private function handleStartClickEvent(e : MouseEvent) : void
+ {
+ var playerName : String = _playerNameField.text;
+ this.getDataProvider().setValueByKey('playerName', playerName);
+
+ dispatchEvent(new Event(StartView.START_GAME));
+ }
+
+ private function createGameTitle() : void
+ {
+ var titleBackground : Shape = createRectangleShape(200, 30, 0x00e0e6);
+ var title : TextField = createField('FAST CLICK!', 0, 0, 200, 20, false, 'Verdana', 20, 0xffffff);
+ title.x = (titleBackground.width - title.width) / 2;
+
+ gameTitleSprite.addChild(titleBackground);
+ gameTitleSprite.addChild(title);
+ }
+
+ private function createStartButton() : void
+ {
+ var startButtonBackground : Shape = createRectangleShape(100, 30, 0x00e0e6);
+
+ var startButtonTitle : TextField = createField('PLAY!', 0, 0, 200, 20, false, 'Verdana', 20, 0xffffff);
+ startButtonTitle.x = (startButtonBackground.width - startButtonTitle.width) / 2;
+
+ startButtonSprite.mouseChildren = false;
+
+ startButtonSprite.addChild(startButtonBackground);
+ startButtonSprite.addChild(startButtonTitle);
+ }
+
+ private function createPlayerNameField() : void
+ {
+ var tf : TextFormat = new TextFormat();
+ tf.font = "Verdana";
+ tf.size = 20;
+ tf.align = "center";
+
+ _playerNameField = new TextField();
+ _playerNameField.type = TextFieldType.INPUT;
+ _playerNameField.y = 40;
+ _playerNameField.width = 130;
+ _playerNameField.height = 30;
+ _playerNameField.text = "";
+ _playerNameField.border = true;
+ _playerNameField.defaultTextFormat = tf;
+
+ var title : TextField = createField("Enter your name", 0, 0, 200, 20, false, "Verdana", 15, 0);
+
+ playerNameSprite.addChild(title);
+ playerNameSprite.addChild(_playerNameField);
+ }
+
+ public function updatePlayerNameField() : StartView
+ {
+ var playerName : String = String(this.getDataProvider().getValueByKey('playerName'));
+ this.getPlayerNameField().text = playerName;
+
+ return this;
+ }
+
+ public function getPlayerNameField() : TextField
+ {
+ return _playerNameField;
+ }
+
+ public function setPlayerNameField(playerNameField : TextField) : StartView
+ {
+ _playerNameField = playerNameField;
+ return this;
+ }
+ }
+}
View
45 application/as3/src/com/crowdpark/fastclick/mvcs/views/start/StartViewMediator.as
@@ -0,0 +1,45 @@
+package com.crowdpark.fastclick.mvcs.views.start
+{
+ import com.crowdpark.fastclick.mvcs.events.GameEvents;
+
+ import flash.events.Event;
+
+ import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineEvents;
+ import com.crowdpark.fastclick.mvcs.core.statemachine.StateMachineMediator;
+
+ /**
+ * @author fatmatekin
+ */
+ public class StartViewMediator extends StateMachineMediator
+ {
+ override public function onRegister() : void
+ {
+ super.onRegister();
+ view.y = 50;
+
+ view.updatePlayerNameField();
+
+ addViewListener(StartView.START_GAME, onStartGameListener);
+ }
+
+ private function onStartGameListener(e : Event) : void
+ {
+ trace('onstartgame');
+ view.updatePlayerNameField();
+
+ dispatch(new StateMachineEvents(StateMachineEvents.START));
+
+ dispatch(new GameEvents(GameEvents.SET_PLAYER).setDataprovider(view.getDataProvider()));
+ }
+
+ protected function get view() : StartView
+ {
+ return viewComponent as StartView;
+ }
+
+ override protected function handleStart(e : StateMachineEvents) : void
+ {
+ super.handleStart(e);
+ }
+ }
+}
View
0  src/com/crowdpark/interfaces/InterfaceVO.as → ...n/as3/src/com/crowdpark/interfaces/InterfaceVO.as
File renamed without changes
View
0  .../crowdpark/net/rpc/json/InterfaceJsonRpcClient.as → .../crowdpark/net/rpc/json/InterfaceJsonRpcClient.as
File renamed without changes
View
0  src/com/crowdpark/net/rpc/json/JsonRpcClient.as → ...3/src/com/crowdpark/net/rpc/json/JsonRpcClient.as
File renamed without changes
View
0  src/com/crowdpark/net/rpc/json/JsonRpcClientEvent.as → .../com/crowdpark/net/rpc/json/JsonRpcClientEvent.as
File renamed without changes
View
32 application/coffeescript/app.coffee
@@ -0,0 +1,32 @@
+build_root = ''
+
+###############################################
+
+window.AppConfig =
+ public_root: "#{build_root}"
+ assets_root: "#{build_root}/assets"
+ api_urlroot: "/api/v1"
+ fbAppId: '184206854998730'
+ log_silence: false
+
+###############################################
+
+window.App =
+ Controllers: {}
+ Models: {}
+ Collections: {}
+ Views: {}
+
+ Log: (args) ->
+ if typeof console isnt 'undefined' and window.AppConfig.log_silence is false
+ console.log args
+
+ Start: ->
+ window.App.Log 'Starting App'
+ window.App.Log ['Browser', BrowserDetect.OS, BrowserDetect.browser, BrowserDetect.version]
+
+ if BrowserDetect.browser is 'Explorer' and BrowserDetect.version < 9
+ $('#browser-notification').modal('show')
+ else
+ window.AppController = new App.Controllers.App()
+ Backbone.history.start root: window.AppConfig.public_root
View
90 application/coffeescript/app.controller.app.coffee
@@ -0,0 +1,90 @@
+window.App.Log 'loading controller...'
+
+App.Controllers.App = Backbone.Router.extend
+
+ routes:
+ "!/login" : "login"
+ "!/logout" : "logout"
+ "!/" : "home"
+ "" : "home"
+
+ ###############################################
+
+ initialize: ->
+ window.App.Log ['init controller']
+ window.Member = new App.Models.Member
+ window.ViewLayout = new App.Views.Layout
+
+ # facebook init
+ FB.init
+ appId: window.AppConfig.fbAppId
+ status: true
+ cookie: true
+ oauth: true
+ xfbml: true
+
+ # trigger successful authentication
+ FB.Event.subscribe 'auth.login', (response) ->
+ window.App.Log ['trigger fb.auth.login', response, document.cookie]
+ window.AppController.fbConnectedCookieChecker(response)
+
+ ###############################################
+
+ fbConnectedCookieChecker: (response) ->
+ intervalMs = 1
+
+ cookieChecker = (intervalInstance) ->
+ window.App.Log ["controller.fbConnectedCookieChecker... #{intervalMs}ms", document.cookie]
+ if document.cookie.match(/fbsr_/)
+ window.clearInterval(run)
+ window.Member.login(response)
+
+ run = window.setInterval(cookieChecker, intervalMs)
+
+ ###############################################
+
+ loadPage: (elmId) ->
+ window.App.Log ['show page #', elmId]
+
+ # reset navigation to current section
+ $('.nav li').removeClass('active')
+ $("#nav-#{elmId}").addClass('active')
+
+ # load only current section
+ $('.page').hide()
+ $("##{elmId}").fadeIn()
+
+ ###############################################
+
+ redirectToLogin: ->
+ window.App.Log ['controller.redirectToLogin']
+ window.AppController.navigate('#!/login', true)
+
+ ###############################################
+
+ login: ->
+ window.App.Log ['controller.login']
+
+ # we got a session
+ FB.getLoginStatus (response) ->
+ window.App.Log ['fb.getLoginStatus', response]
+
+ if response.status is 'connected'
+ window.Member.login()
+ else
+ window.ViewLayout.showLoginPage()
+
+ ###############################################
+
+ logout: ->
+ window.App.Log ['controller.logout']
+ window.Member.logout()
+
+ ###############################################
+
+ home: ->
+ if window.Member.attributes.has_session is not true
+ this.redirectToLogin()
+ else
+ window.App.Log ['controller.home']
+ this.loadPage('home')
View
84 application/coffeescript/app.model.member.coffee
@@ -0,0 +1,84 @@
+window.App.Log 'loading model...member'
+
+App.Models.Member = Backbone.Model.extend
+
+ urlRoot:
+ window.AppConfig.rpc_urlroot
+
+ ###############################################
+
+ options:
+ loginUrl: '!/login'
+ loggedInUrl: '!/'
+
+ ###############################################
+
+ defaults:
+ has_session: false
+
+ ###############################################
+
+ initialize: ->
+ window.App.Log ['init model.member']
+