emergent-core 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (349) hide show
  1. data/.bnsignore +16 -0
  2. data/History.txt +4 -0
  3. data/Manifest.txt +348 -0
  4. data/README.rdoc +47 -0
  5. data/Rakefile +39 -0
  6. data/app_generators/emergent_core/USAGE +5 -0
  7. data/app_generators/emergent_core/emergent_core_generator.rb +73 -0
  8. data/app_generators/emergent_core/templates/core/actionscript.properties +16 -0
  9. data/app_generators/emergent_core/templates/core/actionscriptair.properties +16 -0
  10. data/app_generators/emergent_core/templates/core/app.yaml.erb +12 -0
  11. data/app_generators/emergent_core/templates/core/default_tasks.rake +51 -0
  12. data/app_generators/emergent_core/templates/core/empty.txt +0 -0
  13. data/app_generators/emergent_core/templates/core/expressInstall.swf +0 -0
  14. data/app_generators/emergent_core/templates/core/flex.properties +2 -0
  15. data/app_generators/emergent_core/templates/core/generate.rb +17 -0
  16. data/app_generators/emergent_core/templates/core/html-template/AC_OETags.js +276 -0
  17. data/app_generators/emergent_core/templates/core/html-template/history/history.css +6 -0
  18. data/app_generators/emergent_core/templates/core/html-template/history/history.js +645 -0
  19. data/app_generators/emergent_core/templates/core/html-template/history/historyFrame.html +29 -0
  20. data/app_generators/emergent_core/templates/core/html-template/index.template.html +121 -0
  21. data/app_generators/emergent_core/templates/core/html-template/playerProductInstall.swf +0 -0
  22. data/app_generators/emergent_core/templates/core/index.html.erb +18 -0
  23. data/app_generators/emergent_core/templates/core/index.yaml +11 -0
  24. data/app_generators/emergent_core/templates/core/mainair-app.xml +134 -0
  25. data/app_generators/emergent_core/templates/core/mainapp-config.xml +21 -0
  26. data/app_generators/emergent_core/templates/core/mainapp.mxml +106 -0
  27. data/app_generators/emergent_core/templates/core/project-textmate.erb +52 -0
  28. data/app_generators/emergent_core/templates/core/project.properties +18 -0
  29. data/app_generators/emergent_core/templates/core/projectair.properties +24 -0
  30. data/app_generators/emergent_core/templates/core/swfobject.js +5 -0
  31. data/bin/emergent +17 -0
  32. data/lib/emergent_core.rb +49 -0
  33. data/lib/restfulx/active_foo.rb +194 -0
  34. data/lib/restfulx/active_record_tasks.rb +81 -0
  35. data/lib/restfulx/configuration.rb +76 -0
  36. data/lib/restfulx/datamapper_foo.rb +31 -0
  37. data/lib/restfulx/rails/recipes.rb +60 -0
  38. data/lib/restfulx/rails/swf_helper.rb +60 -0
  39. data/lib/restfulx/tasks.rb +85 -0
  40. data/lib/restfulx.rb +117 -0
  41. data/rails_generators/emergent_cms/USAGE +5 -0
  42. data/rails_generators/emergent_cms/emergent_cms_generator.rb +21 -0
  43. data/rails_generators/emergent_cms/templates/PagesEditModel.as +114 -0
  44. data/rails_generators/emergent_cms/templates/PagesEditView.mxml +102 -0
  45. data/rails_generators/emergent_config/USAGE +5 -0
  46. data/rails_generators/emergent_config/emergent_config_generator.rb +330 -0
  47. data/rails_generators/emergent_config/templates/app/controllers/accounts_controller.rb +104 -0
  48. data/rails_generators/emergent_config/templates/app/controllers/addresses_controller.rb +97 -0
  49. data/rails_generators/emergent_config/templates/app/controllers/application.rb +26 -0
  50. data/rails_generators/emergent_config/templates/app/controllers/assets_controller.rb +1 -0
  51. data/rails_generators/emergent_config/templates/app/controllers/content_assignments_controller.rb +97 -0
  52. data/rails_generators/emergent_config/templates/app/controllers/contents_controller.rb +114 -0
  53. data/rails_generators/emergent_config/templates/app/controllers/sessions_controller.rb +72 -0
  54. data/rails_generators/emergent_config/templates/app/controllers/sites_controller.rb +1 -0
  55. data/rails_generators/emergent_config/templates/app/controllers/users_controller.rb +97 -0
  56. data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/ICommand.as +16 -0
  57. data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/Undoable.as +46 -0
  58. data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/UpdateDocumentCommand.as +73 -0
  59. data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/DocumentEvent.as +46 -0
  60. data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/NavigationEvent.as +31 -0
  61. data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/ResourceEvent.as +27 -0
  62. data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/UndoEvent.as +36 -0
  63. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AboutUsManager.as +15 -0
  64. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AccountManager.as +31 -0
  65. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AuthenticationManager.as +76 -0
  66. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ContentManager.as +92 -0
  67. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentManager.as +131 -0
  68. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentsManager.as +156 -0
  69. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/HomeManager.as +18 -0
  70. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/MainManager.as +23 -0
  71. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/PagesManager.as +71 -0
  72. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ResourceManager.as +195 -0
  73. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/SiteManager.as +25 -0
  74. data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/UndoManager.as +143 -0
  75. data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentMap.mxml +123 -0
  76. data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentsMap.mxml +134 -0
  77. data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ManagerPresentationModelMap.mxml +59 -0
  78. data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ObjectMap.mxml +75 -0
  79. data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresentationModelViewMap.mxml +81 -0
  80. data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresenterViewMap.mxml +67 -0
  81. data/rails_generators/emergent_config/templates/app/flex/application/models/constant/DocumentType.as +52 -0
  82. data/rails_generators/emergent_config/templates/app/flex/application/models/constant/Resource.as +25 -0
  83. data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceAction.as +28 -0
  84. data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceResult.as +8 -0
  85. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Account.as +32 -0
  86. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Address.as +26 -0
  87. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Asset.as +25 -0
  88. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/AssetAssignment.as +25 -0
  89. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Content.as +46 -0
  90. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/ContentAssignment.as +33 -0
  91. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Document.as +131 -0
  92. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/PlainDocument.as +19 -0
  93. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/RichDocument.as +19 -0
  94. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Session.as +13 -0
  95. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Snapshot.as +21 -0
  96. data/rails_generators/emergent_config/templates/app/flex/application/models/domain/User.as +28 -0
  97. data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentFactory.as +61 -0
  98. data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentViewFactory.as +59 -0
  99. data/rails_generators/emergent_config/templates/app/flex/application/models/factory/ResourceFactory.as +28 -0
  100. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AboutUsModel.as +22 -0
  101. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AccountModel.as +68 -0
  102. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AuthenticationModel.as +44 -0
  103. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContactUsModel.as +45 -0
  104. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContentModel.as +70 -0
  105. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentModel.as +235 -0
  106. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentsModel.as +169 -0
  107. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/HomeModel.as +23 -0
  108. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/MainModel.as +35 -0
  109. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/PagesModel.as +44 -0
  110. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ProfileModel.as +99 -0
  111. data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ResourceModel.as +100 -0
  112. data/rails_generators/emergent_config/templates/app/flex/application/views/about_us/about_us.mxml +105 -0
  113. data/rails_generators/emergent_config/templates/app/flex/application/views/account/account.mxml +97 -0
  114. data/rails_generators/emergent_config/templates/app/flex/application/views/contact_us/contact_us.mxml +65 -0
  115. data/rails_generators/emergent_config/templates/app/flex/application/views/document/document.mxml +71 -0
  116. data/rails_generators/emergent_config/templates/app/flex/application/views/document/documents.mxml +201 -0
  117. data/rails_generators/emergent_config/templates/app/flex/application/views/document/plain_document.mxml +9 -0
  118. data/rails_generators/emergent_config/templates/app/flex/application/views/document/rich_document.mxml +12 -0
  119. data/rails_generators/emergent_config/templates/app/flex/application/views/gallery/gallery.mxml +37 -0
  120. data/rails_generators/emergent_config/templates/app/flex/application/views/home/home.mxml +58 -0
  121. data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_presenter.as +81 -0
  122. data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_troparchy.mxml +71 -0
  123. data/rails_generators/emergent_config/templates/app/flex/application/views/login/login.mxml +50 -0
  124. data/rails_generators/emergent_config/templates/app/flex/application/views/main/main.mxml +131 -0
  125. data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_presenter.as +166 -0
  126. data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_troparchy.mxml +74 -0
  127. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_model.as +13 -0
  128. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_presenter.as +10 -0
  129. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_view.mxml +48 -0
  130. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_model.as +13 -0
  131. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_presenter.as +10 -0
  132. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_view.mxml +43 -0
  133. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_model.as +13 -0
  134. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_presenter.as +10 -0
  135. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_view.mxml +47 -0
  136. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_model.as +13 -0
  137. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_presenter.as +10 -0
  138. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_view.mxml +49 -0
  139. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_presenter.as +63 -0
  140. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_troparchy.mxml +63 -0
  141. data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_view.mxml +59 -0
  142. data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages.mxml +44 -0
  143. data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_presenter.as +83 -0
  144. data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_troparchy.mxml +62 -0
  145. data/rails_generators/emergent_config/templates/app/flex/application/views/profile/profile.mxml +73 -0
  146. data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Bold.otf +0 -0
  147. data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Regular.otf +0 -0
  148. data/rails_generators/emergent_config/templates/app/flex/assets/html/lorem.html +3 -0
  149. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture10.png +0 -0
  150. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture11.png +0 -0
  151. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture12.png +0 -0
  152. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture13.png +0 -0
  153. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture14.png +0 -0
  154. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture3.png +0 -0
  155. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture4.png +0 -0
  156. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture5.png +0 -0
  157. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture6.png +0 -0
  158. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture7.png +0 -0
  159. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture8.png +0 -0
  160. data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture9.png +0 -0
  161. data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_0.jpg +0 -0
  162. data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_180.jpg +0 -0
  163. data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_270.jpg +0 -0
  164. data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_90.jpg +0 -0
  165. data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_bottom.jpg +0 -0
  166. data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_top.jpg +0 -0
  167. data/rails_generators/emergent_config/templates/app/flex/assets/styles/itunes7Bg.jpg +0 -0
  168. data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukebox.css +764 -0
  169. data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukeboxGfx.swf +0 -0
  170. data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidian.css +734 -0
  171. data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianBg.jpg +0 -0
  172. data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianGfx.swf +0 -0
  173. data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/LayoutAction.as +377 -0
  174. data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/SimpleLayoutAction.as +210 -0
  175. data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/FourDTweenCollection.mxml +50 -0
  176. data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/IAnimator.as +39 -0
  177. data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/TweenMaxAnimator.as +269 -0
  178. data/rails_generators/emergent_config/templates/app/flex/com/fourD/cameras/AstroCamera.as +177 -0
  179. data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDDataGrid.mxml +105 -0
  180. data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDItemRenderer.mxml +54 -0
  181. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/CenterPerspectiveProjection.as +72 -0
  182. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ComplexCondition.as +44 -0
  183. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ConditionsUtil.as +82 -0
  184. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/FourDComponent.as +309 -0
  185. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstanceMethodInvoker.as +50 -0
  186. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstancePropertyInjector.as +43 -0
  187. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/MethodCaller.as +51 -0
  188. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pathway.as +10 -0
  189. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PathwayEvent.as +28 -0
  190. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron.as +34 -0
  191. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron2.as +41 -0
  192. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PheronReceptor.as +125 -0
  193. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Properties.as +57 -0
  194. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Router.as +50 -0
  195. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/RouterUtil.as +70 -0
  196. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleCondition.as +42 -0
  197. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSortVO.as +1 -0
  198. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSorter.as +1 -0
  199. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton.as +70 -0
  200. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton2.as +234 -0
  201. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonCache.as +111 -0
  202. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonEvent.as +39 -0
  203. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap.as +515 -0
  204. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap2.as +289 -0
  205. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMapSample.mxml +73 -0
  206. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonReceptor.as +43 -0
  207. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScope.as +38 -0
  208. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScopeProperties.as +18 -0
  209. data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonUtils.as +51 -0
  210. data/rails_generators/emergent_config/templates/app/flex/com/fourD/events/LayoutActionEvent.as +75 -0
  211. data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CarouselLayout.as +85 -0
  212. data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CircleLayout.as +102 -0
  213. data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CoverFlowLayout.as +136 -0
  214. data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/FourDLayout.as +272 -0
  215. data/rails_generators/emergent_config/templates/app/flex/com/fourD/utils/TweenUtil.as +110 -0
  216. data/rails_generators/emergent_config/templates/app/helpers/accounts_helper.rb +93 -0
  217. data/rails_generators/emergent_config/templates/app/helpers/application_helper.rb +3 -0
  218. data/rails_generators/emergent_config/templates/app/models/account.rb +84 -0
  219. data/rails_generators/emergent_config/templates/app/models/account_mailer.rb +24 -0
  220. data/rails_generators/emergent_config/templates/app/models/account_observer.rb +17 -0
  221. data/rails_generators/emergent_config/templates/app/models/address.rb +2 -0
  222. data/rails_generators/emergent_config/templates/app/models/asset.rb +6 -0
  223. data/rails_generators/emergent_config/templates/app/models/asset_assignment.rb +4 -0
  224. data/rails_generators/emergent_config/templates/app/models/category.rb +35 -0
  225. data/rails_generators/emergent_config/templates/app/models/comment.rb +98 -0
  226. data/rails_generators/emergent_config/templates/app/models/content.rb +89 -0
  227. data/rails_generators/emergent_config/templates/app/models/content_assignment.rb +21 -0
  228. data/rails_generators/emergent_config/templates/app/models/image.rb +3 -0
  229. data/rails_generators/emergent_config/templates/app/models/post.rb +76 -0
  230. data/rails_generators/emergent_config/templates/app/models/section.rb +97 -0
  231. data/rails_generators/emergent_config/templates/app/models/site.rb +1 -0
  232. data/rails_generators/emergent_config/templates/app/models/tag.rb +1 -0
  233. data/rails_generators/emergent_config/templates/app/models/user.rb +4 -0
  234. data/rails_generators/emergent_config/templates/app/views/account_mailer/activation.erb +3 -0
  235. data/rails_generators/emergent_config/templates/app/views/account_mailer/signup_notification.erb +8 -0
  236. data/rails_generators/emergent_config/templates/config/Capfile +4 -0
  237. data/rails_generators/emergent_config/templates/config/README.txt +18 -0
  238. data/rails_generators/emergent_config/templates/config/deploy.rb +36 -0
  239. data/rails_generators/emergent_config/templates/config/routes.rb +72 -0
  240. data/rails_generators/emergent_config/templates/core/actionscript.properties +16 -0
  241. data/rails_generators/emergent_config/templates/core/actionscriptair.properties +16 -0
  242. data/rails_generators/emergent_config/templates/core/app.yaml.erb +12 -0
  243. data/rails_generators/emergent_config/templates/core/default_tasks.rake +51 -0
  244. data/rails_generators/emergent_config/templates/core/emergent_tasks.rake +42 -0
  245. data/rails_generators/emergent_config/templates/core/empty.txt +0 -0
  246. data/rails_generators/emergent_config/templates/core/expressInstall.swf +0 -0
  247. data/rails_generators/emergent_config/templates/core/flex.properties +2 -0
  248. data/rails_generators/emergent_config/templates/core/generate.rb +17 -0
  249. data/rails_generators/emergent_config/templates/core/html-template/AC_OETags.js +276 -0
  250. data/rails_generators/emergent_config/templates/core/html-template/history/history.css +6 -0
  251. data/rails_generators/emergent_config/templates/core/html-template/history/history.js +645 -0
  252. data/rails_generators/emergent_config/templates/core/html-template/history/historyFrame.html +29 -0
  253. data/rails_generators/emergent_config/templates/core/html-template/index.template.html +121 -0
  254. data/rails_generators/emergent_config/templates/core/html-template/playerProductInstall.swf +0 -0
  255. data/rails_generators/emergent_config/templates/core/index.html.erb +18 -0
  256. data/rails_generators/emergent_config/templates/core/index.yaml +11 -0
  257. data/rails_generators/emergent_config/templates/core/mainair-app.xml +134 -0
  258. data/rails_generators/emergent_config/templates/core/mainapp-config.xml +21 -0
  259. data/rails_generators/emergent_config/templates/core/mainapp.mxml +101 -0
  260. data/rails_generators/emergent_config/templates/core/project-textmate.erb +52 -0
  261. data/rails_generators/emergent_config/templates/core/project.properties +18 -0
  262. data/rails_generators/emergent_config/templates/core/projectair.properties +24 -0
  263. data/rails_generators/emergent_config/templates/core/restfulx.yml +14 -0
  264. data/rails_generators/emergent_config/templates/core/restfulx_tasks.rake +6 -0
  265. data/rails_generators/emergent_config/templates/core/swfobject.js +5 -0
  266. data/rails_generators/emergent_config/templates/db/migrate/create_accounts.rb +40 -0
  267. data/rails_generators/emergent_config/templates/db/migrate/create_addresses.rb +18 -0
  268. data/rails_generators/emergent_config/templates/db/migrate/create_asset_assignments.rb +19 -0
  269. data/rails_generators/emergent_config/templates/db/migrate/create_assets.rb +20 -0
  270. data/rails_generators/emergent_config/templates/db/migrate/create_content_assignments.rb +26 -0
  271. data/rails_generators/emergent_config/templates/db/migrate/create_contents.rb +21 -0
  272. data/rails_generators/emergent_config/templates/db/migrate/create_sessions.rb +16 -0
  273. data/rails_generators/emergent_config/templates/db/migrate/create_sites.rb +27 -0
  274. data/rails_generators/emergent_config/templates/db/migrate/create_users.rb +15 -0
  275. data/rails_generators/emergent_config/templates/lib/analytics.swc +0 -0
  276. data/rails_generators/emergent_config/templates/lib/app_controller.rb.erb +26 -0
  277. data/rails_generators/emergent_config/templates/lib/as3corelib-0.92.1.swc +0 -0
  278. data/rails_generators/emergent_config/templates/lib/as3crypto-1.3patched.swc +0 -0
  279. data/rails_generators/emergent_config/templates/lib/as3crypto.swc +0 -0
  280. data/rails_generators/emergent_config/templates/lib/as3ds-1.04.swc +0 -0
  281. data/rails_generators/emergent_config/templates/lib/as3httpclientlib-1.0.swc +0 -0
  282. data/rails_generators/emergent_config/templates/lib/authenticated_system.rb +189 -0
  283. data/rails_generators/emergent_config/templates/lib/authenticated_test_helper.rb +11 -0
  284. data/rails_generators/emergent_config/templates/lib/containerEx.swc +0 -0
  285. data/rails_generators/emergent_config/templates/lib/flare.swc +0 -0
  286. data/rails_generators/emergent_config/templates/lib/flash_session_hack.rb +27 -0
  287. data/rails_generators/emergent_config/templates/lib/flex2BrowserManager.swc +0 -0
  288. data/rails_generators/emergent_config/templates/lib/flexlib.swc +0 -0
  289. data/rails_generators/emergent_config/templates/lib/fluint.swc +0 -0
  290. data/rails_generators/emergent_config/templates/lib/mate_0_8_6_enhanced.swc +0 -0
  291. data/rails_generators/emergent_config/templates/lib/openflux.swc +0 -0
  292. data/rails_generators/emergent_config/templates/lib/pv3d.swc +0 -0
  293. data/rails_generators/emergent_config/templates/lib/restfulx.swc +0 -0
  294. data/rails_generators/emergent_config/templates/lib/site_keys.rb +38 -0
  295. data/rails_generators/emergent_config/templates/lib/tweenMax.swc +0 -0
  296. data/rails_generators/emergent_config/templates/lib/urlkitFlex3.swc +0 -0
  297. data/rails_generators/emergent_config/templates/shell_script +31 -0
  298. data/rails_generators/emergent_controller/USAGE +5 -0
  299. data/rails_generators/emergent_controller/emergent_controller_generator.rb +25 -0
  300. data/rails_generators/emergent_controller/templates/controller.as.erb +37 -0
  301. data/rails_generators/emergent_core/USAGE +5 -0
  302. data/rails_generators/emergent_core/emergent_core_generator.rb +157 -0
  303. data/rails_generators/emergent_iphone/USAGE +5 -0
  304. data/rails_generators/emergent_iphone/emergent_iphone_generator.rb +27 -0
  305. data/rails_generators/emergent_scaffold/USAGE +5 -0
  306. data/rails_generators/emergent_scaffold/emergent_scaffold_generator.rb +157 -0
  307. data/rails_generators/emergent_scaffold/templates/component.mxml.erb +101 -0
  308. data/rails_generators/emergent_scaffold/templates/controller.rb.erb +101 -0
  309. data/rails_generators/emergent_scaffold/templates/edit_index_view.mxml.erb +114 -0
  310. data/rails_generators/emergent_scaffold/templates/edit_show_view.mxml.erb +84 -0
  311. data/rails_generators/emergent_scaffold/templates/filter_view.mxml.erb +1 -0
  312. data/rails_generators/emergent_scaffold/templates/fixtures.yml.erb +128 -0
  313. data/rails_generators/emergent_scaffold/templates/index_view.mxml.erb +58 -0
  314. data/rails_generators/emergent_scaffold/templates/item_renderer.mxml.erb +53 -0
  315. data/rails_generators/emergent_scaffold/templates/manager.as.erb +31 -0
  316. data/rails_generators/emergent_scaffold/templates/migration.rb.erb +22 -0
  317. data/rails_generators/emergent_scaffold/templates/model.as.erb +42 -0
  318. data/rails_generators/emergent_scaffold/templates/model.rb.erb +11 -0
  319. data/rails_generators/emergent_scaffold/templates/presentation_model.as.erb +33 -0
  320. data/rails_generators/emergent_scaffold/templates/presenter.as.erb +98 -0
  321. data/rails_generators/emergent_scaffold/templates/show_view.mxml.erb +50 -0
  322. data/rails_generators/emergent_scaffold/templates/view_map.mxml.erb +40 -0
  323. data/rails_generators/emergent_scaffold/templates/views_panel.mxml.erb +64 -0
  324. data/rails_generators/emergent_styler/USAGE +5 -0
  325. data/rails_generators/emergent_styler/emergent_styler_generator.rb +21 -0
  326. data/rails_generators/rx_yaml_scaffold/USAGE +51 -0
  327. data/rails_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb +49 -0
  328. data/script/console +10 -0
  329. data/script/destroy +14 -0
  330. data/script/generate +14 -0
  331. data/spec/emergent_core_spec.rb +7 -0
  332. data/spec/spec_helper.rb +16 -0
  333. data/tasks/ann.rake +80 -0
  334. data/tasks/bones.rake +20 -0
  335. data/tasks/gem.rake +201 -0
  336. data/tasks/git.rake +40 -0
  337. data/tasks/manifest.rake +48 -0
  338. data/tasks/notes.rake +27 -0
  339. data/tasks/post_load.rake +39 -0
  340. data/tasks/rdoc.rake +50 -0
  341. data/tasks/rubyforge.rake +55 -0
  342. data/tasks/setup.rb +279 -0
  343. data/tasks/spec.rake +54 -0
  344. data/tasks/svn.rake +47 -0
  345. data/tasks/test.rake +40 -0
  346. data/test/test_emergent_core.rb +0 -0
  347. data/test/test_emergent_iphone_generator.rb +46 -0
  348. data/test/test_generator_helper.rb +29 -0
  349. metadata +437 -0
@@ -0,0 +1,269 @@
1
+ /*
2
+ * Copyright 2008 (c) Lance Pollard
3
+ * www.systemsofseven.com/blog
4
+ * www.4ddesignlab.com
5
+ * LanceJPollard@gmail.com
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person
8
+ * obtaining a copy of this software and associated documentation
9
+ * files (the "Software"), to deal in the Software without
10
+ * restriction, including without limitation the rights to use,
11
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the
13
+ * Software is furnished to do so, subject to the following
14
+ * conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be
17
+ * included in all copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26
+ * OTHER DEALINGS IN THE SOFTWARE.
27
+ */
28
+
29
+ package com.fourD.animators
30
+ {
31
+
32
+ import flash.display.DisplayObject;
33
+ import flash.events.TimerEvent;
34
+ import flash.utils.Timer;
35
+
36
+ import gs.*;
37
+ import gs.events.TweenEvent;
38
+
39
+ import mx.core.IUIComponent;
40
+ import mx.core.UIComponent;
41
+
42
+ /**
43
+ * An animator class which uses the Tweener library. This is the default animator provided by OpenFlux.
44
+ */
45
+ public class TweenMaxAnimator implements IAnimator
46
+ {
47
+
48
+ protected var component:DisplayObject;
49
+
50
+ private var tweens:Array;
51
+ private var tweenParams:Array;
52
+ private var item:DisplayObject;
53
+
54
+ public var side:String = "front";
55
+
56
+ private var _groupTween:TweenGroup;
57
+ private var _singleTween:TweenMax;
58
+ private var _isTweening:Boolean;
59
+
60
+ public var itemAlign:String;
61
+ public var layoutAlign:String;
62
+
63
+ /**
64
+ * The duration of time used to animate a component.
65
+ */
66
+ public var time:Number = 1;
67
+
68
+ public function TweenMaxAnimator() {
69
+ _groupTween = new TweenGroup();
70
+ // Tweener.registerSpecialProperty("actualWidth", getActualWidth, setActualWidth);
71
+ // Tweener.registerSpecialProperty("actualHeight", getActualHeight, setActualHeight);
72
+ }
73
+
74
+ public function tween(tweens:Array, tweenParams:Array=null, target:Object=null):void {
75
+ this.tweens = tweens;
76
+ this.tweenParams = tweenParams;
77
+ if (target) {
78
+ item = target as DisplayObject;
79
+ }
80
+
81
+ // if (item.alpha == 0) {
82
+ // var ui:IUIComponent = item as IUIComponent;
83
+ // ui.setActualSize(item.width, item.height);
84
+ // ui.move(token.x, token.y);
85
+ // tweenParams.alpha = 1;
86
+ // }
87
+
88
+ prepareTweenGarbageCollector();
89
+ trace("tween");
90
+ if (tweenParams) {
91
+ trace("tweenParams exist");
92
+ if (!setOppositeTween) {
93
+ trace("about to set oppositeTween var");
94
+ for (var i:int=0; i < tweenParams.length; i++) {
95
+ if (tweenParams[i].flipTo) {
96
+ trace('tweenparam flipTo');
97
+ tweenFlip();
98
+ } else {
99
+ createTween(tweens);
100
+ }
101
+ }
102
+ } else {
103
+ if (toTween && fromTween) {
104
+ trace("tweento and tweenFrom SEEEEEEEEEEEET");
105
+ tweenFlip();
106
+ } else {
107
+ createTween(tweens);
108
+ }
109
+ }
110
+ } else {
111
+ createTween(tweens);
112
+ }
113
+
114
+
115
+ // you must put them in backward!!! it took me forever to figure this out!
116
+ // createTween(_tweenFrom);
117
+ // createTween(_tweenTo);
118
+
119
+ loadingTweens = true;
120
+ }
121
+
122
+ private var loadingTweens:Boolean = false;
123
+ private var isTweening:Boolean = false;
124
+
125
+ public function createTween(tweenArray:Array):void {
126
+ trace("create tween");
127
+ var tg:TweenGroup;
128
+ if (layoutAlign) {
129
+ if (layoutAlign == TweenGroup.ALIGN_START) {
130
+ trace("layoutAligne = start");
131
+ tg = new TweenGroup();
132
+ tg.align = TweenGroup.ALIGN_SEQUENCE;
133
+ } else {
134
+ _groupTween.align = layoutAlign;
135
+ }
136
+ } else {
137
+ _groupTween.align = TweenGroup.ALIGN_SEQUENCE;
138
+ }
139
+ for (var i:int=0; i < tweenArray.length; i++) {
140
+ var tween:TweenMax;
141
+ if (tweenArray[i].duration == null) {
142
+ tween = TweenMax.to(item, 1, tweenArray[i]);
143
+ } else {
144
+ tween = TweenMax.to(item, tweenArray[i].duration, tweenArray[i]);
145
+ }
146
+ if (layoutAlign == TweenGroup.ALIGN_START) {
147
+ tg.push(tween);
148
+ } else {
149
+ trace("last last group");
150
+ _groupTween.push(tween);
151
+ }
152
+ }
153
+ }
154
+
155
+ private var tweenDirection:String = "to";
156
+
157
+ public function tweenFlip():void{
158
+ trace("TWEEN FLIP, direction = " + tweenDirection);
159
+ switch(tweenDirection){
160
+ case "to":
161
+ tweenDirection = "from";
162
+
163
+ if (setOppositeTween) {
164
+ tweens = [toTween];
165
+ }
166
+ createTween(tweens);
167
+ break;
168
+
169
+ case "from":
170
+ tweenDirection = "to";
171
+ tweens = [fromTween]
172
+ createTween(tweens);
173
+ break;
174
+ }
175
+ }
176
+
177
+ public function prepareTweenGarbageCollector():void {
178
+ if (isTweening) {
179
+ _groupTween.clear();
180
+ isTweening = false;
181
+ }
182
+ if (!loadingTweens) {
183
+ trace("loading tweens");
184
+ var tweenLoadingTimer:Timer = new Timer(100, 1);
185
+ tweenLoadingTimer.addEventListener(TimerEvent.TIMER, prepareToKillTweens);
186
+ tweenLoadingTimer.start();
187
+ } else {
188
+ return;
189
+ }
190
+ }
191
+
192
+ private function prepareToKillTweens(event:TimerEvent):void {
193
+ //_groupTween[_groupTween.length - 1].addEventListener(TweenEvent.COMPLETE, onTweenGroupComplete);
194
+ isTweening = true;
195
+ _groupTween.onComplete = onTweenGroupComplete;
196
+ loadingTweens = false;
197
+ }
198
+
199
+ private function onTweenGroupComplete(event:TweenEvent=null):void {
200
+ _groupTween.clear();
201
+ isTweening = false;
202
+ }
203
+
204
+ private var toTween:Object;
205
+ private var fromTween:Object;
206
+ private var setOppositeTween:Boolean = false;
207
+
208
+ public function onTweenStart(params:Object):void {
209
+ executeParams(params);
210
+ }
211
+
212
+ public function onTweenComplete(params:Object=null):void {
213
+ executeParams(params);
214
+ }
215
+
216
+ /** This is where you define what can be found in that params object */
217
+ public function executeParams(params:Object=null):void {
218
+
219
+ if (params.flipTo) {
220
+ if (!setOppositeTween) {
221
+ toTween = params.tween;
222
+ fromTween = params.flipTo;
223
+ setOppositeTween = true;
224
+ }
225
+ }
226
+ if (params.state && params.view) {
227
+ params.view.currentState = params.state;
228
+ }
229
+
230
+ // But now how do you break the cycle, and get back to it?
231
+ // Say, for example, clicking a plane flips it to back, clicking again to the front
232
+ // Then you run an animation. This destroys the flipping and creates another
233
+ // But then you want to flip the plane by just clicking...
234
+ // To do this, just have an onClick method setting up the params!
235
+
236
+ // add other things here as you see fit.
237
+ }
238
+
239
+ public function addItem(item:DisplayObject):void {
240
+ item.alpha = 0;
241
+ }
242
+
243
+ /* public function removeItem(item:DisplayObject, callback:Function):void
244
+ {
245
+ var token:Object = new Object();
246
+ token.time = 1/4; */
247
+ /*
248
+ token.x = item.x + item.width/2;
249
+ token.y = item.y + item.height/2;
250
+ token.width = 100;
251
+ token.height = 100;
252
+ */
253
+ /* token.alpha = 0;
254
+ token.onComplete = callback;
255
+ token.onCompleteParams = [item];
256
+ Tweener.addTween(item, token);
257
+ } */
258
+
259
+ private function getActualWidth(item:IUIComponent, parameters:Array, ...args):Number { return item.width; }
260
+ private function setActualWidth(item:UIComponent, value:Number, parameters:Array, ...args):void {
261
+ item.setActualSize(value, item.height);
262
+ }
263
+
264
+ private function getActualHeight(item:IUIComponent, parameters:Array, ...args):Number { return item.height; }
265
+ private function setActualHeight(item:IUIComponent, value:Number, parameters:Array, ...args):void {
266
+ item.setActualSize(item.width, value);
267
+ }
268
+ }
269
+ }
@@ -0,0 +1,177 @@
1
+ /*
2
+ * Copyright 2008 (c) Lance Pollard
3
+ * www.systemsofseven.com/blog
4
+ * www.4ddesignlab.com
5
+ * LanceJPollard@gmail.com
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person
8
+ * obtaining a copy of this software and associated documentation
9
+ * files (the "Software"), to deal in the Software without
10
+ * restriction, including without limitation the rights to use,
11
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the
13
+ * Software is furnished to do so, subject to the following
14
+ * conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be
17
+ * included in all copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26
+ * OTHER DEALINGS IN THE SOFTWARE.
27
+ */
28
+
29
+ package com.fourD.cameras
30
+ {
31
+
32
+ import com.fourD.animators.IAnimator;
33
+
34
+ import flash.geom.Matrix3D;
35
+
36
+ import gs.events.TweenEvent;
37
+
38
+ import mx.core.UIComponent;
39
+
40
+ /**
41
+ *
42
+ * @author Lance Pollard - lancejpollard@gmail.com
43
+ */
44
+ public class AstroCamera extends UIComponent {
45
+
46
+ public var isTween:Boolean=false;
47
+ public var isZSortingWhenTween:Boolean=false;
48
+
49
+ /**
50
+ * Now you can tween the entire MainView as a UIComponent!
51
+ * This UIComponent is the "sceneContainer"
52
+ */
53
+ public function AstroCamera() {
54
+ // <Camera scene="mainView.canvas" children="{[every, child, you, need]}"
55
+ // for numChildren of scene, these are all the children (to make sure)
56
+ }
57
+
58
+ /**
59
+ * This should be the MainView...
60
+ * Application.mainView.scene
61
+ * Or in other words: Canvas(container(scene))
62
+ * Then any object in your mainView can be acted on by the Camera3D
63
+ */
64
+ private var _scene:UIComponent
65
+
66
+ [Bindable]
67
+ public function set scene(value:UIComponent):void {
68
+ _scene = value;
69
+ if(!_scene.transform.matrix3D){
70
+ _scene.z = -1;
71
+ _scene.z = 0;
72
+ }
73
+
74
+ zSort();
75
+ }
76
+
77
+ public function get scene():UIComponent {
78
+ return _scene;
79
+ }
80
+
81
+ private var _animator:IAnimator; [Bindable]
82
+ public function get animator():IAnimator { return _animator; }
83
+ public function set animator(value:IAnimator):void {
84
+ _animator = value;
85
+ }
86
+
87
+ private var _zSortDuringTween:Boolean;
88
+
89
+ public function set zSortDuringTween(value:Boolean):void {
90
+ _zSortDuringTween = value;
91
+ }
92
+
93
+ public function get zSortDuringTween():Boolean {
94
+ return _zSortDuringTween;
95
+ }
96
+
97
+ public function zSort():void {
98
+ var childs:Array = new Array();
99
+ var i:uint;
100
+
101
+ for(i=0; i < _scene.numChildren; i++) {
102
+ childs.push(_scene.getChildAt(i));
103
+ }
104
+
105
+ var child:UIComponent;
106
+ var matrix:Matrix3D;
107
+ var childsAndZ:Array = new Array();
108
+
109
+ for(i=0; i < childs.length; i++) {
110
+ child = childs[i];
111
+ if(!child.transform.matrix3D) { continue; }
112
+
113
+ matrix = child.transform.matrix3D.clone();
114
+ matrix.append(_scene.transform.matrix3D);
115
+
116
+ childsAndZ.push({z:matrix.position.z, child:child});
117
+ _scene.removeChild(child);
118
+
119
+ }
120
+ childsAndZ.sortOn('z', Array.NUMERIC);
121
+ childsAndZ.reverse();
122
+
123
+ for(i=0; i < childsAndZ.length; i++) {
124
+ child = childsAndZ[i].child;
125
+ (scene as UIComponent).addChild(child);
126
+ }
127
+ }
128
+
129
+ private var _lookAtTweens:Array;
130
+
131
+ public function set lookAtTweens(value:Array):void {
132
+ _lookAtTweens = null;
133
+ _lookAtTweens = new Array();
134
+ }
135
+
136
+ public function get lookAtTweens():Array {
137
+ return _lookAtTweens;
138
+ }
139
+
140
+ public function set lookAtTweenParams(value:Array):void {
141
+
142
+ }
143
+
144
+ public function lookAt(targetDisplay:UIComponent):void {
145
+ // if(targetDisplay.parent! = _scene) {
146
+ // throw new Error('Passed "targetDisplay" UIComponent must be child of camera scene');
147
+ // }
148
+
149
+ _scene.transform.matrix3D.interpolateTo(targetDisplay.transform.matrix3D, 1);
150
+ _scene.transform.matrix3D.invert();
151
+
152
+ zSort();
153
+
154
+ if(!lookAtTweens) {
155
+
156
+ animator.tween([{x:_scene.x,
157
+ y:_scene.y,
158
+ z:_scene.z,
159
+ rotationX:_scene.rotationX,
160
+ rotationY:_scene.rotationY,
161
+ rotationZ:_scene.rotationZ,
162
+ onUpdate:setZSorting}], null, _scene);
163
+
164
+ } else {
165
+ lookAtTweens.onUpdate = setZSorting;
166
+ //anim.createTween(_scene, lookAtTweens);
167
+ }
168
+ }
169
+
170
+ protected function setZSorting(event:TweenEvent):void {
171
+ if(zSortDuringTween) {
172
+ zSort();
173
+ }
174
+ }
175
+
176
+ }
177
+ }
@@ -0,0 +1,105 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <view:FourDItem xmlns:view="com.themorphicgroup.view.*" xmlns:local="*"
3
+ width="200" height="300" xmlns:ns="http://ns.adobe.com/mxml/2009">
4
+ <ns:Script>
5
+ <![CDATA[
6
+ // import com.themorphicgroup.vo.PhotoVO;
7
+ public var clickFunction:Function;
8
+ import gs.TweenMax;
9
+
10
+ // [Bindable]private var photo:PhotoVO;
11
+ [Bindable]
12
+ private var photo:Object = new Object();
13
+ photo.photoTitle = "LANCE";
14
+
15
+ override public function set data(value:Object):void {
16
+ super.data = value;
17
+ // if (value is PhotoVO) {
18
+ // photo = PhotoVO(value);
19
+ // }
20
+ }
21
+
22
+ private function rollOver(event:MouseEvent):void {
23
+ TweenMax.to(event.target, 1, {rotationX:-50});
24
+ TweenMax.to(event.target, 2, {delay:1, rotationX:0});
25
+ }
26
+
27
+ ]]>
28
+ </ns:Script>
29
+ <view:front>
30
+ <ns:Group id="group" width="200" height="300">
31
+ <view:FourDItem id="column" width="{group.width/2}" pivotX="center" pivotY="center">
32
+ <view:front>
33
+ <ns:Group>
34
+ <ns:layout>
35
+ <ns:VerticalLayout/>
36
+ </ns:layout>
37
+ <view:FourDItem id="row" pivotX="center" pivotY="bottom">
38
+ <view:front>
39
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
40
+ </view:front>
41
+ </view:FourDItem>
42
+ <view:FourDItem id="row2" pivotX="center" pivotY="bottom">
43
+ <view:front>
44
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
45
+ </view:front>
46
+ </view:FourDItem>
47
+ <view:FourDItem id="row3" pivotX="center" pivotY="bottom">
48
+ <view:front>
49
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
50
+ </view:front>
51
+ </view:FourDItem>
52
+ <view:FourDItem id="row4" pivotX="center" pivotY="bottom">
53
+ <view:front>
54
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
55
+ </view:front>
56
+ </view:FourDItem>
57
+ <view:FourDItem id="row5" pivotX="center" pivotY="bottom">
58
+ <view:front>
59
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
60
+ </view:front>
61
+ </view:FourDItem>
62
+ </ns:Group>
63
+ </view:front>
64
+ </view:FourDItem>
65
+ <view:FourDItem x="{group.width/2}" width="{group.width/2}" id="column2" pivotX="center" pivotY="center">
66
+ <view:front>
67
+ <ns:Group>
68
+ <ns:layout>
69
+ <ns:VerticalLayout/>
70
+ </ns:layout>
71
+ <view:FourDItem id="row6" pivotX="center" pivotY="bottom">
72
+ <view:front>
73
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
74
+ </view:front>
75
+ </view:FourDItem>
76
+ <view:FourDItem id="row7" pivotX="center" pivotY="bottom">
77
+ <view:front>
78
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
79
+ </view:front>
80
+ </view:FourDItem>
81
+ <view:FourDItem id="row8" pivotX="center" pivotY="bottom">
82
+ <view:front>
83
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
84
+ </view:front>
85
+ </view:FourDItem>
86
+ <view:FourDItem id="row9" pivotX="center" pivotY="bottom">
87
+ <view:front>
88
+ <ns:Button rollOver="rollOver(event)" label="{photo.photoTitle}" width="100" height="{group.height/5}"/>
89
+ </view:front>
90
+ </view:FourDItem>
91
+ <view:FourDItem id="row10" pivotX="center" pivotY="bottom">
92
+ <view:front>
93
+ <ns:Image source="Photo 5.jpg" width="200" height="{group.width/5}"/>
94
+ </view:front>
95
+ </view:FourDItem>
96
+ </ns:Group>
97
+ </view:front>
98
+ </view:FourDItem>
99
+ </ns:Group>
100
+ </view:front>
101
+ <view:pivotX>center</view:pivotX>
102
+ <view:pivotY>center</view:pivotY>
103
+
104
+
105
+ </view:FourDItem>
@@ -0,0 +1,54 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <view:FourDItem xmlns:view="com.themorphicgroup.view.*" xmlns:local="*"
3
+ width="100" height="100" xmlns:ns="http://ns.adobe.com/mxml/2009"
4
+ tweens="{[{rotationY:720, rotationZ:100}]}">
5
+ <ns:Script>
6
+ <![CDATA[
7
+ // import com.themorphicgroup.vo.PhotoVO;
8
+ public var clickFunction:Function;
9
+ import gs.TweenMax;
10
+
11
+ // [Bindable]private var photo:PhotoVO;
12
+ [Bindable]
13
+ private var photo:Object = new Object();
14
+ photo.photoTitle = "LANCE POLLARD";
15
+
16
+ override public function set data(value:Object):void {
17
+ super.data = value;
18
+ // if (value is PhotoVO) {
19
+ // photo = PhotoVO(value);
20
+ // }
21
+ }
22
+
23
+
24
+ protected function canvas1_mouseOverHandler(event:MouseEvent):void
25
+ {
26
+ this.setStyle("backgroundColor",0xfff55d);
27
+ // TweenMax.to(this, 1, {rotationX:180});
28
+ }
29
+
30
+ private function click():void {
31
+ //TweenMax.to(this.parent, 4, {rotationY:360});
32
+ this.tween();
33
+ }
34
+
35
+
36
+ protected function canvas1_mouseOutHandler(event:MouseEvent):void
37
+ {
38
+ this.setStyle("backgroundColor",0xf8f8f8);
39
+ }
40
+
41
+ ]]>
42
+ </ns:Script>
43
+ <view:front>
44
+ <ns:Canvas width="200" height="300">
45
+ <ns:Button rollOver="canvas1_mouseOverHandler(event)" click="click()" id="but" width="200" height="300"/>
46
+ <ns:Label text="{photo.photoTitle}" horizontalCenter="0" verticalCenter="0"/>
47
+ <local:RevealBox width="{but.width}" height="{but.height}"/>
48
+ </ns:Canvas>
49
+ </view:front>
50
+ <view:pivotX>center</view:pivotX>
51
+ <view:pivotY>center</view:pivotY>
52
+
53
+
54
+ </view:FourDItem>
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Copyright 2008 (c) Lance Pollard
3
+ * www.systemsofseven.com/blog
4
+ * www.4ddesignlab.com
5
+ * LanceJPollard@gmail.com
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person
8
+ * obtaining a copy of this software and associated documentation
9
+ * files (the "Software"), to deal in the Software without
10
+ * restriction, including without limitation the rights to use,
11
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the
13
+ * Software is furnished to do so, subject to the following
14
+ * conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be
17
+ * included in all copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26
+ * OTHER DEALINGS IN THE SOFTWARE.
27
+ */
28
+
29
+ package com.fourD.core
30
+ {
31
+
32
+ import flash.display.DisplayObject;
33
+ import flash.events.Event;
34
+ import flash.geom.PerspectiveProjection;
35
+ import flash.geom.Point;
36
+
37
+ public class CenterPerspectiveProjection extends EventDispatcher {
38
+
39
+ private var root:DisplayObject;
40
+
41
+ public function CenterPerspectiveProjection(root:DisplayObject) {
42
+ this.root = root;
43
+ }
44
+
45
+ protected function updateStageAlign():void {
46
+ var pp:PerspectiveProjection = root.transform.perspectiveProjection;
47
+ pp.projectionCenter = new Point(root.stage.stageWidth/2, root.stage.stageHeight/2);
48
+ root.transform.perspectiveProjection = pp;
49
+ }
50
+
51
+ static public function setCenterOn(root:DisplayObject):void {
52
+ if(!root.transform.perspectiveProjection){
53
+ throw new Error('Passed root object must have perspectiveProjection (root.transform.perspectiveProjection)');
54
+ }
55
+
56
+ updateStageAlign();
57
+ }
58
+
59
+ static public function updateOnResize():void {
60
+ updateStageAlign();
61
+ root.stage.addEventListener(Event.RESIZE, onStageResize);
62
+ }
63
+
64
+ static public function disableUpdateOnResize():void {
65
+ root.stage.removeEventListener(Event.RESIZE, onStageResize);
66
+ }
67
+
68
+ protected function onStageResize(event:Event):void {
69
+ updateStageAlign();
70
+ }
71
+ }
72
+ }