emergent-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.bnsignore +16 -0
- data/History.txt +4 -0
- data/Manifest.txt +348 -0
- data/README.rdoc +47 -0
- data/Rakefile +39 -0
- data/app_generators/emergent_core/USAGE +5 -0
- data/app_generators/emergent_core/emergent_core_generator.rb +73 -0
- data/app_generators/emergent_core/templates/core/actionscript.properties +16 -0
- data/app_generators/emergent_core/templates/core/actionscriptair.properties +16 -0
- data/app_generators/emergent_core/templates/core/app.yaml.erb +12 -0
- data/app_generators/emergent_core/templates/core/default_tasks.rake +51 -0
- data/app_generators/emergent_core/templates/core/empty.txt +0 -0
- data/app_generators/emergent_core/templates/core/expressInstall.swf +0 -0
- data/app_generators/emergent_core/templates/core/flex.properties +2 -0
- data/app_generators/emergent_core/templates/core/generate.rb +17 -0
- data/app_generators/emergent_core/templates/core/html-template/AC_OETags.js +276 -0
- data/app_generators/emergent_core/templates/core/html-template/history/history.css +6 -0
- data/app_generators/emergent_core/templates/core/html-template/history/history.js +645 -0
- data/app_generators/emergent_core/templates/core/html-template/history/historyFrame.html +29 -0
- data/app_generators/emergent_core/templates/core/html-template/index.template.html +121 -0
- data/app_generators/emergent_core/templates/core/html-template/playerProductInstall.swf +0 -0
- data/app_generators/emergent_core/templates/core/index.html.erb +18 -0
- data/app_generators/emergent_core/templates/core/index.yaml +11 -0
- data/app_generators/emergent_core/templates/core/mainair-app.xml +134 -0
- data/app_generators/emergent_core/templates/core/mainapp-config.xml +21 -0
- data/app_generators/emergent_core/templates/core/mainapp.mxml +106 -0
- data/app_generators/emergent_core/templates/core/project-textmate.erb +52 -0
- data/app_generators/emergent_core/templates/core/project.properties +18 -0
- data/app_generators/emergent_core/templates/core/projectair.properties +24 -0
- data/app_generators/emergent_core/templates/core/swfobject.js +5 -0
- data/bin/emergent +17 -0
- data/lib/emergent_core.rb +49 -0
- data/lib/restfulx/active_foo.rb +194 -0
- data/lib/restfulx/active_record_tasks.rb +81 -0
- data/lib/restfulx/configuration.rb +76 -0
- data/lib/restfulx/datamapper_foo.rb +31 -0
- data/lib/restfulx/rails/recipes.rb +60 -0
- data/lib/restfulx/rails/swf_helper.rb +60 -0
- data/lib/restfulx/tasks.rb +85 -0
- data/lib/restfulx.rb +117 -0
- data/rails_generators/emergent_cms/USAGE +5 -0
- data/rails_generators/emergent_cms/emergent_cms_generator.rb +21 -0
- data/rails_generators/emergent_cms/templates/PagesEditModel.as +114 -0
- data/rails_generators/emergent_cms/templates/PagesEditView.mxml +102 -0
- data/rails_generators/emergent_config/USAGE +5 -0
- data/rails_generators/emergent_config/emergent_config_generator.rb +330 -0
- data/rails_generators/emergent_config/templates/app/controllers/accounts_controller.rb +104 -0
- data/rails_generators/emergent_config/templates/app/controllers/addresses_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/controllers/application.rb +26 -0
- data/rails_generators/emergent_config/templates/app/controllers/assets_controller.rb +1 -0
- data/rails_generators/emergent_config/templates/app/controllers/content_assignments_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/controllers/contents_controller.rb +114 -0
- data/rails_generators/emergent_config/templates/app/controllers/sessions_controller.rb +72 -0
- data/rails_generators/emergent_config/templates/app/controllers/sites_controller.rb +1 -0
- data/rails_generators/emergent_config/templates/app/controllers/users_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/ICommand.as +16 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/Undoable.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/UpdateDocumentCommand.as +73 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/DocumentEvent.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/NavigationEvent.as +31 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/ResourceEvent.as +27 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/UndoEvent.as +36 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AboutUsManager.as +15 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AccountManager.as +31 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AuthenticationManager.as +76 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ContentManager.as +92 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentManager.as +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentsManager.as +156 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/HomeManager.as +18 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/MainManager.as +23 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/PagesManager.as +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ResourceManager.as +195 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/SiteManager.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/UndoManager.as +143 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentMap.mxml +123 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentsMap.mxml +134 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ManagerPresentationModelMap.mxml +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ObjectMap.mxml +75 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresentationModelViewMap.mxml +81 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresenterViewMap.mxml +67 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/DocumentType.as +52 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/Resource.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceAction.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceResult.as +8 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Account.as +32 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Address.as +26 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Asset.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/AssetAssignment.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Content.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/ContentAssignment.as +33 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Document.as +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/PlainDocument.as +19 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/RichDocument.as +19 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Session.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Snapshot.as +21 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/User.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentFactory.as +61 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentViewFactory.as +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/ResourceFactory.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AboutUsModel.as +22 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AccountModel.as +68 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AuthenticationModel.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContactUsModel.as +45 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContentModel.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentModel.as +235 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentsModel.as +169 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/HomeModel.as +23 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/MainModel.as +35 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/PagesModel.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ProfileModel.as +99 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ResourceModel.as +100 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/about_us/about_us.mxml +105 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/account/account.mxml +97 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/contact_us/contact_us.mxml +65 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/document.mxml +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/documents.mxml +201 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/plain_document.mxml +9 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/rich_document.mxml +12 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/gallery/gallery.mxml +37 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home.mxml +58 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_presenter.as +81 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_troparchy.mxml +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/login/login.mxml +50 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main.mxml +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_presenter.as +166 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_troparchy.mxml +74 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_view.mxml +48 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_view.mxml +43 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_view.mxml +47 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_view.mxml +49 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_presenter.as +63 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_troparchy.mxml +63 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_view.mxml +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages.mxml +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_presenter.as +83 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_troparchy.mxml +62 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/profile/profile.mxml +73 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Bold.otf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Regular.otf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/html/lorem.html +3 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture10.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture11.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture12.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture13.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture14.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture3.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture4.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture5.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture6.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture7.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture8.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture9.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_0.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_180.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_270.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_90.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_bottom.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_top.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/itunes7Bg.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukebox.css +764 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukeboxGfx.swf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidian.css +734 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianBg.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianGfx.swf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/LayoutAction.as +377 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/SimpleLayoutAction.as +210 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/FourDTweenCollection.mxml +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/IAnimator.as +39 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/TweenMaxAnimator.as +269 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/cameras/AstroCamera.as +177 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDDataGrid.mxml +105 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDItemRenderer.mxml +54 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/CenterPerspectiveProjection.as +72 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ComplexCondition.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ConditionsUtil.as +82 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/FourDComponent.as +309 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstanceMethodInvoker.as +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstancePropertyInjector.as +43 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/MethodCaller.as +51 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pathway.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PathwayEvent.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron.as +34 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron2.as +41 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PheronReceptor.as +125 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Properties.as +57 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Router.as +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/RouterUtil.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleCondition.as +42 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSortVO.as +1 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSorter.as +1 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton2.as +234 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonCache.as +111 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonEvent.as +39 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap.as +515 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap2.as +289 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMapSample.mxml +73 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonReceptor.as +43 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScope.as +38 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScopeProperties.as +18 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonUtils.as +51 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/events/LayoutActionEvent.as +75 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CarouselLayout.as +85 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CircleLayout.as +102 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CoverFlowLayout.as +136 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/FourDLayout.as +272 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/utils/TweenUtil.as +110 -0
- data/rails_generators/emergent_config/templates/app/helpers/accounts_helper.rb +93 -0
- data/rails_generators/emergent_config/templates/app/helpers/application_helper.rb +3 -0
- data/rails_generators/emergent_config/templates/app/models/account.rb +84 -0
- data/rails_generators/emergent_config/templates/app/models/account_mailer.rb +24 -0
- data/rails_generators/emergent_config/templates/app/models/account_observer.rb +17 -0
- data/rails_generators/emergent_config/templates/app/models/address.rb +2 -0
- data/rails_generators/emergent_config/templates/app/models/asset.rb +6 -0
- data/rails_generators/emergent_config/templates/app/models/asset_assignment.rb +4 -0
- data/rails_generators/emergent_config/templates/app/models/category.rb +35 -0
- data/rails_generators/emergent_config/templates/app/models/comment.rb +98 -0
- data/rails_generators/emergent_config/templates/app/models/content.rb +89 -0
- data/rails_generators/emergent_config/templates/app/models/content_assignment.rb +21 -0
- data/rails_generators/emergent_config/templates/app/models/image.rb +3 -0
- data/rails_generators/emergent_config/templates/app/models/post.rb +76 -0
- data/rails_generators/emergent_config/templates/app/models/section.rb +97 -0
- data/rails_generators/emergent_config/templates/app/models/site.rb +1 -0
- data/rails_generators/emergent_config/templates/app/models/tag.rb +1 -0
- data/rails_generators/emergent_config/templates/app/models/user.rb +4 -0
- data/rails_generators/emergent_config/templates/app/views/account_mailer/activation.erb +3 -0
- data/rails_generators/emergent_config/templates/app/views/account_mailer/signup_notification.erb +8 -0
- data/rails_generators/emergent_config/templates/config/Capfile +4 -0
- data/rails_generators/emergent_config/templates/config/README.txt +18 -0
- data/rails_generators/emergent_config/templates/config/deploy.rb +36 -0
- data/rails_generators/emergent_config/templates/config/routes.rb +72 -0
- data/rails_generators/emergent_config/templates/core/actionscript.properties +16 -0
- data/rails_generators/emergent_config/templates/core/actionscriptair.properties +16 -0
- data/rails_generators/emergent_config/templates/core/app.yaml.erb +12 -0
- data/rails_generators/emergent_config/templates/core/default_tasks.rake +51 -0
- data/rails_generators/emergent_config/templates/core/emergent_tasks.rake +42 -0
- data/rails_generators/emergent_config/templates/core/empty.txt +0 -0
- data/rails_generators/emergent_config/templates/core/expressInstall.swf +0 -0
- data/rails_generators/emergent_config/templates/core/flex.properties +2 -0
- data/rails_generators/emergent_config/templates/core/generate.rb +17 -0
- data/rails_generators/emergent_config/templates/core/html-template/AC_OETags.js +276 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/history.css +6 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/history.js +645 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/historyFrame.html +29 -0
- data/rails_generators/emergent_config/templates/core/html-template/index.template.html +121 -0
- data/rails_generators/emergent_config/templates/core/html-template/playerProductInstall.swf +0 -0
- data/rails_generators/emergent_config/templates/core/index.html.erb +18 -0
- data/rails_generators/emergent_config/templates/core/index.yaml +11 -0
- data/rails_generators/emergent_config/templates/core/mainair-app.xml +134 -0
- data/rails_generators/emergent_config/templates/core/mainapp-config.xml +21 -0
- data/rails_generators/emergent_config/templates/core/mainapp.mxml +101 -0
- data/rails_generators/emergent_config/templates/core/project-textmate.erb +52 -0
- data/rails_generators/emergent_config/templates/core/project.properties +18 -0
- data/rails_generators/emergent_config/templates/core/projectair.properties +24 -0
- data/rails_generators/emergent_config/templates/core/restfulx.yml +14 -0
- data/rails_generators/emergent_config/templates/core/restfulx_tasks.rake +6 -0
- data/rails_generators/emergent_config/templates/core/swfobject.js +5 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_accounts.rb +40 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_addresses.rb +18 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_asset_assignments.rb +19 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_assets.rb +20 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_content_assignments.rb +26 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_contents.rb +21 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_sessions.rb +16 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_sites.rb +27 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_users.rb +15 -0
- data/rails_generators/emergent_config/templates/lib/analytics.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/app_controller.rb.erb +26 -0
- data/rails_generators/emergent_config/templates/lib/as3corelib-0.92.1.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3crypto-1.3patched.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3crypto.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3ds-1.04.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3httpclientlib-1.0.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/authenticated_system.rb +189 -0
- data/rails_generators/emergent_config/templates/lib/authenticated_test_helper.rb +11 -0
- data/rails_generators/emergent_config/templates/lib/containerEx.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flare.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flash_session_hack.rb +27 -0
- data/rails_generators/emergent_config/templates/lib/flex2BrowserManager.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flexlib.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/fluint.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/mate_0_8_6_enhanced.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/openflux.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/pv3d.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/restfulx.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/site_keys.rb +38 -0
- data/rails_generators/emergent_config/templates/lib/tweenMax.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/urlkitFlex3.swc +0 -0
- data/rails_generators/emergent_config/templates/shell_script +31 -0
- data/rails_generators/emergent_controller/USAGE +5 -0
- data/rails_generators/emergent_controller/emergent_controller_generator.rb +25 -0
- data/rails_generators/emergent_controller/templates/controller.as.erb +37 -0
- data/rails_generators/emergent_core/USAGE +5 -0
- data/rails_generators/emergent_core/emergent_core_generator.rb +157 -0
- data/rails_generators/emergent_iphone/USAGE +5 -0
- data/rails_generators/emergent_iphone/emergent_iphone_generator.rb +27 -0
- data/rails_generators/emergent_scaffold/USAGE +5 -0
- data/rails_generators/emergent_scaffold/emergent_scaffold_generator.rb +157 -0
- data/rails_generators/emergent_scaffold/templates/component.mxml.erb +101 -0
- data/rails_generators/emergent_scaffold/templates/controller.rb.erb +101 -0
- data/rails_generators/emergent_scaffold/templates/edit_index_view.mxml.erb +114 -0
- data/rails_generators/emergent_scaffold/templates/edit_show_view.mxml.erb +84 -0
- data/rails_generators/emergent_scaffold/templates/filter_view.mxml.erb +1 -0
- data/rails_generators/emergent_scaffold/templates/fixtures.yml.erb +128 -0
- data/rails_generators/emergent_scaffold/templates/index_view.mxml.erb +58 -0
- data/rails_generators/emergent_scaffold/templates/item_renderer.mxml.erb +53 -0
- data/rails_generators/emergent_scaffold/templates/manager.as.erb +31 -0
- data/rails_generators/emergent_scaffold/templates/migration.rb.erb +22 -0
- data/rails_generators/emergent_scaffold/templates/model.as.erb +42 -0
- data/rails_generators/emergent_scaffold/templates/model.rb.erb +11 -0
- data/rails_generators/emergent_scaffold/templates/presentation_model.as.erb +33 -0
- data/rails_generators/emergent_scaffold/templates/presenter.as.erb +98 -0
- data/rails_generators/emergent_scaffold/templates/show_view.mxml.erb +50 -0
- data/rails_generators/emergent_scaffold/templates/view_map.mxml.erb +40 -0
- data/rails_generators/emergent_scaffold/templates/views_panel.mxml.erb +64 -0
- data/rails_generators/emergent_styler/USAGE +5 -0
- data/rails_generators/emergent_styler/emergent_styler_generator.rb +21 -0
- data/rails_generators/rx_yaml_scaffold/USAGE +51 -0
- data/rails_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb +49 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/emergent_core_spec.rb +7 -0
- data/spec/spec_helper.rb +16 -0
- data/tasks/ann.rake +80 -0
- data/tasks/bones.rake +20 -0
- data/tasks/gem.rake +201 -0
- data/tasks/git.rake +40 -0
- data/tasks/manifest.rake +48 -0
- data/tasks/notes.rake +27 -0
- data/tasks/post_load.rake +39 -0
- data/tasks/rdoc.rake +50 -0
- data/tasks/rubyforge.rake +55 -0
- data/tasks/setup.rb +279 -0
- data/tasks/spec.rake +54 -0
- data/tasks/svn.rake +47 -0
- data/tasks/test.rake +40 -0
- data/test/test_emergent_core.rb +0 -0
- data/test/test_emergent_iphone_generator.rb +46 -0
- data/test/test_generator_helper.rb +29 -0
- metadata +437 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,377 @@
|
|
|
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.actions
|
|
30
|
+
{
|
|
31
|
+
import com.fourD.animators.IAnimator;
|
|
32
|
+
import com.fourD.core.FourDComponent;
|
|
33
|
+
import com.fourD.events.LayoutActionEvent;
|
|
34
|
+
import com.fourD.layouts.FourDLayout;
|
|
35
|
+
|
|
36
|
+
import flash.display.DisplayObject;
|
|
37
|
+
import flash.events.Event;
|
|
38
|
+
import flash.events.EventDispatcher;
|
|
39
|
+
import flash.events.MouseEvent;
|
|
40
|
+
|
|
41
|
+
import mx.components.baseClasses.GroupBase;
|
|
42
|
+
|
|
43
|
+
import com.fourD.core.SimpleZSorter;
|
|
44
|
+
|
|
45
|
+
public class LayoutAction extends EventDispatcher
|
|
46
|
+
{
|
|
47
|
+
protected var token:Object;
|
|
48
|
+
|
|
49
|
+
public var preferredLayoutElementWidth:Number;
|
|
50
|
+
public var preferredLayoutElementHeight:Number;
|
|
51
|
+
public var selectedIndex:int;
|
|
52
|
+
public var selectedChild:DisplayObject;
|
|
53
|
+
|
|
54
|
+
public const INTRO:String = "introLayoutAction";
|
|
55
|
+
public const AMBIENT:String = "ambientLayoutAction";
|
|
56
|
+
public const ITEM_SELECTED:String = "itemSelectedLayoutAction";
|
|
57
|
+
public const ITEM_DESELECTED:String = "itemDeselectedLayoutAction";
|
|
58
|
+
public const OUTRO:String = "outroLayoutAction";
|
|
59
|
+
|
|
60
|
+
[Bindable] public var mouseMoveEnabled:Boolean;
|
|
61
|
+
[Inspectable(defaultValue="true", enumeration="true,false")]
|
|
62
|
+
[Bindable] public var ambientActiveDuringItemSelection:Boolean = true;
|
|
63
|
+
|
|
64
|
+
protected var introActionUsed:Boolean;
|
|
65
|
+
protected var ambientActionUsed:Boolean;
|
|
66
|
+
protected var itemSelectedActionUsed:Boolean;
|
|
67
|
+
protected var itemDeselectedActionUsed:Boolean;
|
|
68
|
+
protected var outroActionUsed:Boolean;
|
|
69
|
+
|
|
70
|
+
protected var introActionActive:Boolean;
|
|
71
|
+
protected var ambientActionActive:Boolean;
|
|
72
|
+
protected var itemSelectedActionActive:Boolean;
|
|
73
|
+
protected var itemDeselectedActionActive:Boolean;
|
|
74
|
+
protected var outroActionActive:Boolean;
|
|
75
|
+
|
|
76
|
+
private var _activeActions:Array; [Bindable]
|
|
77
|
+
public function get activeActions():Array { return _activeActions; }
|
|
78
|
+
public function set activeActions(value:Array):void {
|
|
79
|
+
_activeActions = value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private var _usedActions:Array; [Bindable]
|
|
83
|
+
public function get usedActions():Array { return _usedActions; }
|
|
84
|
+
public function set usedActions(value:Array):void {
|
|
85
|
+
_usedActions = value;
|
|
86
|
+
|
|
87
|
+
attachActionHandlers();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private var _layout:FourDLayout; [Bindable]
|
|
91
|
+
public function get layout():FourDLayout { return _layout; }
|
|
92
|
+
public function set layout(value:FourDLayout):void {
|
|
93
|
+
_layout = value;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private var _animator:IAnimator; [Bindable]
|
|
97
|
+
public function get animator():IAnimator { return _animator; }
|
|
98
|
+
public function set animator(value:IAnimator):void {
|
|
99
|
+
_animator = value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
private var _target:GroupBase; [Bindable]
|
|
103
|
+
public function get target():GroupBase { return _target; }
|
|
104
|
+
public function set target(value:GroupBase):void {
|
|
105
|
+
_target = value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
private var _container:FourDComponent; [Bindable]
|
|
109
|
+
public function get container():FourDComponent { return _container; }
|
|
110
|
+
public function set container(value:FourDComponent):void {
|
|
111
|
+
_container = value;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
public function LayoutAction() {
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private function attachActionHandlers():void {
|
|
118
|
+
var i:int=0;
|
|
119
|
+
var len:int = usedActions.length;
|
|
120
|
+
for (i; i < len; i++) {
|
|
121
|
+
if (usedActions[i] == INTRO) {
|
|
122
|
+
introActionUsed = true;
|
|
123
|
+
this.addEventListener(LayoutActionEvent.INTRO_START, handleLayoutActionEvents);
|
|
124
|
+
this.addEventListener(LayoutActionEvent.INTRO_END, handleLayoutActionEvents);
|
|
125
|
+
this.addEventListener(LayoutActionEvent.INTRO_COMPLETE, handleLayoutActionEvents);
|
|
126
|
+
}
|
|
127
|
+
if (usedActions[i] == AMBIENT) {
|
|
128
|
+
ambientActionUsed = true;
|
|
129
|
+
this.addEventListener(LayoutActionEvent.AMBIENT_START, handleLayoutActionEvents);
|
|
130
|
+
this.addEventListener(LayoutActionEvent.AMBIENT_END, handleLayoutActionEvents);
|
|
131
|
+
this.addEventListener(LayoutActionEvent.AMBIENT_COMPLETE, handleLayoutActionEvents);
|
|
132
|
+
}
|
|
133
|
+
if (usedActions[i] == ITEM_SELECTED) {
|
|
134
|
+
itemSelectedActionUsed = true;
|
|
135
|
+
this.addEventListener(LayoutActionEvent.ITEM_SELECTED_START, handleLayoutActionEvents);
|
|
136
|
+
this.addEventListener(LayoutActionEvent.ITEM_SELECTED_END, handleLayoutActionEvents);
|
|
137
|
+
this.addEventListener(LayoutActionEvent.ITEM_SELECTED_COMPLETE, handleLayoutActionEvents);
|
|
138
|
+
}
|
|
139
|
+
if (usedActions[i] == ITEM_DESELECTED) {
|
|
140
|
+
itemDeselectedActionUsed = true;
|
|
141
|
+
this.addEventListener(LayoutActionEvent.ITEM_DESELECTED_START, handleLayoutActionEvents);
|
|
142
|
+
this.addEventListener(LayoutActionEvent.ITEM_DESELECTED_END, handleLayoutActionEvents);
|
|
143
|
+
this.addEventListener(LayoutActionEvent.ITEM_DESELECTED_COMPLETE, handleLayoutActionEvents);
|
|
144
|
+
}
|
|
145
|
+
if (usedActions[i] == OUTRO) {
|
|
146
|
+
outroActionUsed = true;
|
|
147
|
+
this.addEventListener(LayoutActionEvent.OUTRO_START, handleLayoutActionEvents);
|
|
148
|
+
this.addEventListener(LayoutActionEvent.OUTRO_END, handleLayoutActionEvents);
|
|
149
|
+
this.addEventListener(LayoutActionEvent.OUTRO_COMPLETE, handleLayoutActionEvents);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
this.addEventListener(LayoutActionEvent.LAYOUT_START, handleLayoutActionEvents);
|
|
153
|
+
this.addEventListener(LayoutActionEvent.LAYOUT_COMPLETE, handleLayoutActionEvents);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
protected function handleLayoutActionEvents(event:LayoutActionEvent):void {
|
|
157
|
+
var eventType:String = event.type;
|
|
158
|
+
|
|
159
|
+
// The layoutComplete event is dispatched at the end of the first pass of
|
|
160
|
+
// layout.updateDisplayList(w, h). It allows you to start your action animation cycle.
|
|
161
|
+
if (eventType == LayoutActionEvent.LAYOUT_START) {
|
|
162
|
+
if (INTRO) {
|
|
163
|
+
introStart();
|
|
164
|
+
} else {
|
|
165
|
+
layoutStart();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (eventType == LayoutActionEvent.LAYOUT_COMPLETE) {
|
|
169
|
+
dispatchLayoutActionEvent(LayoutActionEvent.INTRO_START);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Intro events
|
|
173
|
+
if (eventType == LayoutActionEvent.INTRO_START) {
|
|
174
|
+
introActionActive = true;
|
|
175
|
+
introStart();
|
|
176
|
+
}
|
|
177
|
+
if (eventType == LayoutActionEvent.INTRO_END) {
|
|
178
|
+
introEnd();
|
|
179
|
+
}
|
|
180
|
+
if (eventType == LayoutActionEvent.INTRO_COMPLETE) {
|
|
181
|
+
introActionActive = false;
|
|
182
|
+
dispatchLayoutActionEvent(LayoutActionEvent.AMBIENT_START);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Ambient events
|
|
186
|
+
if (eventType == LayoutActionEvent.AMBIENT_START) {
|
|
187
|
+
ambientActionActive = true;
|
|
188
|
+
ambientStart();
|
|
189
|
+
}
|
|
190
|
+
if (eventType == LayoutActionEvent.AMBIENT_END) {
|
|
191
|
+
ambientActionActive = true;
|
|
192
|
+
ambientEnd();
|
|
193
|
+
}
|
|
194
|
+
if (eventType == LayoutActionEvent.AMBIENT_COMPLETE) {
|
|
195
|
+
ambientActionActive = false;
|
|
196
|
+
if (itemSelectedActionActive) {
|
|
197
|
+
// could redispatch the event, but that might be expensive
|
|
198
|
+
// so instead we'll just hardwire all the methods throughout for now.
|
|
199
|
+
// dispatchLayoutActionEvent(LayoutActionEvent.INTRO_START);
|
|
200
|
+
itemSelectedStart();
|
|
201
|
+
} else if (outroActionActive) {
|
|
202
|
+
outroStart();
|
|
203
|
+
} else {
|
|
204
|
+
itemSelectedStart();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Item selected events
|
|
209
|
+
if (eventType == LayoutActionEvent.ITEM_SELECTED_START) {
|
|
210
|
+
itemSelectedActionActive = true;
|
|
211
|
+
if (ambientActionActive) {
|
|
212
|
+
if (ambientActiveDuringItemSelection) {
|
|
213
|
+
itemSelectedStart();
|
|
214
|
+
} else {
|
|
215
|
+
dispatchLayoutActionEvent(LayoutActionEvent.AMBIENT_END);
|
|
216
|
+
}
|
|
217
|
+
} else if (introActionActive) {
|
|
218
|
+
dispatchLayoutActionEvent(LayoutActionEvent.INTRO_END);
|
|
219
|
+
} else {
|
|
220
|
+
itemSelectedStart();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
if (eventType == LayoutActionEvent.ITEM_SELECTED_END) {
|
|
224
|
+
itemSelectedEnd();
|
|
225
|
+
}
|
|
226
|
+
if (eventType == LayoutActionEvent.ITEM_SELECTED_COMPLETE) {
|
|
227
|
+
itemSelectedActionActive = false;
|
|
228
|
+
if (itemDeselectedActionUsed) {
|
|
229
|
+
target.stage.addEventListener(MouseEvent.CLICK, itemDeselected);
|
|
230
|
+
} else {
|
|
231
|
+
dispatchLayoutActionEvent(LayoutActionEvent.AMBIENT_START);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Item deselected events
|
|
236
|
+
if (eventType == LayoutActionEvent.ITEM_DESELECTED_START) {
|
|
237
|
+
itemDeselectedActionActive = true;
|
|
238
|
+
itemDeselectedStart();
|
|
239
|
+
}
|
|
240
|
+
if (eventType == LayoutActionEvent.ITEM_DESELECTED_END) {
|
|
241
|
+
itemDeselectedEnd();
|
|
242
|
+
}
|
|
243
|
+
if (eventType == LayoutActionEvent.ITEM_DESELECTED_COMPLETE) {
|
|
244
|
+
itemDeselectedActionActive = false;
|
|
245
|
+
dispatchLayoutActionEvent(LayoutActionEvent.AMBIENT_START);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Outro events
|
|
249
|
+
if (eventType == LayoutActionEvent.OUTRO_START) {
|
|
250
|
+
outroActionActive = true;
|
|
251
|
+
outroStart();
|
|
252
|
+
}
|
|
253
|
+
if (eventType == LayoutActionEvent.OUTRO_END) {
|
|
254
|
+
outroEnd();
|
|
255
|
+
}
|
|
256
|
+
if (eventType == LayoutActionEvent.OUTRO_COMPLETE) {
|
|
257
|
+
outroActionActive = false;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** LAYOUT */
|
|
262
|
+
// sets the initial position and alpha of the components in your layout
|
|
263
|
+
// then figures out if there's an intro or not, and if not, to just lay
|
|
264
|
+
// the items out
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
public function layoutStart():void {
|
|
268
|
+
dispatchLayoutActionEvent(LayoutActionEvent.LAYOUT_START);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
protected function layoutComplete(event:Event=null):void {
|
|
272
|
+
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** INTRO */
|
|
276
|
+
public function intro():void {
|
|
277
|
+
dispatchLayoutActionEvent(LayoutActionEvent.INTRO_START);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
protected function introStart():void {
|
|
281
|
+
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// introEnd is only called if you interrupt the intro with a click or something.
|
|
285
|
+
// by default, clicking does nothing to the intro, but if you want to be crazy,
|
|
286
|
+
// override this method.
|
|
287
|
+
protected function introEnd():void {
|
|
288
|
+
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
protected function introComplete():void {
|
|
292
|
+
dispatchLayoutActionEvent(LayoutActionEvent.INTRO_COMPLETE);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
/** AMBIENT */
|
|
297
|
+
public function ambient():void {
|
|
298
|
+
dispatchLayoutActionEvent(LayoutActionEvent.AMBIENT_START);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
protected function ambientStart():void {
|
|
302
|
+
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
protected function ambientUpdate(event:Event):void {
|
|
306
|
+
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
protected function ambientEnd():void {
|
|
310
|
+
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
protected function ambientComplete():void {
|
|
314
|
+
dispatchLayoutActionEvent(LayoutActionEvent.AMBIENT_COMPLETE);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
/** ITEM_SELECTED */
|
|
319
|
+
public function itemSelected():void {
|
|
320
|
+
dispatchLayoutActionEvent(LayoutActionEvent.ITEM_SELECTED_START);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
protected function itemSelectedStart():void {
|
|
324
|
+
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
protected function itemSelectedEnd():void {
|
|
328
|
+
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
protected function itemSelectedComplete():void {
|
|
332
|
+
dispatchLayoutActionEvent(LayoutActionEvent.ITEM_SELECTED_COMPLETE);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
/** ITEM_DESELECTED */
|
|
337
|
+
public function itemDeselected(event:MouseEvent=null):void {
|
|
338
|
+
dispatchLayoutActionEvent(LayoutActionEvent.ITEM_DESELECTED_START);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
protected function itemDeselectedStart():void {
|
|
342
|
+
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
protected function itemDeselectedEnd():void {
|
|
346
|
+
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
protected function itemDeselectedComplete():void {
|
|
350
|
+
dispatchLayoutActionEvent(LayoutActionEvent.ITEM_DESELECTED_COMPLETE);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
/** OUTRO */
|
|
355
|
+
public function outro():void {
|
|
356
|
+
dispatchLayoutActionEvent(LayoutActionEvent.OUTRO_START);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
protected function outroStart():void {
|
|
360
|
+
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
protected function outroEnd():void {
|
|
364
|
+
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
protected function outroComplete():void {
|
|
368
|
+
dispatchLayoutActionEvent(LayoutActionEvent.OUTRO_COMPLETE);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/** Dispatch events to continue animation cycle */
|
|
372
|
+
protected function dispatchLayoutActionEvent(eventType:String):void {
|
|
373
|
+
var event:LayoutActionEvent = new LayoutActionEvent(eventType);
|
|
374
|
+
this.dispatchEvent(event);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/SimpleLayoutAction.as
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
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.actions
|
|
30
|
+
{
|
|
31
|
+
import com.fourD.events.LayoutActionEvent;
|
|
32
|
+
|
|
33
|
+
import flash.display.DisplayObject;
|
|
34
|
+
import flash.events.Event;
|
|
35
|
+
|
|
36
|
+
import mx.core.UIComponent;
|
|
37
|
+
|
|
38
|
+
import com.fourD.core.SimpleZSorter;
|
|
39
|
+
|
|
40
|
+
public class SimpleLayoutAction extends LayoutAction
|
|
41
|
+
{
|
|
42
|
+
|
|
43
|
+
public function SimpleLayoutAction() {
|
|
44
|
+
ambientActiveDuringItemSelection = false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** INTRO */
|
|
48
|
+
override protected function introStart():void {
|
|
49
|
+
var layoutElement:UIComponent;
|
|
50
|
+
var i:int=0;
|
|
51
|
+
var numOfItems:int = target.numLayoutElements;
|
|
52
|
+
|
|
53
|
+
if (!preferredLayoutElementWidth) {
|
|
54
|
+
preferredLayoutElementWidth = 120;
|
|
55
|
+
}
|
|
56
|
+
if (!preferredLayoutElementHeight) {
|
|
57
|
+
preferredLayoutElementHeight = 120;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
layout.initializeLayoutEquation();
|
|
61
|
+
|
|
62
|
+
for (i; i < numOfItems; i++) {
|
|
63
|
+
layoutElement = target.getLayoutElementAt(i) as UIComponent;
|
|
64
|
+
layoutElement.alpha = 0;
|
|
65
|
+
//layoutElement.setActualSize(20, 20);
|
|
66
|
+
|
|
67
|
+
token = new Object();
|
|
68
|
+
token.width = preferredLayoutElementWidth;
|
|
69
|
+
token.height = preferredLayoutElementHeight;
|
|
70
|
+
token.x = Math.random() * 10000;
|
|
71
|
+
token.y = Math.random() * 10000;
|
|
72
|
+
token.z = Math.random() * 10000;
|
|
73
|
+
|
|
74
|
+
if (i == numOfItems - 1) {
|
|
75
|
+
token.onComplete = dispatchLayoutActionEvent
|
|
76
|
+
token.onCompleteParams = [LayoutActionEvent.INTRO_END];
|
|
77
|
+
}
|
|
78
|
+
animator.tween([token], null, layoutElement as DisplayObject);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// introEnd is only called if you interrupt the intro with a click or something.
|
|
83
|
+
// by default, clicking does nothing to the intro, but if you want to be crazy,
|
|
84
|
+
// override this method.
|
|
85
|
+
override protected function introEnd():void {
|
|
86
|
+
var layoutElement:UIComponent;
|
|
87
|
+
var i:int=0;
|
|
88
|
+
var numOfItems:int = target.numLayoutElements;
|
|
89
|
+
layout.initializeLayoutEquation();
|
|
90
|
+
|
|
91
|
+
for (i; i < numOfItems; i++) {
|
|
92
|
+
layoutElement = target.getLayoutElementAt(i) as UIComponent;
|
|
93
|
+
token = layout.getLayoutElementToken(layoutElement, i);
|
|
94
|
+
token.alpha = 1;
|
|
95
|
+
|
|
96
|
+
//layoutElement.setActualSize(token.width, token.height);
|
|
97
|
+
if (i == numOfItems - 1) {
|
|
98
|
+
token.onComplete = introComplete;
|
|
99
|
+
}
|
|
100
|
+
animator.tween([token], null, layoutElement as DisplayObject);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
override protected function introComplete():void {
|
|
105
|
+
dispatchLayoutActionEvent(LayoutActionEvent.INTRO_COMPLETE);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/** AMBIENT */
|
|
110
|
+
override protected function ambientStart():void {
|
|
111
|
+
container.addEventListener(Event.ENTER_FRAME, ambientUpdate);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
override protected function ambientUpdate(event:Event):void {
|
|
115
|
+
if (layout.selectedIndexHitTest) {
|
|
116
|
+
layout.handleSelectedIndexHitTest();
|
|
117
|
+
}
|
|
118
|
+
var rotY:Number = (target.stage.mouseX - (target.stage.stageWidth/2)) * 1/300;
|
|
119
|
+
container.rotationY += rotY;
|
|
120
|
+
target.invalidateDisplayList();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
override protected function ambientEnd():void {
|
|
124
|
+
// on tweenComplete, dispatch ambientComplete
|
|
125
|
+
ambientComplete();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
override protected function ambientComplete():void {
|
|
129
|
+
dispatchLayoutActionEvent(LayoutActionEvent.AMBIENT_COMPLETE);
|
|
130
|
+
container.removeEventListener(Event.ENTER_FRAME, ambientUpdate);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
/** ITEM_SELECTED */
|
|
135
|
+
override protected function itemSelectedStart():void {
|
|
136
|
+
token = new Object();
|
|
137
|
+
var numOfItems:Number = target.numLayoutElements;
|
|
138
|
+
var degree:Number = (layout.selectedIndex / numOfItems) * 360;
|
|
139
|
+
|
|
140
|
+
var remainder:Number = (360 - (container.rotationY % 360));
|
|
141
|
+
if (container.rotationY < 360) {
|
|
142
|
+
token.rotationY = degree;
|
|
143
|
+
} else if (remainder == 0) {
|
|
144
|
+
token.rotationY = degree;
|
|
145
|
+
} else if (container.rotationY > 360 && remainder != 0) {
|
|
146
|
+
token.rotationY = remainder + degree;
|
|
147
|
+
}
|
|
148
|
+
token.rotationY += 10;
|
|
149
|
+
token.z = -300;
|
|
150
|
+
token.onComplete = dispatchLayoutActionEvent;
|
|
151
|
+
token.onCompleteParams = [LayoutActionEvent.ITEM_SELECTED_END];
|
|
152
|
+
animator.tween([token], null, container);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
override protected function itemSelectedEnd():void {
|
|
156
|
+
var layoutElement:DisplayObject = target.getLayoutElementAt(layout.selectedIndex) as DisplayObject;
|
|
157
|
+
token = new Object();
|
|
158
|
+
token.scaleX = token.scaleY = 1.2;
|
|
159
|
+
token.onComplete = dispatchLayoutActionEvent;
|
|
160
|
+
token.onCompleteParams = [LayoutActionEvent.ITEM_SELECTED_COMPLETE];
|
|
161
|
+
animator.tween([token], null, layoutElement);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
override protected function itemSelectedComplete():void {
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
/** ITEM_DESELECTED */
|
|
170
|
+
override protected function itemDeselectedStart():void {
|
|
171
|
+
trace("Item deselected start");
|
|
172
|
+
var layoutElement:DisplayObject = target.getLayoutElementAt(layout.selectedIndex) as DisplayObject;
|
|
173
|
+
|
|
174
|
+
token = new Object();
|
|
175
|
+
token.scaleX = token.scaleY = 1;
|
|
176
|
+
token.onComplete = dispatchLayoutActionEvent;
|
|
177
|
+
token.onCompleteParams = [LayoutActionEvent.ITEM_DESELECTED_END];
|
|
178
|
+
animator.tween([token], null, layoutElement);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
override protected function itemDeselectedEnd():void {
|
|
182
|
+
token = new Object();
|
|
183
|
+
token.z = 0;
|
|
184
|
+
token.onComplete = itemDeselectedComplete
|
|
185
|
+
animator.tween([token], null, container);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
override protected function itemDeselectedComplete():void {
|
|
189
|
+
dispatchLayoutActionEvent(LayoutActionEvent.ITEM_DESELECTED_COMPLETE);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
/** OUTRO */
|
|
194
|
+
override public function outro():void {
|
|
195
|
+
dispatchLayoutActionEvent(LayoutActionEvent.OUTRO_START);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
override protected function outroStart():void {
|
|
199
|
+
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
override protected function outroEnd():void {
|
|
203
|
+
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
override protected function outroComplete():void {
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<mx:Object xmlns:mx="http://ns.adobe.com/mxml/2009">
|
|
3
|
+
<mx:Script>
|
|
4
|
+
<![CDATA[
|
|
5
|
+
import mx.core.Application;
|
|
6
|
+
import mx.core.UIComponent;
|
|
7
|
+
|
|
8
|
+
[Bindable]
|
|
9
|
+
private var view:UIComponent = Application.application.mainView;
|
|
10
|
+
]]>
|
|
11
|
+
</mx:Script>
|
|
12
|
+
|
|
13
|
+
<mx:Declarations>
|
|
14
|
+
<mx:Fade duration="300" id="fadeEffect"/>
|
|
15
|
+
</mx:Declarations>
|
|
16
|
+
|
|
17
|
+
<!-- Tweens ___________________________________________________________________ -->
|
|
18
|
+
|
|
19
|
+
<mx:Declarations>
|
|
20
|
+
<mx:Object id="centerPlaneFlipTweenTo" rotationY="-200" rotationX="360" z="-10"
|
|
21
|
+
dropShadowFilter="{rightShadow}"/>
|
|
22
|
+
<mx:Object id="centerPlaneFlipTweenFrom" rotationY="0" rotationX="0" z="0"
|
|
23
|
+
dropShadowFilter="{leftShadow}"/>
|
|
24
|
+
|
|
25
|
+
<mx:Object id="centerPlaneFlowOutTween" z="500" x="-150" rotationY="40"/>
|
|
26
|
+
<mx:Object id="centerPlaneFlowInTween" dropShadowFilter="{rightShadow}"
|
|
27
|
+
x="{(view.width/2)}" z="0" rotationY="0"/>
|
|
28
|
+
|
|
29
|
+
<mx:Object id="leftPlaneTweenTo" rotationY="-80" z="-3" dropShadowFilter="{leftShadow}"/>
|
|
30
|
+
<mx:Object id="leftPlaneTweenFrom" rotationY="0" z="0"/>
|
|
31
|
+
|
|
32
|
+
<mx:Object id="rightPlaneTweenTo" rotationY="80" z="-3" dropShadowFilter="{rightShadow}"/>
|
|
33
|
+
<mx:Object id="rightPlaneTweenFrom" rotationY="0"/>
|
|
34
|
+
|
|
35
|
+
<mx:Object id="topPlaneTweenTo" rotationX="50"/>
|
|
36
|
+
<mx:Object id="topPlaneTweenFrom" rotationX="0"/>
|
|
37
|
+
|
|
38
|
+
<mx:Object id="bottomPlaneTweenTo" rotationX="-50"/>
|
|
39
|
+
<mx:Object id="bottomPlaneTweenFrom" rotationX="0"/>
|
|
40
|
+
|
|
41
|
+
<mx:Object id="fadeOutTween" alpha="0"/>
|
|
42
|
+
<mx:Object id="fadeInTween" alpha="1"/>
|
|
43
|
+
|
|
44
|
+
<!-- Filters __________________________________________________________________ -->
|
|
45
|
+
|
|
46
|
+
<mx:Object id="leftShadow" blurX="5" blurY="5" alpha="0.5" distance="-10"/>
|
|
47
|
+
<mx:Object id="rightShadow" blurX="5" blurY="5" alpha="0.5" distance="10"/>
|
|
48
|
+
</mx:Declarations>
|
|
49
|
+
|
|
50
|
+
</mx:Object>
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
import flash.display.DisplayObject;
|
|
32
|
+
|
|
33
|
+
public interface IAnimator
|
|
34
|
+
{
|
|
35
|
+
|
|
36
|
+
function tween(tweens:Array, tweenParams:Array=null, target:Object=null):void;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
}
|