home *** CD-ROM | disk | FTP | other *** search
- package net.xinterface.dwall.samples.xmlGallerySample
- {
- import caurina.transitions.Equations;
- import mx.core.Application;
- import mx.core.UIComponent;
- import net.xinterface.dwall.core.business.DWallQuality;
- import net.xinterface.dwall.core.events.DataChangeEvent;
- import net.xinterface.dwall.core.events.DataRequest;
- import net.xinterface.dwall.core.views.DWallMainView;
- import net.xinterface.dwall.core.views.items.PhotoItem;
-
- public class XmlWallSample extends UIComponent
- {
- public var view:DWallMainView;
-
- private var model:XMLPicModel;
-
- private var itemClass:Class = PhotoItem;
-
- protected var noPhotoImageClass:Class = XmlWallSample_noPhotoImageClass;
-
- private var source:String;
-
- public function XmlWallSample()
- {
- super();
- }
-
- protected function DataChangedHandler(param1:DataChangeEvent) : void
- {
- this.view.removeEventListener(DataRequest.PAGE_REQUEST,this.model.RequestData);
- this.model.removeEventListener(DataChangeEvent.CHANGE,this.DataChangedHandler);
- this.view.AddData(param1.ItemList);
- this.view.Start();
- }
-
- public function stopRendering() : void
- {
- this.view.Stop();
- }
-
- protected function ConfigureView() : void
- {
- this.view = new DWallMainView(Application.application.width,Application.application.height - 50,false);
- addChild(this.view);
- this.view.viewport.x = -50;
- this.view.viewport.autoClipping = true;
- addChild(this.view.viewport);
- this.view.Reflect = true;
- this.view.ReflectMargin = 70;
- this.view.ItemWidth = 140;
- this.view.ItemHeight = 100;
- this.view.ItemMargin = 80;
- this.view.ItemsXColumn = 3;
- this.view.Quality = DWallQuality.STANDARD;
- this.view.ZCamDefault = -500;
- this.view.ZCamZoomed = -350;
- this.view.CamAceleration = 10;
- this.view.Inertia = 2;
- this.view.camera.z = 0;
- this.view.DebugMode = false;
- this.view.MouseAceleration = 3;
- PhotoItem.backgroundColor = 10066329;
- PhotoItem.noPhotoImageClass = this.noPhotoImageClass;
- PhotoItem.reflectionRatio = 200;
- PhotoItem.reflectionAlpha = 0.2;
- PhotoItem.noPhotoIsInteractive = false;
- PhotoItem.borderColor = 0;
- PhotoItem.easingEquation = Equations.easeInOutQuart;
- }
-
- private function Init() : void
- {
- this.ConfigureView();
- }
-
- public function get View() : DWallMainView
- {
- return this.view;
- }
-
- public function startRendering() : void
- {
- this.view.Start();
- }
-
- public function addData(param1:Array) : void
- {
- this.view.AddData(param1);
- this.view.Start();
- }
-
- public function set Source(param1:String) : void
- {
- this.source = param1;
- this.Init();
- }
- }
- }
-
-