├── examples ├── libs │ ├── .gitignore │ ├── assets.fla │ └── assets.swc ├── src │ ├── .gitignore │ ├── assets │ │ ├── app_bkg.png │ │ └── fonts │ │ │ ├── FreeUniversal-Bold.ttf │ │ │ ├── FreeUniversal-Italic.ttf │ │ │ ├── FreeUniversal-Regular.ttf │ │ │ └── FreeUniversal-BoldItalic.ttf │ └── com │ │ └── flow │ │ ├── view │ │ ├── StatesView.mxml │ │ └── ScrollingView.mxml │ │ └── commands │ │ └── InitApplicationCommand.as ├── .gitignore ├── .settings │ └── org.eclipse.core.resources.prefs ├── .flexProperties └── .project ├── lib ├── bin │ └── Flow Library.swc ├── src │ ├── mx │ │ ├── binding │ │ │ ├── IBindingClient.as │ │ │ └── IWatcherSetupUtil2.as │ │ ├── core │ │ │ ├── IFactory.as │ │ │ ├── IDeferredInstance.as │ │ │ ├── IPropertyChangeNotifier.as │ │ │ ├── ByteArrayAsset.as │ │ │ ├── ClassFactory.as │ │ │ ├── DeferredInstanceFromClass.as │ │ │ ├── DeferredInstanceFromFunction.as │ │ │ ├── IFlexModuleFactory.as │ │ │ ├── IStateClient.as │ │ │ └── IStateClient2.as │ │ ├── states │ │ │ ├── OverrideBase.as │ │ │ ├── SetProperty.as │ │ │ ├── IOverride.as │ │ │ ├── Transition.as │ │ │ └── State.as │ │ └── events │ │ │ └── PropertyChangeEvent.as │ └── com │ │ ├── flow │ │ ├── effects │ │ │ ├── pixelbender │ │ │ │ ├── flip.pbj │ │ │ │ ├── chihuly.pbj │ │ │ │ ├── pixelate.pbj │ │ │ │ └── pixelate.pbk │ │ │ ├── EffectComposition.as │ │ │ ├── GreyscaleEffect.as │ │ │ ├── InnerGlowEffect.as │ │ │ ├── OuterBevelEffect.as │ │ │ ├── FullBevelEffect.as │ │ │ ├── FlipEffect.as │ │ │ ├── PixelateEffect.as │ │ │ └── transitions │ │ │ │ └── EffectTransition.as │ │ ├── media │ │ │ ├── VideoStreamState.as │ │ │ └── MediaURL.as │ │ ├── events │ │ │ ├── VideoStreamEvent.as │ │ │ ├── SorterEvent.as │ │ │ ├── ComponentEvent.as │ │ │ ├── InvalidationEvent.as │ │ │ ├── AlertEvent.as │ │ │ ├── CollectionEventKind.as │ │ │ ├── AMFGatewayEvent.as │ │ │ ├── WebCamEvent.as │ │ │ ├── StateEvent.as │ │ │ ├── ListEvent.as │ │ │ ├── CommandEvent.as │ │ │ └── CollectionEvent.as │ │ ├── managers │ │ │ ├── TextFormatEntry.as │ │ │ └── IntrospectionManager.as │ │ ├── components │ │ │ ├── VSlider.as │ │ │ ├── VScrollBar.as │ │ │ ├── supportClasses │ │ │ │ ├── DefaultTooltip.as │ │ │ │ └── ITooltip.as │ │ │ ├── Spacing.as │ │ │ ├── TextArea.as │ │ │ ├── PushButton.as │ │ │ └── measuring │ │ │ │ └── MeasureUnits.as │ │ ├── net │ │ │ ├── RemoteProcedureTypes.as │ │ │ ├── loaders │ │ │ │ ├── XMLLoader.as │ │ │ │ ├── JSONLoader.as │ │ │ │ └── AMFLoader.as │ │ │ └── RemoteProcedureAMF.as │ │ ├── motion │ │ │ ├── IAnimateable.as │ │ │ ├── easing │ │ │ │ ├── Linear.as │ │ │ │ ├── Quadratic.as │ │ │ │ ├── Sine.as │ │ │ │ ├── Cubic.as │ │ │ │ ├── Quartic.as │ │ │ │ ├── Quintic.as │ │ │ │ ├── Circular.as │ │ │ │ ├── Back.as │ │ │ │ ├── Exponential.as │ │ │ │ ├── Bounce.as │ │ │ │ └── Elastic.as │ │ │ └── AnimationProperty.as │ │ ├── utils │ │ │ ├── cloneObject.as │ │ │ ├── hasPlayerVersion.as │ │ │ ├── callLater.as │ │ │ └── callLaterTimed.as │ │ ├── log │ │ │ └── Log.as │ │ ├── graphics │ │ │ ├── Path.as │ │ │ ├── Ellipse.as │ │ │ ├── Line.as │ │ │ ├── strokes │ │ │ │ └── IStroke.as │ │ │ ├── Geometry.as │ │ │ └── fills │ │ │ │ └── IFill.as │ │ ├── containers │ │ │ ├── ConfirmCancelHBox.as │ │ │ ├── layout │ │ │ │ └── AlignType.as │ │ │ └── ViewSwapper.as │ │ └── skins │ │ │ ├── TextInputSkin.mxml │ │ │ ├── TextAreaSkin.mxml │ │ │ ├── ButtonSkin.mxml │ │ │ ├── VideoPlayerSkin.mxml │ │ │ └── AlertSkin.mxml │ │ └── adobe │ │ └── serialization │ │ └── json │ │ └── JSONTokenType.as ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.ltk.core.refactoring.prefs ├── .project └── build │ └── build.xml ├── documentation ├── images │ ├── logo.jpg │ ├── expanded.gif │ ├── collapsed.gif │ ├── AirIcon12x12.gif │ ├── inherit-arrow.gif │ ├── titleTableTop.jpg │ ├── detailHeaderRule.jpg │ ├── inheritedSummary.gif │ ├── titleTableBottom.jpg │ ├── titleTableMiddle.jpg │ ├── detailSectionHeader.jpg │ └── P_AlternativeMetadataIndicator_30x28_N.png ├── override.css ├── com │ ├── flow │ │ ├── commands │ │ │ └── class-list.html │ │ ├── net │ │ │ ├── class-list.html │ │ │ └── loaders │ │ │ │ └── class-list.html │ │ ├── components │ │ │ ├── measuring │ │ │ │ └── class-list.html │ │ │ ├── supportClasses │ │ │ │ └── class-list.html │ │ │ └── class-list.html │ │ ├── effects │ │ │ ├── transitions │ │ │ │ └── class-list.html │ │ │ ├── utils │ │ │ │ └── class-list.html │ │ │ └── class-list.html │ │ ├── motion │ │ │ ├── class-list.html │ │ │ └── easing │ │ │ │ └── class-list.html │ │ ├── containers │ │ │ ├── layout │ │ │ │ └── class-list.html │ │ │ └── class-list.html │ │ ├── graphics │ │ │ ├── class-list.html │ │ │ ├── fills │ │ │ │ └── class-list.html │ │ │ └── strokes │ │ │ │ └── class-list.html │ │ ├── collections │ │ │ └── class-list.html │ │ ├── managers │ │ │ └── class-list.html │ │ ├── utils │ │ │ └── class-list.html │ │ └── events │ │ │ └── class-list.html │ └── adobe │ │ └── serialization │ │ └── json │ │ └── class-list.html ├── mx │ ├── binding │ │ └── utils │ │ │ └── class-list.html │ ├── events │ │ └── class-list.html │ ├── states │ │ └── class-list.html │ └── core │ │ └── class-list.html ├── package-frame.html ├── index.html └── index-list.html └── README.md /examples/libs/.gitignore: -------------------------------------------------------------------------------- 1 | /assets.swf 2 | -------------------------------------------------------------------------------- /examples/src/.gitignore: -------------------------------------------------------------------------------- 1 | /Testbed.mxml 2 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | /bin-debug 2 | /bin-release 3 | -------------------------------------------------------------------------------- /examples/libs/assets.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/examples/libs/assets.fla -------------------------------------------------------------------------------- /examples/libs/assets.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/examples/libs/assets.swc -------------------------------------------------------------------------------- /lib/bin/Flow Library.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/lib/bin/Flow Library.swc -------------------------------------------------------------------------------- /documentation/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/logo.jpg -------------------------------------------------------------------------------- /documentation/images/expanded.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/expanded.gif -------------------------------------------------------------------------------- /examples/src/assets/app_bkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/examples/src/assets/app_bkg.png -------------------------------------------------------------------------------- /documentation/images/collapsed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/collapsed.gif -------------------------------------------------------------------------------- /lib/src/mx/binding/IBindingClient.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.binding { 3 | public interface IBindingClient { 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /documentation/images/AirIcon12x12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/AirIcon12x12.gif -------------------------------------------------------------------------------- /documentation/images/inherit-arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/inherit-arrow.gif -------------------------------------------------------------------------------- /documentation/images/titleTableTop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/titleTableTop.jpg -------------------------------------------------------------------------------- /lib/src/mx/core/IFactory.as: -------------------------------------------------------------------------------- 1 | package mx.core { 2 | public interface IFactory { 3 | function newInstance():*; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /documentation/images/detailHeaderRule.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/detailHeaderRule.jpg -------------------------------------------------------------------------------- /documentation/images/inheritedSummary.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/inheritedSummary.gif -------------------------------------------------------------------------------- /documentation/images/titleTableBottom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/titleTableBottom.jpg -------------------------------------------------------------------------------- /documentation/images/titleTableMiddle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/titleTableMiddle.jpg -------------------------------------------------------------------------------- /documentation/images/detailSectionHeader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/detailSectionHeader.jpg -------------------------------------------------------------------------------- /lib/src/com/flow/effects/pixelbender/flip.pbj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/lib/src/com/flow/effects/pixelbender/flip.pbj -------------------------------------------------------------------------------- /examples/src/assets/fonts/FreeUniversal-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/examples/src/assets/fonts/FreeUniversal-Bold.ttf -------------------------------------------------------------------------------- /lib/src/com/flow/effects/pixelbender/chihuly.pbj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/lib/src/com/flow/effects/pixelbender/chihuly.pbj -------------------------------------------------------------------------------- /examples/src/assets/fonts/FreeUniversal-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/examples/src/assets/fonts/FreeUniversal-Italic.ttf -------------------------------------------------------------------------------- /lib/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Thu May 12 15:30:30 EEST 2011 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /lib/src/com/flow/effects/pixelbender/pixelate.pbj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/lib/src/com/flow/effects/pixelbender/pixelate.pbj -------------------------------------------------------------------------------- /examples/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Thu May 26 15:39:29 EEST 2011 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /examples/src/assets/fonts/FreeUniversal-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/examples/src/assets/fonts/FreeUniversal-Regular.ttf -------------------------------------------------------------------------------- /examples/src/assets/fonts/FreeUniversal-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/examples/src/assets/fonts/FreeUniversal-BoldItalic.ttf -------------------------------------------------------------------------------- /lib/src/mx/core/IDeferredInstance.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.core { 3 | 4 | public interface IDeferredInstance { 5 | function getInstance():Object; 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /documentation/images/P_AlternativeMetadataIndicator_30x28_N.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artman/Flow/HEAD/documentation/images/P_AlternativeMetadataIndicator_30x28_N.png -------------------------------------------------------------------------------- /lib/.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | #Mon May 16 13:10:37 EEST 2011 2 | eclipse.preferences.version=1 3 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 4 | -------------------------------------------------------------------------------- /lib/src/mx/core/IPropertyChangeNotifier.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.core { 3 | 4 | import flash.events.IEventDispatcher; 5 | 6 | public interface IPropertyChangeNotifier extends IEventDispatcher/*, IUID*/ { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/.flexProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/src/mx/core/ByteArrayAsset.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.core { 3 | 4 | import flash.utils.ByteArray; 5 | 6 | public class ByteArrayAsset extends ByteArray { 7 | public function ByteArrayAsset() { 8 | super(); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/mx/binding/IWatcherSetupUtil2.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.binding { 3 | 4 | [ExcludeClass] 5 | public interface IWatcherSetupUtil2 { 6 | 7 | function setup(target:Object, propertyGetter:Function, staticPropertyGetter:Function, bindings:Array, watchers:Array):void; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /documentation/override.css: -------------------------------------------------------------------------------- 1 | /* 2 | //////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // ADOBE SYSTEMS INCORPORATED 5 | // Copyright 2008 Adobe Systems Incorporated 6 | // All Rights Reserved. 7 | // 8 | // NOTICE: Adobe permits you to use, modify, and distribute this file 9 | // in accordance with the terms of the license agreement accompanying it. 10 | // 11 | //////////////////////////////////////////////////////////////////////////////// 12 | */ -------------------------------------------------------------------------------- /lib/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flow Library 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | 15 | com.adobe.flexbuilder.project.flexlibnature 16 | com.adobe.flexbuilder.project.actionscriptnature 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/src/com/flow/media/VideoStreamState.as: -------------------------------------------------------------------------------- 1 | package com.flow.media { 2 | public class VideoStreamState { 3 | 4 | public static const STATE_INACTIVE:String = "inactive"; 5 | public static const STATE_CONNECTING:String = "connecting"; 6 | public static const STATE_PLAYING:String = "playing"; 7 | public static const STATE_PAUSED:String = "paused"; 8 | public static const STATE_BUFFERING:String = "buffering"; 9 | public static const STATE_STOPPED:String = "stopped"; 10 | public static const STATE_ERROR:String = "error"; 11 | 12 | } 13 | } -------------------------------------------------------------------------------- /examples/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flow Examples 4 | 5 | 6 | Flow Library 7 | 8 | 9 | 10 | com.adobe.flexbuilder.project.flexbuilder 11 | 12 | 13 | 14 | 15 | 16 | com.adobe.flexbuilder.project.flexnature 17 | com.adobe.flexbuilder.project.actionscriptnature 18 | 19 | 20 | -------------------------------------------------------------------------------- /lib/src/mx/core/ClassFactory.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.core { 3 | 4 | public class ClassFactory implements IFactory { 5 | public function ClassFactory(generator:Class = null) { 6 | super(); 7 | 8 | this.generator = generator; 9 | } 10 | 11 | public var generator:Class; 12 | public var properties:Object = null; 13 | 14 | public function newInstance():* { 15 | var instance:Object = new generator(); 16 | if (properties != null) { 17 | for (var p:String in properties) { 18 | instance[p] = properties[p]; 19 | } 20 | } 21 | return instance; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/mx/core/DeferredInstanceFromClass.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.core { 3 | 4 | 5 | public class DeferredInstanceFromClass /*implements ITransientDeferredInstance*/ { 6 | 7 | public function DeferredInstanceFromClass(generator:Class) { 8 | super(); 9 | this.generator = generator; 10 | } 11 | 12 | private var generator:Class; 13 | private var instance:Object = null; 14 | 15 | 16 | public function getInstance():Object { 17 | if (!instance) { 18 | instance = new generator(); 19 | } 20 | return instance; 21 | } 22 | 23 | public function reset():void { 24 | instance = null; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/mx/states/OverrideBase.as: -------------------------------------------------------------------------------- 1 | package mx.states { 2 | 3 | import flash.events.EventDispatcher; 4 | 5 | public class OverrideBase extends EventDispatcher { 6 | 7 | protected function getOverrideContext(target:Object, parent:Object):Object { 8 | if (target == null) { 9 | return parent; 10 | } 11 | if (target is String) { 12 | return parent[target]; 13 | } 14 | return target; 15 | } 16 | 17 | public function initializeFromObject(properties:Object):Object { 18 | for (var p:String in properties) { 19 | try { 20 | this[p] = properties[p]; 21 | } catch (e:Error) { 22 | } 23 | } 24 | return Object(this); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/pixelbender/pixelate.pbk: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | kernel Pixelate 5 | < namespace : "AIF"; 6 | vendor : "Artman.fi"; 7 | version : 1; 8 | description : "Pixelates an image"; > 9 | { 10 | parameter int dimension 11 | ; 14 | 15 | input image4 inputImage; 16 | output pixel4 outputPixel; 17 | 18 | void 19 | evaluatePixel() { 20 | float dimAsFloat = float(dimension); 21 | float2 sc = floor(outCoord() / float2(dimAsFloat, dimAsFloat)); 22 | sc *= dimAsFloat; 23 | outputPixel = sampleNearest(inputImage, sc); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/mx/core/DeferredInstanceFromFunction.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.core { 3 | 4 | public class DeferredInstanceFromFunction /*implements ITransientDeferredInstance*/ { 5 | 6 | public function DeferredInstanceFromFunction(generator:Function, destructor:Function = null) { 7 | super(); 8 | this.generator = generator; 9 | this.destructor = destructor; 10 | } 11 | 12 | private var generator:Function; 13 | private var instance:Object = null; 14 | private var destructor:Function; 15 | 16 | public function getInstance():Object { 17 | if (!instance) 18 | instance = generator(); 19 | return instance; 20 | } 21 | 22 | public function reset():void { 23 | instance = null; 24 | if (destructor != null) { 25 | destructor(); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/com/flow/events/VideoStreamEvent.as: -------------------------------------------------------------------------------- 1 | package com.flow.events { 2 | 3 | import flash.events.Event; 4 | import flash.net.NetStream; 5 | 6 | public class VideoStreamEvent extends Event { 7 | 8 | public static const CONNECTED:String="connected"; 9 | public static const CONNECTION_FAILED:String="connectionFailed"; 10 | public static const STATE_CHANGE:String="stateChange"; 11 | public static const PROGRESS:String="progress"; 12 | public static const STREAM_CREATED:String="streamCreated"; 13 | 14 | public var errorID:int; 15 | public var code:String; 16 | public var description:String; 17 | public var state:String; 18 | public var netStream:NetStream; 19 | 20 | public function VideoStreamEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 21 | super(type, bubbles, cancelable); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /lib/src/com/flow/managers/TextFormatEntry.as: -------------------------------------------------------------------------------- 1 | package com.flow.managers { 2 | import flash.text.Font; 3 | import flash.text.TextFormat; 4 | 5 | public class TextFormatEntry { 6 | 7 | public var textFormat:TextFormat; 8 | public var fallback:String; 9 | public var filters:Array; 10 | 11 | public function TextFormatEntry(textFormat:TextFormat, fallbackFonts:Array = null, filters:Array = null) { 12 | this.textFormat = textFormat; 13 | this.filters = filters; 14 | if(fallbackFonts) { 15 | for(var i:int = 0; icom.flow.commands - API Documentation

Package com.flow.commands

Classes
Command
CommandDispatch
-------------------------------------------------------------------------------- /documentation/com/flow/net/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.net - API Documentation

Package com.flow.net

Classes
AMFGateway
AMFGatewayResponder
-------------------------------------------------------------------------------- /documentation/mx/binding/utils/class-list.html: -------------------------------------------------------------------------------- 1 | mx.binding.utils - API Documentation

Package mx.binding.utils

Classes
BindingUtils
ChangeWatcher
-------------------------------------------------------------------------------- /documentation/mx/events/class-list.html: -------------------------------------------------------------------------------- 1 | mx.events - API Documentation

Package mx.events

Classes
PropertyChangeEvent
PropertyChangeEventKind
-------------------------------------------------------------------------------- /documentation/com/flow/components/measuring/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.components.measuring - API Documentation

Package com.flow.components.measuring

Classes
MeasureUnit
MeasureUnits
-------------------------------------------------------------------------------- /documentation/com/flow/effects/transitions/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.effects.transitions - API Documentation

Package com.flow.effects.transitions

Classes
EffectTransition
FadeTransition
-------------------------------------------------------------------------------- /documentation/com/flow/effects/utils/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.effects.utils - API Documentation

Package com.flow.effects.utils

Classes
ColorMatrix
ColorRGB
CopyEffect
-------------------------------------------------------------------------------- /documentation/com/flow/motion/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.motion - API Documentation

Package com.flow.motion

Interfaces
IAnimateable
 
Classes
Tween
-------------------------------------------------------------------------------- /lib/src/mx/core/IFlexModuleFactory.as: -------------------------------------------------------------------------------- 1 | 2 | package mx.core { 3 | 4 | public interface IFlexModuleFactory 5 | { 6 | import flash.display.LoaderInfo; 7 | import flash.utils.Dictionary; 8 | 9 | //import mx.core.RSLData; 10 | 11 | 12 | function get allowDomainsInNewRSLs():Boolean; 13 | function set allowDomainsInNewRSLs(value:Boolean):void; 14 | 15 | function get allowInsecureDomainsInNewRSLs():Boolean; 16 | function set allowInsecureDomainsInNewRSLs(value:Boolean):void; 17 | 18 | function get preloadedRSLs():Dictionary; 19 | 20 | 21 | //function addPreloadedRSL(loaderInfo:LoaderInfo, rsl:Vector.):void; 22 | 23 | function allowDomain(... domains):void; 24 | 25 | 26 | function allowInsecureDomain(... domains):void; 27 | 28 | 29 | function callInContext(fn:Function, thisArg:Object, 30 | argArray:Array, returns:Boolean = true):*; 31 | 32 | 33 | function create(... parameters):Object; 34 | 35 | function getImplementation(interfaceName:String):Object; 36 | 37 | function info():Object; 38 | 39 | function registerImplementation(interfaceName:String, 40 | impl:Object):void; 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /lib/src/mx/states/SetProperty.as: -------------------------------------------------------------------------------- 1 | package mx.states { 2 | 3 | import flash.display.DisplayObject; 4 | 5 | public class SetProperty extends OverrideBase implements IOverride { 6 | 7 | public var name:String; 8 | public var target:String; 9 | public var value:*; 10 | 11 | private var oldValue:*; 12 | private var initialized:Boolean = false; 13 | 14 | public function initialize():void { 15 | } 16 | 17 | public function apply(parent:Object):void { 18 | if(name) { 19 | if(parent == null) { 20 | return; 21 | } 22 | if(target) { 23 | var item:Object = parent[target]; 24 | } else { 25 | item = parent; 26 | } 27 | if(item == null) { 28 | return; 29 | } 30 | if(!initialized) { 31 | initialized = true; 32 | oldValue = item[name]; 33 | } 34 | item[name] = value; 35 | } 36 | } 37 | 38 | public function remove(parent:Object):void { 39 | if(parent == null) { 40 | return; 41 | } 42 | if(target) { 43 | var item:Object = parent[target]; 44 | } else { 45 | item = parent; 46 | } 47 | if(item == null) { 48 | return; 49 | } 50 | item[name] = oldValue; 51 | //oldValue = null; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /documentation/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flow Framework 4 | 5 | 6 | 7 | 8 | 9 | <body> 10 | <h2>Frame Alert</h2> 11 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 12 | <br> 13 | Link to<a href="package-summary.html">Non-frame version.</a> 14 | </p> 15 | </body> 16 | 17 | 18 | -------------------------------------------------------------------------------- /documentation/com/flow/containers/layout/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.containers.layout - API Documentation

Package com.flow.containers.layout

Classes
AbsoluteLayout
AlignType
HBoxLayout
LayoutBase
VBoxLayout
-------------------------------------------------------------------------------- /documentation/com/flow/graphics/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.graphics - API Documentation

Package com.flow.graphics

Classes
Geometry
GradientData
Image
Line
Path
Rect
Shape
-------------------------------------------------------------------------------- /documentation/com/flow/graphics/fills/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.graphics.fills - API Documentation

Package com.flow.graphics.fills

Interfaces
IFill
 
Classes
BitmapFill
GradientFill
SolidFill
-------------------------------------------------------------------------------- /documentation/com/flow/collections/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.collections - API Documentation

Package com.flow.collections

Interfaces
IList
 
Classes
ArrayCollection
DisplayObjectCollection
Sorter
-------------------------------------------------------------------------------- /documentation/com/flow/graphics/strokes/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.graphics.strokes - API Documentation

Package com.flow.graphics.strokes

Interfaces
IStroke
 
Classes
GradientStroke
SolidStroke
StrokeBase
-------------------------------------------------------------------------------- /documentation/mx/states/class-list.html: -------------------------------------------------------------------------------- 1 | mx.states - API Documentation

Package mx.states

Interfaces
IOverride
 
Classes
AddItems
OverrideBase
SetProperty
State
Transition
-------------------------------------------------------------------------------- /documentation/com/flow/managers/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.managers - API Documentation

Package com.flow.managers

Classes
IntrospectionManager
KeyboardManager
LayoutManager
PopupManager
SkinManager
TextFormatManager
TooltipManager
-------------------------------------------------------------------------------- /documentation/com/adobe/serialization/json/class-list.html: -------------------------------------------------------------------------------- 1 | com.adobe.serialization.json - API Documentation

Package com.adobe.serialization.json

Classes
JSONDecoder
JSONEncoder
JSONParseError
JSONParsing
JSONToken
JSONTokenizer
JSONTokenType
-------------------------------------------------------------------------------- /lib/src/mx/core/IStateClient.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | // Only included so that MXMLC doesn't include it from the Flex Framework 24 | package mx.core { 25 | public interface IStateClient { 26 | } 27 | } -------------------------------------------------------------------------------- /documentation/com/flow/net/loaders/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.net.loaders - API Documentation

Package com.flow.net.loaders

Classes
AbstractLoader
AMFLoader
BinaryLoader
DisplayObjectLoader
JSONLoader
LoaderBatch
TextLoader
XMLLoader
-------------------------------------------------------------------------------- /lib/src/mx/states/IOverride.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package mx.states { 24 | public interface IOverride { 25 | function initialize():void; 26 | function apply(parent:Object):void; 27 | function remove(parent:Object):void; 28 | } 29 | } -------------------------------------------------------------------------------- /lib/src/mx/states/Transition.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | // Only included so that MXMLC doesn't include it from the Flex Framework 24 | package mx.states { 25 | public class Transition { 26 | public function Transition (){ 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /documentation/com/flow/containers/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.containers - API Documentation

Package com.flow.containers

Classes
Application
Container
HBox
List
ScrollArea
Scroller
VBox
ViewStack
ViewSwapper
Window
-------------------------------------------------------------------------------- /documentation/com/flow/utils/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.utils - API Documentation

Package com.flow.utils

Functions
callLater()
callLaterTimed()
cloneObject()
hasPlayerVersion()
 
Classes
GraphicUtils
MultiChangeWatcher
-------------------------------------------------------------------------------- /lib/src/com/flow/components/VSlider.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components { 24 | 25 | /** 26 | * A vertical slider. 27 | */ 28 | public class VSlider extends HScrollBar { 29 | public function VSlider() { 30 | super(); 31 | direction = "vertical"; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /documentation/com/flow/components/supportClasses/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.components.supportClasses - API Documentation

Package com.flow.components.supportClasses

Interfaces
ITooltip
 
Classes
DefaultTooltip
PaddableComponent
Preloader
Skin
SkinnableComponent
-------------------------------------------------------------------------------- /documentation/com/flow/motion/easing/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.motion.easing - API Documentation

Package com.flow.motion.easing

Classes
Back
Bounce
Circular
Cubic
Elastic
Exponential
Linear
Quadratic
Quartic
Quintic
Sine
-------------------------------------------------------------------------------- /lib/src/com/flow/components/VScrollBar.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components { 24 | 25 | /** 26 | * A vertical scrollbar. 27 | */ 28 | public class VScrollBar extends HScrollBar { 29 | public function VScrollBar() { 30 | super(); 31 | direction = "vertical"; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/EffectComposition.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects { 24 | public class EffectComposition { 25 | public static const SHARE_VALUE:String = "shareValue"; 26 | public static const INDEPENDENT:String = "independent"; 27 | public static const MULTIPLY:String = "multiply"; 28 | } 29 | } -------------------------------------------------------------------------------- /lib/src/mx/events/PropertyChangeEvent.as: -------------------------------------------------------------------------------- 1 | package mx.events { 2 | 3 | import flash.events.Event; 4 | 5 | public class PropertyChangeEvent extends Event { 6 | 7 | public static const PROPERTY_CHANGE:String = "propertyChange"; 8 | 9 | public var kind:String; 10 | public var newValue:Object; 11 | public var oldValue:Object; 12 | public var property:Object; 13 | public var source:Object; 14 | 15 | public static function createUpdateEvent( 16 | source:Object, 17 | property:Object, 18 | oldValue:Object, 19 | newValue:Object):PropertyChangeEvent 20 | { 21 | var event:PropertyChangeEvent = 22 | new PropertyChangeEvent(PROPERTY_CHANGE); 23 | 24 | event.kind = "update"; 25 | event.oldValue = oldValue; 26 | event.newValue = newValue; 27 | event.source = source; 28 | event.property = property; 29 | 30 | return event; 31 | } 32 | 33 | public function PropertyChangeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, kind:String = null, 34 | property:Object = null, oldValue:Object = null, newValue:Object = null, source:Object = null) { 35 | super(type, bubbles, cancelable); 36 | 37 | this.kind = kind; 38 | this.property = property; 39 | this.oldValue = oldValue; 40 | this.newValue = newValue; 41 | this.source = source; 42 | } 43 | 44 | 45 | 46 | override public function clone():Event { 47 | return new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source); 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /documentation/com/flow/components/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.components - API Documentation

Package com.flow.components

Classes
Alert
Button
Checkbox
Component
HScrollBar
Label
LabelButton
Spacing
TextArea
TextInput
VScrollBar
WebCam
-------------------------------------------------------------------------------- /lib/src/com/flow/net/RemoteProcedureTypes.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.net { 24 | 25 | /** @private */ 26 | public class RemoteProcedureTypes { 27 | public static var TEXT:String = "text"; 28 | public static var JSON:String = "json"; 29 | public static var XML:String = "xml"; 30 | public static var DISPLAY_OBJECT:String = "displayObject"; 31 | } 32 | } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/IAnimateable.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.motion { 24 | 25 | /** 26 | * Tags a class as animateable. Animateable instances can use the [Animateable] and [AnimateableChild]-metadata 27 | * on their properties and state changes will check for updates on these properties and animate them. 28 | */ 29 | public interface IAnimateable { 30 | } 31 | } -------------------------------------------------------------------------------- /documentation/com/flow/events/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.events - API Documentation

Package com.flow.events

Classes
AlertEvent
AMFGatewayEvent
CollectionEvent
CollectionEventKind
CommandEvent
ComponentEvent
InvalidationEvent
ListEvent
SorterEvent
StateEvent
WebCamEvent
-------------------------------------------------------------------------------- /documentation/mx/core/class-list.html: -------------------------------------------------------------------------------- 1 | mx.core - API Documentation

Package mx.core

Interfaces
IDeferredInstance
IFactory
IStateClient
IStateClient2
ITransientDeferredInstance
 
Classes
ClassFactory
DeferredInstanceFromFunction
EventPriority
-------------------------------------------------------------------------------- /lib/src/com/flow/events/SorterEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import flash.events.Event; 26 | 27 | public class SorterEvent extends Event { 28 | 29 | public static const SORTING_CHANGED:String = "sortingChanged"; 30 | 31 | public function SorterEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 32 | super(type, bubbles, cancelable); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Linear.as: -------------------------------------------------------------------------------- 1 | /** * Linear by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Linear { // unused params are included for compatibility with other easing classes. public static function easeNone(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ratio; } } } -------------------------------------------------------------------------------- /lib/src/com/flow/events/ComponentEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import flash.events.Event; 26 | 27 | public class ComponentEvent extends Event { 28 | 29 | public static const CREATION_COMPLETE:String = "creationComplete"; 30 | 31 | public function ComponentEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 32 | super(type, bubbles, cancelable); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /lib/src/com/flow/utils/cloneObject.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.utils { 24 | 25 | import flash.utils.ByteArray; 26 | 27 | /** 28 | * Deep clones an object. 29 | */ 30 | public function cloneObject(object:Object):Object { 31 | var buffer:ByteArray = new ByteArray(); 32 | buffer.writeObject(object); 33 | buffer.position = 0; 34 | var result:Object = buffer.readObject(); 35 | return result; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/src/com/flow/log/Log.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.log { 24 | 25 | import flash.external.ExternalInterface; 26 | 27 | /** @private */ 28 | public class Log { 29 | 30 | public function Log() { 31 | } 32 | 33 | public static function log(...rest):void { 34 | if (ExternalInterface.available) { 35 | ExternalInterface.call("console.log", rest.join(" ")); 36 | } else { 37 | trace(rest.join(" ")); 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Flow - A Flash Framework 2 | ======================== 3 | 4 | Flow is designed to fill the void between Flash and the Flex Framework. It takes best practices from Flex (such as MXML and Data Binding), but is designed to very lightweight, so it can (and should) be used in virtually any project that targets the Flash Player, where the Flex Framework is considered too heavy or too slow. 5 | 6 | The Flow Framework implements best practices that I've gathered from my 10+ years creating Flash and Flex applications. 7 | 8 | Flow borrows these from Flex: 9 | 10 | 1. MXML. Declarative programming is one big time-saver. 11 | 2. Contraint-based layout. 12 | 3. Data-binding. Once you hook up your views to data via data-binding, you swear never to go back again. 13 | 4. States. Coupled with declarative layout, states provide a fast way of putting together the visual layer of an app. 14 | 5. Transitions & Effects. I'm a sucker for smooth transitions in UI's. Flow's effects put Flex to shame. 15 | 6. Declarative graphics. Declaring shapes, fills and borders in MXML is just cool. 16 | 17 | In addition to these Flex-based features Flow brings to the table: 18 | 19 | 1. Speed. Flow is optimized and fast. (err... or at least it will be ;)) 20 | 2. File size. The Flex framework takes around 300kb without any components. Flow is 18kb. 21 | 3. Mix & match. Have a movie clip? Just put it in. Layout will still be able to deal with it. 22 | 4. Commands & CommandDispatch. A MVC micro-framework without all the boiler-plate. 23 | 5. Fire & forget loading of external assets. 24 | 25 | 26 | 27 | Questions? 28 | ---------- 29 | 30 | If you have any questions, drop me a [tweet](http://twitter.com/artman). 31 | -------------------------------------------------------------------------------- /lib/src/com/flow/events/InvalidationEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import flash.events.Event; 26 | 27 | public class InvalidationEvent extends Event { 28 | 29 | public static var INVALIDATE:String = "invalidate"; 30 | public static var INVALIDATE_LAYOUT:String = "invalidateLayout"; 31 | 32 | public function InvalidationEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 33 | super(type, bubbles, cancelable); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /lib/src/mx/core/IStateClient2.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package mx.core { 24 | 25 | import flash.events.IEventDispatcher; 26 | 27 | public interface IStateClient2 { 28 | function get states():Array; 29 | function set states(value:Array):void; 30 | function get transitions():Array; 31 | function set transitions(value:Array):void; 32 | function hasState(stateName:String):Boolean; 33 | function get currentState():String; 34 | function set currentState(value:String):void; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/src/com/flow/events/AlertEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | import flash.events.Event; 25 | 26 | /** 27 | * A event dispatched by AlertDialogs. 28 | */ 29 | public class AlertEvent extends Event { 30 | 31 | public static var ALERT_DISMISSED:String = "alertDismissed"; 32 | 33 | public var buttonIndex:int; 34 | 35 | public function AlertEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 36 | super(type, bubbles, cancelable); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /lib/src/com/flow/events/CollectionEventKind.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | public final class CollectionEventKind { 25 | public static const ADD:String = "add"; 26 | public static const MOVE:String = "move"; 27 | public static const REFRESH:String = "refresh"; 28 | public static const REMOVE:String = "remove"; 29 | public static const REPLACE:String = "replace"; 30 | public static const RESET:String = "reset"; 31 | public static const UPDATE:String = "update"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/com/flow/events/AMFGatewayEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import flash.events.Event; 26 | 27 | public class AMFGatewayEvent extends Event { 28 | public static const COMPLETE:String = "complete"; 29 | public static const ERROR:String = "error"; 30 | 31 | public var result:*; 32 | public var fault:*; 33 | 34 | public function AMFGatewayEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false){ 35 | super(type, bubbles, cancelable); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /lib/src/com/flow/events/WebCamEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import flash.events.Event; 26 | 27 | public class WebCamEvent extends Event { 28 | 29 | public static const CAMERA_MUTED:String = "cameraMuted"; 30 | public static const CAMERA_UNMUTED:String = "cameraUnmuted"; 31 | public static const CAMERA_READY:String = "cameraReady"; 32 | 33 | public function WebCamEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 34 | super(type, bubbles, cancelable); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /lib/src/com/flow/events/StateEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import flash.events.Event; 26 | 27 | public class StateEvent extends Event { 28 | 29 | public static const STATE_CHANGE:String = "stateChange"; 30 | public static const ACTIVITY_CHANGE:String = "activityChange"; 31 | public var fromState:String; 32 | public var toState:String; 33 | 34 | public function StateEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 35 | super(type, bubbles, cancelable); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/GreyscaleEffect.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects { 24 | 25 | import com.flow.effects.utils.ColorMatrix; 26 | 27 | import flash.display.DisplayObject; 28 | 29 | public class GreyscaleEffect extends ColorMatrixEffect { 30 | public function GreyscaleEffect(target:DisplayObject = null, brightness:Number = 0):void{ 31 | var colConv:ColorMatrix = new ColorMatrix(); 32 | colConv.adjustSaturation(-100); 33 | colConv.adjustBrightness(brightness); 34 | super(target, colConv.toArray()); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /lib/src/com/flow/graphics/Path.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.graphics { 24 | 25 | import com.flow.graphics.strokes.SolidStroke; 26 | 27 | import flash.geom.Point; 28 | 29 | /** 30 | * Draws a shape with the stroke- and fill-property of the component. 31 | */ 32 | public class Path extends Shape { 33 | 34 | private var _points:Vector.; 35 | private var _flipHorizontal:Boolean = false; 36 | 37 | /** 38 | * Constructor 39 | */ 40 | public function Path() { 41 | super(); 42 | fill = null; 43 | stroke = new SolidStroke(); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /lib/src/com/flow/graphics/Ellipse.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.graphics { 24 | 25 | import flash.display.Graphics; 26 | 27 | /** 28 | * Draws an ellipsis. 29 | */ 30 | [DefaultProperty("fill")] 31 | public class Ellipse extends Geometry { 32 | 33 | /** 34 | * Constructor. 35 | */ 36 | public function Ellipse() { 37 | super(); 38 | stroke = null; 39 | } 40 | 41 | /** @private */ 42 | override public function draw(width:Number, height:Number):void { 43 | super.draw(width, height); 44 | graphics.drawEllipse(0,0, width, height); 45 | endDraw(); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /lib/build/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/src/com/flow/view/StatesView.mxml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /lib/src/com/flow/effects/InnerGlowEffect.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects { 24 | 25 | import flash.display.DisplayObject; 26 | 27 | public class InnerGlowEffect extends GlowEffect { 28 | 29 | public function InnerGlowEffect(target:DisplayObject = null, color:Number = 0xFF0000, alpha:Number = 1,_blurX:Number = 20, blurY:Number = 20, strength:Number = 4, quality:Number = 1){ 30 | super(target, color, alpha, blurX, blurY, strength, quality); 31 | } 32 | 33 | override protected function validateProperties():void { 34 | super.validateProperties(); 35 | filter.inner = true; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /lib/src/com/flow/graphics/Line.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.graphics { 24 | 25 | import com.flow.graphics.strokes.SolidStroke; 26 | 27 | /** 28 | * Draws a line according to the widht and height with the stroke-property of the component. 29 | */ 30 | public class Line extends Geometry { 31 | 32 | /** 33 | * Constructor 34 | */ 35 | public function Line() { 36 | stroke = new SolidStroke(); 37 | } 38 | 39 | /** @private */ 40 | override public function draw(width:Number, height:Number):void { 41 | super.draw(width, height); 42 | graphics.moveTo(0,0); 43 | graphics.lineTo(width,height); 44 | endDraw(); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /lib/src/com/flow/components/supportClasses/DefaultTooltip.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components.supportClasses { 24 | 25 | import flash.text.TextField; 26 | 27 | /** 28 | * A very simple default tooltip skin. 29 | */ 30 | public class DefaultTooltip extends TextField implements ITooltip { 31 | 32 | private var textField:TextField; 33 | 34 | public function DefaultTooltip() { 35 | autoSize="left"; 36 | } 37 | 38 | override public function set text(value:String):void { 39 | super.text = value; 40 | } 41 | 42 | public function setLocation(x:int, y:int, stageWidth:int, stageHeight:int):void { 43 | this.x = x; 44 | this.y = y-20; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /lib/src/com/flow/events/ListEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | import com.flow.components.Component; 25 | 26 | import flash.events.Event; 27 | 28 | public class ListEvent extends Event { 29 | 30 | public static const RENDERER_CREATED:String = "rendererCreated"; 31 | public static const SELECTION_CHANGED:String = "selectionChanged"; 32 | public static const ITEM_CLICKED:String = "itemClicked"; 33 | public static const ITEMS_CREATED:String = "itemsCreated"; 34 | 35 | public var renderer:Component; 36 | 37 | public function ListEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 38 | super(type, bubbles, cancelable); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Quadratic.as: -------------------------------------------------------------------------------- 1 | /** * Quadratic by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Quadratic { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ratio*ratio; } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return -ratio*(ratio-2); } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio < 0.5) ? 2*ratio*ratio : -2*ratio*(ratio-2)-1; } } } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Sine.as: -------------------------------------------------------------------------------- 1 | /** * Sine by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Sine { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return 1-Math.cos(ratio * (Math.PI / 2)); } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return Math.sin(ratio * (Math.PI / 2)); } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return -0.5*(Math.cos(ratio*Math.PI)-1); } } } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Cubic.as: -------------------------------------------------------------------------------- 1 | /** * Cubic by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Cubic { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ratio*ratio*ratio; } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio-=1)*ratio*ratio+1; } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio < 0.5) ? 4*ratio*ratio*ratio : 4*(ratio-=1)*ratio*ratio+1; } } } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Quartic.as: -------------------------------------------------------------------------------- 1 | /** * Quartic by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Quartic { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ratio*ratio*ratio*ratio; } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return 1-(ratio-=1)*ratio*ratio*ratio; } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio < 0.5) ? 8*ratio*ratio*ratio*ratio : -8*(ratio-=1)*ratio*ratio*ratio+1; } } } -------------------------------------------------------------------------------- /lib/src/com/flow/components/supportClasses/ITooltip.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components.supportClasses { 24 | /** 25 | * A custom tooltip skin needs to implment this interface. 26 | */ 27 | public interface ITooltip { 28 | /** 29 | * Sets the text on the tooltip skin. 30 | * @param The text to show. 31 | */ 32 | function set text(value:String):void; 33 | /** 34 | * Sets the location of the tooltip. The implementor is responsible for checking that the tooltip fits on screen. 35 | * @param The x position of the tooltip caret. 36 | * @param The y position of the tooltip caret. 37 | * @param The width of the stage. 38 | * @param The height of the stage. 39 | */ 40 | function setLocation(x:int, y:int, stageWidth:int, stageHeight:int):void; 41 | } 42 | } -------------------------------------------------------------------------------- /lib/src/com/flow/utils/hasPlayerVersion.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.utils { 24 | 25 | import flash.system.Capabilities; 26 | 27 | /** 28 | * Checks if the client is running a compatible Flash Player version. 29 | */ 30 | public function hasPlayerVersion(major:int, minor:int = 0, build:int = 0):Boolean { 31 | var ver:Array = Capabilities.version.split(" ")[1].split(","); 32 | var playerMajor:int = parseInt(ver[0]); 33 | var playerMinor:int = parseInt(ver[1]); 34 | var playerBuild:int = parseInt(ver[2]); 35 | if(playerMajor < major) { 36 | return false; 37 | } else if(playerMajor == major) { 38 | if(playerMinor < minor) { 39 | return false; 40 | } else if(playerMinor == minor) { 41 | return playerBuild >= build; 42 | } 43 | } 44 | return true; 45 | } 46 | } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Quintic.as: -------------------------------------------------------------------------------- 1 | /** * Quintic by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Quintic { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ratio*ratio*ratio*ratio*ratio; } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return 1+(ratio-=1)*ratio*ratio*ratio*ratio; } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio < 0.5) ? 16*ratio*ratio*ratio*ratio*ratio : 16*(ratio-=1)*ratio*ratio*ratio*ratio+1; } } } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Circular.as: -------------------------------------------------------------------------------- 1 | /** * Circular by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Circular { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return -(Math.sqrt(1-ratio*ratio)-1); } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return Math.sqrt(1-(ratio-1)*(ratio-1)); } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ((ratio *= 2) < 1) ? -0.5*(Math.sqrt(1-ratio*ratio)-1) : 0.5*(Math.sqrt(1-(ratio-=2)*ratio)+1); } } } -------------------------------------------------------------------------------- /lib/src/com/flow/events/CommandEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import com.flow.commands.Command; 26 | 27 | import flash.events.Event; 28 | 29 | public class CommandEvent extends Event { 30 | 31 | public static var COMPLETE:String = "complete"; 32 | public static var ERROR:String = "fault"; 33 | public static var EXECUTE:String = "execute"; 34 | public static var EXECUTED:String = "executed"; 35 | public static var EXECUTE_COMPLETE:String = "executeComplete"; 36 | 37 | /** If the command results in data, it's stored here */ 38 | public var command:Command; 39 | public var data:* = null; 40 | 41 | 42 | public function CommandEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 43 | super(type, bubbles, cancelable); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/OuterBevelEffect.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects { 24 | 25 | import flash.display.DisplayObject; 26 | 27 | public class OuterBevelEffect extends BevelEffect { 28 | public function OuterBevelEffect(target:DisplayObject = null, distance:Number = 3, angle:Number = 45, highlightColor:int = 0xFFFFFF, highlightAlpha:Number = 0.5, shadowColor:int = 0, shadowAlpha:Number = 0.5, blurX:Number = 5, blurY:Number = 5, strength:Number = 3, bevelQuality:Number = 1){ 29 | super(target, distance, angle, highlightColor, highlightAlpha, shadowColor, shadowAlpha, blurX, blurY, strength, bevelQuality); 30 | } 31 | 32 | override protected function validateProperties():void { 33 | super.validateProperties(); 34 | filter.type = "outer"; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/FullBevelEffect.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects { 24 | 25 | import flash.display.DisplayObject; 26 | 27 | public class FullBevelEffect extends BevelEffect { 28 | 29 | public function FullBevelEffect(target:DisplayObject = null, distance:Number = 3, angle:Number = 45, highlightColor:int = 0xFFFFFF, highlightAlpha:Number = 0.5, shadowColor:int = 0, shadowAlpha:Number = 0.5, blurX:Number = 5, blurY:Number = 5, strength:Number = 3, bevelQuality:Number = 1){ 30 | super(target, distance, angle, highlightColor, highlightAlpha, shadowColor, shadowAlpha, blurX, blurY, strength, bevelQuality); 31 | } 32 | 33 | override protected function validateProperties():void { 34 | super.validateProperties(); 35 | filter.type = "full"; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /lib/src/com/flow/graphics/strokes/IStroke.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.graphics.strokes { 24 | 25 | import com.flow.motion.IAnimateable; 26 | 27 | import flash.display.Graphics; 28 | import flash.events.IEventDispatcher; 29 | 30 | /** 31 | * A IStroke instance is responsible for setting the lineStyle on the graphics context that is about to be drawn to. 32 | */ 33 | public interface IStroke extends IEventDispatcher, IAnimateable { 34 | /** 35 | * The stroke needs to set the lineStyle on the given graphics context. 36 | * @param The graphics context whos lineStyle to set. 37 | * @param The width of the rendering that is about to happen. 38 | * @param The height of the rendering that is about to happen. 39 | */ 40 | function beginDraw(graphics:Graphics, width:int, height:int):void; 41 | function get thickness():Number; 42 | } 43 | } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Back.as: -------------------------------------------------------------------------------- 1 | /** * Back by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. **/ public class Back { protected static var s:Number = 1.70158; // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ratio*ratio*((s+1)*ratio-s); } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio -= 1)*ratio*((s+1)*ratio+s)+1 } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ((ratio *= 2) < 1) ? 0.5*(ratio*ratio*((s*1.525+1)*ratio-s*1.525)) : 0.5*((ratio -= 2)*ratio*((s*1.525+1)*ratio+s*1.525)+2); } } } -------------------------------------------------------------------------------- /lib/src/com/flow/utils/callLater.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.utils { 24 | 25 | import flash.display.Sprite; 26 | import flash.events.Event; 27 | 28 | /** 29 | * Calls a function n frames later 30 | */ 31 | public function callLater(closure:Function, frameCount:int = 1, ...rest):void { 32 | var beacon:Sprite = new Sprite(); 33 | Hooks.callLaterHooks[beacon] = closure; 34 | var timedFunction:Function=function():void{ 35 | if(--frameCount <= 0){ 36 | beacon.removeEventListener(Event.ENTER_FRAME,timedFunction); 37 | closure.apply(this,rest); 38 | delete Hooks.callLaterHooks[beacon]; 39 | } 40 | }; 41 | beacon.addEventListener(Event.ENTER_FRAME,timedFunction); 42 | } 43 | } 44 | 45 | internal class Hooks { 46 | import flash.utils.Dictionary; 47 | public static var callLaterHooks:Dictionary = new Dictionary(false); 48 | } 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/src/com/flow/containers/ConfirmCancelHBox.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.containers { 24 | import com.flow.containers.layout.HBoxLayout; 25 | import com.flow.containers.layout.LayoutBase; 26 | 27 | import flash.system.Capabilities; 28 | import flash.system.System; 29 | 30 | /** 31 | * The OKCancelHBox is a HBox that orders it's buttons according to the conventions of the user's platform. You define the buttons in 32 | * the order that Windows would order it's buttons (ok first, cancel second). On a Mac, the order is inverted to conform to the 33 | * convetions of MacOS. 34 | */ 35 | public class ConfirmCancelHBox extends HBox { 36 | 37 | /** Constructor */ 38 | public function ConfirmCancelHBox() { 39 | super(); 40 | horizontalAlign = "right"; 41 | inverted = Capabilities.os.indexOf("Mac") != -1 || Capabilities.os.indexOf("iPhone") != -1; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Exponential.as: -------------------------------------------------------------------------------- 1 | /** * Exponential by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Exponential { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio == 0) ? 0 : Math.pow(2, 10 * (ratio - 1)); } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return (ratio == 1) ? 1 : 1-Math.pow(2, -10 * ratio); } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { if (ratio == 0 || ratio == 1) { return ratio; } if (0 > (ratio = ratio*2-1)) { return 0.5*Math.pow(2, 10*ratio); } return 1-0.5*Math.pow(2, -10*ratio); } } } -------------------------------------------------------------------------------- /lib/src/com/flow/components/Spacing.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components { 24 | 25 | import flash.display.Sprite; 26 | 27 | /** 28 | * A spacer to be used in horizontal or vertical layouts 29 | */ 30 | public class Spacing extends Sprite { 31 | private var _width:int; 32 | private var _height:int; 33 | 34 | /** Constructor */ 35 | public function Spacing() { 36 | width=1; 37 | height=1; 38 | super(); 39 | } 40 | 41 | /** The width of the spacer */ 42 | override public function get width():Number { 43 | return _width; 44 | } 45 | override public function set width(value:Number):void { 46 | _width = value; 47 | } 48 | 49 | /** The height of the spacer */ 50 | override public function get height():Number { 51 | return _height; 52 | } 53 | override public function set height(value:Number):void { 54 | _height = value; 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /lib/src/com/flow/media/MediaURL.as: -------------------------------------------------------------------------------- 1 | package com.flow.media { 2 | 3 | public class MediaURL { 4 | 5 | private var _url:String; 6 | private var _protocol:String; 7 | private var _host:String; 8 | private var _application:String; 9 | private var _stream:String; 10 | 11 | public function MediaURL(url:String):void { 12 | _url = url; 13 | parseURL(); 14 | } 15 | 16 | [Bindable] 17 | public function get url():String { 18 | return _url 19 | } 20 | private function set url(value:String):void { 21 | _url = value; 22 | parseURL(); 23 | } 24 | 25 | public function get protocol():String { 26 | return _protocol; 27 | } 28 | 29 | public function get host():String { 30 | return _host; 31 | } 32 | 33 | public function get application():String { 34 | return _application; 35 | } 36 | 37 | public function get stream():String { 38 | return _stream; 39 | } 40 | 41 | public function get isRTMP():Boolean { 42 | if(!protocol) { 43 | return false 44 | }; 45 | var protocols:Array = ["rtmp", "rtmpe", "rtmps", "rtmpt", "rtmfp"]; 46 | if(protocols.indexOf(protocol) != -1) { 47 | return true; 48 | } 49 | return false 50 | } 51 | 52 | private function parseURL():void { 53 | _protocol = null; 54 | _application = null; 55 | _host = null; 56 | _stream = null; 57 | 58 | if(_url) { 59 | if(_url.indexOf("://") == -1) { 60 | throw new Error("Media url has no protocol"); 61 | } 62 | var split:Array = _url.split("://"); 63 | _protocol = split.shift(); 64 | split = split.join("://").split("/"); 65 | _host = split.shift(); 66 | 67 | if(isRTMP && split.length) { 68 | _application = split.shift(); 69 | if(split.length) { 70 | if(split.length > 1) { 71 | _application = _application + "/" + split.shift(); 72 | _stream = split.join("/"); 73 | } else { 74 | _stream = split[0] 75 | } 76 | } else { 77 | _stream = _application; 78 | _application = null; 79 | 80 | } 81 | } else { 82 | _application = null; 83 | } 84 | } 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /lib/src/com/flow/net/loaders/XMLLoader.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.net.loaders { 24 | 25 | import flash.events.Event; 26 | 27 | /** 28 | * Loads XML data from a remote location. 29 | */ 30 | public class XMLLoader extends TextLoader { 31 | 32 | private var xml:XML; 33 | 34 | /** 35 | * Constructor. Starts loading the XML resource. 36 | * @param The URL from which to load the XML resource. This can be of type String or URLRequest. If String, a URLRequest is automatically 37 | * created using GET. 38 | */ 39 | public function XMLLoader(url:*) { 40 | super(url); 41 | } 42 | 43 | /** @private */ 44 | override protected function complete(e:Event):void { 45 | xml = new XML(e.target.data); 46 | super.complete(e); 47 | } 48 | 49 | /** The resulting XML instance. */ 50 | override public function get result():* { 51 | return xml; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /documentation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | API Documentation 4 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | <body> 31 | <h2>Frame Alert</h2> 32 | <p> 33 | This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 34 | <br> 35 | Link to <a href="package-summary.html">Non-frame version.</a> 36 | </p> 37 | </body> 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/src/com/flow/motion/AnimationProperty.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.motion { 24 | 25 | import com.flow.effects.utils.ColorRGB; 26 | 27 | /** @private */ 28 | public class AnimationProperty { 29 | 30 | public var name:String; 31 | public var value:*; 32 | public var startValue:*; 33 | public var deltaValue:*; 34 | public var type:String; 35 | 36 | /** 37 | * Constructor. You should never have to instantiate this yourself. 38 | */ 39 | public function AnimationProperty(name:String, value:* = null, type:String = null) { 40 | this.name = name; 41 | this.value = value; 42 | this.type = type; 43 | } 44 | 45 | /** 46 | * @private 47 | */ 48 | public function currentValue(ratio:Number):* { 49 | switch(type) { 50 | case "color": 51 | return new ColorRGB(startValue).mix(new ColorRGB(startValue + deltaValue), ratio).color; 52 | default: 53 | return startValue + deltaValue * ratio; 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /lib/src/com/flow/utils/callLaterTimed.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.utils { 24 | 25 | import flash.display.Sprite; 26 | import flash.events.Event; 27 | import flash.utils.getTimer; 28 | 29 | /** 30 | * Calls a function n seconds later. 31 | */ 32 | public function callLaterTimed(closure:Function, seconds:Number = 0.5, ...rest):void { 33 | var beacon:Sprite = new Sprite(); 34 | var startTime:Number = getTimer(); 35 | Hooks.callLaterHooks[beacon] = closure; 36 | var timedFunction:Function=function():void{ 37 | if(getTimer() > startTime + seconds*1000){ 38 | beacon.removeEventListener(Event.ENTER_FRAME, timedFunction); 39 | closure.apply(this, rest); 40 | delete Hooks.callLaterHooks[beacon]; 41 | } 42 | }; 43 | beacon.addEventListener(Event.ENTER_FRAME, timedFunction); 44 | } 45 | } 46 | 47 | internal class Hooks { 48 | import flash.utils.Dictionary; 49 | public static var callLaterHooks:Dictionary = new Dictionary(false); 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Bounce.as: -------------------------------------------------------------------------------- 1 | /** * Bounce by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Bounce { // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return 1-easeOut(1-ratio,0,0,0); } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { if (ratio < 1/2.75) { return 7.5625*ratio*ratio; } else if (ratio < 2/2.75) { return 7.5625*(ratio-=1.5/2.75)*ratio+0.75; } else if (ratio < 2.5/2.75) { return 7.5625*(ratio-=2.25/2.75)*ratio+0.9375; } else { return 7.5625*(ratio-=2.625/2.75)*ratio+0.984375; } } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { return ((ratio*=2) < 1) ? 0.5*easeIn(ratio,0,0,0) : 0.5*easeOut(ratio-1,0,0,0)+0.5; } } } -------------------------------------------------------------------------------- /lib/src/com/flow/graphics/Geometry.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.graphics { 24 | 25 | import com.flow.components.Component; 26 | 27 | /** 28 | * The base class for all geometry classes. 29 | */ 30 | [DefaultProperty("stroke")] 31 | public class Geometry extends Component { 32 | 33 | /** 34 | * Constructor 35 | */ 36 | public function Geometry() { 37 | super(); 38 | } 39 | 40 | /** @private */ 41 | override protected function checkVisibility():Boolean { 42 | return true; 43 | } 44 | 45 | /** 46 | * @inheritDoc 47 | */ 48 | override public function draw(w:Number, h:Number):void { 49 | graphics.clear(); 50 | graphics.lineStyle(undefined); 51 | if (_stroke) { 52 | _stroke.beginDraw(graphics, w, h); 53 | } 54 | if (_fill) { 55 | _fill.beginDraw(graphics, w, h); 56 | } 57 | } 58 | 59 | /** 60 | * @private 61 | */ 62 | public function endDraw():void { 63 | if (_fill) { 64 | _fill.endDraw(graphics); 65 | } 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /examples/src/com/flow/view/ScrollingView.mxml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 28 | 29 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /documentation/com/flow/effects/class-list.html: -------------------------------------------------------------------------------- 1 | com.flow.effects - API Documentation

Package com.flow.effects

Classes
BevelEffect
BlurEffect
ChihulyEffect
ColorMatrixEffect
ColorTransformEffect
CSBEffect
DropShadowEffect
Effect
EffectComposition
FlipEffect
FullBevelEffect
GlowEffect
GreyscaleEffect
InnerGlowEffect
MaskFilterEffect
OuterBevelEffect
PixelateEffect
RadialWipeEffect
RippleEffect
TintEffect
Transform3DEffect
WipeEffect
-------------------------------------------------------------------------------- /lib/src/com/flow/components/TextArea.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components { 24 | 25 | import flash.events.TextEvent; 26 | 27 | /** 28 | * A text area component that displays multiple lines of text and can be used by the user to input text. 29 | */ 30 | public class TextArea extends TextInput { 31 | 32 | /** Whether to allow the entry of a carriage return */ 33 | public var allowEnter:Boolean = true; 34 | 35 | public function TextArea() { 36 | super(); 37 | } 38 | 39 | /** @inheritDoc */ 40 | [SkinPart(required="true")] 41 | override public function set labelDisplay(value:Label):void { 42 | super.labelDisplay = value; 43 | if(_labelDisplay) { 44 | _labelDisplay.multiline = true; 45 | _labelDisplay.textField.addEventListener(TextEvent.TEXT_INPUT, textInput); 46 | } 47 | } 48 | override public function get labelDisplay():Label { 49 | return _labelDisplay; 50 | } 51 | 52 | /** @private */ 53 | protected function textInput(e:TextEvent):void { 54 | if(!allowEnter && e.text.charCodeAt() == 10) { 55 | e.preventDefault(); 56 | } 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /lib/src/com/flow/skins/TextInputSkin.mxml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 28 | 29 | 30 | [HostComponent("com.flow.components.TextInput")] 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /lib/src/com/flow/net/loaders/JSONLoader.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.net.loaders { 24 | 25 | import com.adobe.serialization.json.JSONParsing; 26 | 27 | import flash.events.Event; 28 | import flash.events.IOErrorEvent; 29 | 30 | /** 31 | * Loads JSON data from a remote URL. 32 | */ 33 | public class JSONLoader extends TextLoader { 34 | 35 | private var data:Object; 36 | 37 | /** 38 | * Constructor. Commences the load operation. 39 | * @param The URL from which to load the JSON data from. This can be of type String or URLRequest. If String, a URLRequest is automatically 40 | * created using GET. 41 | */ 42 | public function JSONLoader(url:*) { 43 | super(url); 44 | } 45 | 46 | /** @private */ 47 | override protected function complete(e:Event):void { 48 | if(e.target.data) { 49 | try { 50 | data = JSONParsing.decode(e.target.data); 51 | } catch (e:Error) { 52 | super.fail(new IOErrorEvent(IOErrorEvent.VERIFY_ERROR)); 53 | } 54 | } 55 | super.complete(e); 56 | } 57 | 58 | /** The resulting, decoded JSON data. */ 59 | override public function get result():* { 60 | return data; 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /lib/src/com/flow/skins/TextAreaSkin.mxml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 28 | 29 | 30 | [HostComponent("com.flow.components.TextInput")] 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /documentation/index-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flow Framework 4 | 5 | 6 | 7 | 8 | 9 |

Index

10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
AN
BO
CP
DQ
ER
FS
GT
HU
IV
JW
KX
LY
MZ
70 | -------------------------------------------------------------------------------- /lib/src/com/flow/events/CollectionEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.events { 24 | 25 | import flash.events.Event; 26 | 27 | /** 28 | * A event dispatched by Collections. 29 | */ 30 | public class CollectionEvent extends Event { 31 | 32 | public static const COLLECTION_CHANGE:String = "collectionChange"; 33 | 34 | public function CollectionEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, kind:String = null, location:int = -1, oldLocation:int = -1, items:Array = null) { 35 | super(type, bubbles, cancelable); 36 | this.kind = kind; 37 | this.location = location; 38 | this.oldLocation = oldLocation; 39 | this.items = items ? items : []; 40 | } 41 | 42 | /** 43 | * The type of the event. 44 | */ 45 | public var kind:String; 46 | 47 | /** 48 | * Items affected by the operation preceding that event. 49 | */ 50 | public var items:Array; 51 | 52 | /** 53 | * The location which the preceding operation in the Collection changed. 54 | */ 55 | public var location:int; 56 | 57 | /** 58 | * The old location of an item moved by an operation. 59 | */ 60 | public var oldLocation:int; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/src/com/flow/graphics/fills/IFill.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.graphics.fills { 24 | 25 | import com.flow.motion.IAnimateable; 26 | 27 | import flash.display.Graphics; 28 | import flash.events.IEventDispatcher; 29 | 30 | /** 31 | * A IFill instance is responsible to call beginFill and endFill on the graphics context before and after drawing occurs. 32 | */ 33 | [Event(name="invalidate", type="com.flow.events.InvalidateEvent")] 34 | public interface IFill extends IEventDispatcher, IAnimateable { 35 | /** 36 | * Called when a draw is about to commence on the given graphics context. The implementation needs to begin a fill on the 37 | * given graphics context. 38 | * @param The graphics context to begin the fill on. 39 | * @param The width at which a draw is about to commence. 40 | * @param The height at which a draw is about to commence. 41 | */ 42 | function beginDraw(graphics:Graphics, width:int, height:int):void ; 43 | 44 | /** 45 | * Called when a draw has finished. The implementation needs to end the fill on the given graphics context. 46 | * @param The graphics context to end the fill on. 47 | */ 48 | function endDraw(graphics:Graphics):void; 49 | } 50 | } -------------------------------------------------------------------------------- /lib/src/com/flow/components/PushButton.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components { 24 | import flash.events.MouseEvent; 25 | 26 | /** 27 | * A button that can be pushed down and stays down 28 | */ 29 | [SkinState("selected")] 30 | 31 | public class PushButton extends Button { 32 | 33 | private var _selected:Boolean = false; 34 | private var _pushOnly:Boolean = false; 35 | 36 | public function PushButton() { 37 | super(); 38 | addEventListener(MouseEvent.CLICK, toggle); 39 | } 40 | 41 | private function toggle(e:MouseEvent):void { 42 | if(!pushOnly || !selected) { 43 | selected = !selected; 44 | } 45 | } 46 | 47 | /** 48 | * The selected state of the button. 49 | */ 50 | [Bindable] 51 | public function get selected():Boolean { 52 | return _selected; 53 | } 54 | public function set selected(value:Boolean):void { 55 | _selected = value; 56 | if(_selected) { 57 | addState("selected"); 58 | } else { 59 | removeState("selected"); 60 | } 61 | } 62 | 63 | [Bindable] 64 | public function get pushOnly():Boolean { 65 | return _pushOnly; 66 | } 67 | public function set pushOnly(value:Boolean):void { 68 | _pushOnly = value; 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /lib/src/com/flow/net/loaders/AMFLoader.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.net.loaders { 24 | 25 | import com.adobe.serialization.json.JSONParsing; 26 | 27 | import flash.events.Event; 28 | import flash.events.IOErrorEvent; 29 | import flash.utils.ByteArray; 30 | 31 | /** 32 | * Loads binary data and deserializes the result using AMF3 33 | */ 34 | public class AMFLoader extends BinaryLoader { 35 | 36 | private var data:Object; 37 | 38 | /** 39 | * Constructor. Commences the load operation. 40 | * @param The URL from which to load the data from. This can be of type String or URLRequest. If String, a URLRequest is automatically 41 | * created using GET. 42 | */ 43 | public function AMFLoader(url:*) { 44 | super(url); 45 | } 46 | 47 | /** @private */ 48 | override protected function complete(e:Event):void { 49 | if(e.target.data) { 50 | try { 51 | data = (e.target.data as ByteArray).readObject(); 52 | } catch (e:Error) { 53 | super.fail(new IOErrorEvent(IOErrorEvent.VERIFY_ERROR)); 54 | } 55 | } 56 | super.complete(e); 57 | } 58 | 59 | /** The resulting, deserialized data. */ 60 | override public function get result():* { 61 | return data; 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/FlipEffect.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects { 24 | 25 | import flash.display.BitmapData; 26 | import flash.display.DisplayObject; 27 | import flash.display.Shader; 28 | import flash.filters.ShaderFilter; 29 | 30 | public class FlipEffect extends Effect { 31 | [Embed(source='pixelbender/flip.pbj', mimeType='application/octet-stream')] 32 | private var PixelatePbj:Class; 33 | private var shader:Shader; 34 | private var filter:ShaderFilter; 35 | 36 | public function FlipEffect(target:DisplayObject = null){ 37 | super(target); 38 | shader = new Shader(new PixelatePbj()); 39 | filter = new ShaderFilter(shader); 40 | } 41 | 42 | override protected function render(val:Number):Array { 43 | var bmp:BitmapData = new BitmapData(_target.width, _target.height, true, 0); 44 | if(val) { 45 | shader.data.src1.input = bmp; 46 | shader.data.src2.input = bmp; 47 | shader.data.size.value = [_target.width+1, _target.height+1]; 48 | shader.data.borderThickness.value = [3]; 49 | shader.data.borderColor.value = [1.0, 1.0, 1.0]; 50 | shader.data.phase.value = [val]; 51 | return new Array(filter); 52 | } else { 53 | return new Array(); 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/PixelateEffect.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects { 24 | 25 | import flash.display.DisplayObject; 26 | import flash.display.Shader; 27 | import flash.filters.ShaderFilter; 28 | 29 | public class PixelateEffect extends Effect { 30 | [Embed(source='pixelbender/pixelate.pbj', mimeType='application/octet-stream')] 31 | 32 | private var PixelatePbj:Class; 33 | private var shader:Shader; 34 | private var filter:ShaderFilter; 35 | private var _amount:int; 36 | 37 | public function PixelateEffect(target:DisplayObject = null, amount:int = 20){ 38 | super(target); 39 | this.amount = amount; 40 | shader = new Shader(new PixelatePbj()); 41 | filter = new ShaderFilter(shader); 42 | } 43 | 44 | [Animateable] 45 | public function get amount():int { 46 | return _amount; 47 | } 48 | public function set amount(value:int):void { 49 | if(value != _amount) { 50 | _amount = value; 51 | invalidate(); 52 | } 53 | } 54 | 55 | override protected function render(val:Number):Array { 56 | if(1 + Math.round(amount * val) != 1) { 57 | shader.data.dimension.value = [1 + Math.round(amount * val)]; 58 | return new Array(filter); 59 | } else { 60 | return new Array(); 61 | } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /lib/src/com/flow/skins/ButtonSkin.mxml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 28 | 29 | 30 | [HostComponent("com.flow.components.Button")] 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /lib/src/com/flow/motion/easing/Elastic.as: -------------------------------------------------------------------------------- 1 | /** * Elastic by Grant Skinner. Nov 3, 2009 * Visit www.gskinner.com/blog for documentation, updates and more free code. * * Adapted from Robert Penner's AS3 tweening equations. * * Copyright (c) 2009 Grant Skinner * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ package com.flow.motion.easing { /** * Easing class for use with GTween and Flow's Tween. */ public class Elastic { protected static var a:Number=1; protected static var p:Number=0.3; protected static var s:Number=p/4; // unused params are included for compatibility with other easing classes. public static function easeIn(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { if (ratio == 0 || ratio == 1) { return ratio; } return -(a * Math.pow(2, 10 * (ratio -= 1)) * Math.sin((ratio - s) * (2 * Math.PI) / p)); } public static function easeOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { if (ratio == 0 || ratio == 1) { return ratio; } return a * Math.pow(2, -10 * ratio) * Math.sin((ratio - s) * (2 * Math.PI) / p) + 1; } public static function easeInOut(ratio:Number, unused1:Number, unused2:Number, unused3:Number):Number { if (ratio == 0 || ratio == 1) { return ratio; } ratio = ratio*2-1; if (ratio < 0) { return -0.5 * (a * Math.pow(2, 10 * ratio) * Math.sin((ratio - s*1.5) * (2 * Math.PI) /(p*1.5))); } return 0.5 * a * Math.pow(2, -10 * ratio) * Math.sin((ratio - s*1.5) * (2 * Math.PI) / (p*1.5)) + 1; } } } -------------------------------------------------------------------------------- /lib/src/com/flow/net/RemoteProcedureAMF.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.net { 24 | 25 | /** @private */ 26 | public class RemoteProcedureAMF { 27 | 28 | [Bindable] public var lastResult:* = null; 29 | [Bindable] public var lastError:* = null; 30 | 31 | [Inspectable(category="Data")] 32 | public var gateway:AMFGateway; 33 | 34 | public var procedure:String; 35 | private var _parameters:Array; 36 | public var autoSend:Boolean = false; 37 | private var lastResponder:AMFGatewayResponder; 38 | 39 | public function RemoteProcedureAMF() { 40 | } 41 | 42 | public function get parameters():Array { 43 | return _parameters; 44 | } 45 | 46 | public function set parameters(value:Array):void { 47 | if(_parameters != value) { 48 | _parameters = value; 49 | if(autoSend) { 50 | send(); 51 | } 52 | } 53 | } 54 | 55 | public function send():void { 56 | var params:Array = [procedure].concat(parameters); 57 | if(lastResponder) { 58 | lastResponder.addHandlers(null, null); 59 | } 60 | lastResponder = gateway.rp.apply(this, params); 61 | lastResponder.addHandlers(result, error); 62 | } 63 | 64 | private function result(result:*):void { 65 | lastResult = result; 66 | } 67 | 68 | private function error(error:*):void { 69 | lastError = error; 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /lib/src/com/flow/components/measuring/MeasureUnits.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.components.measuring { 24 | /** 25 | * A collection of measure units that can be accessed using the measeureUnits property of a Component. Accessing these is faster 26 | * than to access all the measure units individually. A MeasureUnits instance is usually used in a Layout-class. 27 | * @author artman 28 | * @see MeasureUnit 29 | */ 30 | public class MeasureUnits { 31 | /** The MeasureUnit for the top property. */ 32 | public var top:MeasureUnit; 33 | /** The MeasureUnit for the bottom property. */ 34 | public var bottom:MeasureUnit; 35 | /** The MeasureUnit for the left property. */ 36 | public var left:MeasureUnit; 37 | /** The MeasureUnit for the right property. */ 38 | public var right:MeasureUnit; 39 | /** The MeasureUnit for the width property. */ 40 | public var w:MeasureUnit; 41 | /** The MeasureUnit for the height property. */ 42 | public var h:MeasureUnit; 43 | /** The MeasureUnit for the verticalCenter property. */ 44 | public var verticalCenter:MeasureUnit; 45 | /** The MeasureUnit for the horizontalCenter property. */ 46 | public var horizontalCenter:MeasureUnit; 47 | 48 | /** 49 | * Constructor. You never need to instantiate this class directly. 50 | */ 51 | public function MeasureUnits() { 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /lib/src/com/flow/containers/layout/AlignType.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.containers.layout { 24 | 25 | /** 26 | * A collection of static variables used to describe how layouts should align their children. 27 | */ 28 | public class AlignType { 29 | 30 | /** 31 | * A static constant describing the vertical top-alignment. 32 | */ 33 | public static const ALIGN_TOP:String = "top"; 34 | 35 | /** 36 | * A static constant describing the vertical middle-alignment. 37 | */ 38 | public static const ALIGN_MIDDLE:String = "middle"; 39 | 40 | /** 41 | * A static constant describing the vertical bottom-alignment. 42 | */ 43 | public static const ALIGN_BOTTOM:String = "bottom"; 44 | 45 | /** 46 | * A static constant describing no alignment 47 | */ 48 | public static const ALIGN_NONE:String = "none"; 49 | 50 | /** 51 | * A static constant describing the horizontal left-alignment. 52 | */ 53 | public static const ALIGN_LEFT:String = "left"; 54 | 55 | /** 56 | * A static constant describing the horizontal center-alignment. 57 | */ 58 | public static const ALIGN_CENTER:String = "center"; 59 | 60 | /** 61 | * A static constant describing the horizontal right-alignment. 62 | */ 63 | public static const ALIGN_RIGHT:String = "right"; 64 | 65 | public function AlignType() { 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /lib/src/com/flow/effects/transitions/EffectTransition.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.effects.transitions { 24 | 25 | import com.flow.components.Component; 26 | import com.flow.effects.Effect; 27 | import com.flow.motion.Tween; 28 | 29 | [DefaultProperty("effect")] 30 | public class EffectTransition extends FadeTransition { 31 | 32 | public var fade:Boolean; 33 | public var effect:Effect; 34 | 35 | public function EffectTransition(effect:Effect = null, speed:Number = 0.3, speedOut:Number = 0, fade:Boolean = true) { 36 | super(speed, speedOut); 37 | this.effect = effect; 38 | this.fade = fade; 39 | } 40 | 41 | override protected function initTarget(target:Component):void { 42 | effect.target = target; 43 | if(fade) { 44 | effect.targetAlpha = 0; 45 | } else { 46 | effect.value = 1; 47 | } 48 | } 49 | 50 | override public function animateShow(speed:Number):void { 51 | if(fade) { 52 | effect.fadeTargetIn(speed); 53 | } else { 54 | effect.animateOut(speed); 55 | } 56 | } 57 | 58 | override public function animateHide(speed:Number):void { 59 | var tween:Tween; 60 | if(fade) { 61 | tween = effect.fadeTargetOut(speed); 62 | } else { 63 | tween = effect.animateIn(speed); 64 | } 65 | tween.completeHandler = hideDone; 66 | } 67 | 68 | private function hideDone(tween:Tween):void { 69 | complete(); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /lib/src/com/adobe/serialization/json/JSONTokenType.as: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008, Adobe Systems Incorporated 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | * Neither the name of Adobe Systems Incorporated nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 21 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | package com.adobe.serialization.json 34 | { 35 | 36 | /** 37 | * Class containing constant values for the different types 38 | * of tokens in a JSON encoded string. 39 | */ 40 | public final class JSONTokenType 41 | { 42 | public static const UNKNOWN:int = -1; 43 | 44 | public static const COMMA:int = 0; 45 | 46 | public static const LEFT_BRACE:int = 1; 47 | 48 | public static const RIGHT_BRACE:int = 2; 49 | 50 | public static const LEFT_BRACKET:int = 3; 51 | 52 | public static const RIGHT_BRACKET:int = 4; 53 | 54 | public static const COLON:int = 6; 55 | 56 | public static const TRUE:int = 7; 57 | 58 | public static const FALSE:int = 8; 59 | 60 | public static const NULL:int = 9; 61 | 62 | public static const STRING:int = 10; 63 | 64 | public static const NUMBER:int = 11; 65 | 66 | public static const NAN:int = 12; 67 | 68 | } 69 | } -------------------------------------------------------------------------------- /lib/src/com/flow/managers/IntrospectionManager.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.managers { 24 | 25 | import flash.utils.Dictionary; 26 | import flash.utils.describeType; 27 | import flash.utils.getQualifiedClassName; 28 | 29 | /** 30 | * Acts as a cache for introspection calls. 31 | */ 32 | public class IntrospectionManager { 33 | 34 | private static var describeLookup:Dictionary = new Dictionary(); 35 | 36 | /** 37 | * Gets the name of a class or instance. The name is always returned in instance format (packet.class), not class format (packet::class). 38 | * @param The instance or class who's name to retreive 39 | * @return The name of the object or class. 40 | */ 41 | public static function getClassName(object:Object):String { 42 | if(object is String) { 43 | return (object as String).replace("::", "."); 44 | } 45 | return getQualifiedClassName(object).replace("::", "."); 46 | } 47 | 48 | /** 49 | * Returns the descriptor of the object. The descriptor is only fetched once and thereafter cached. 50 | * @param The instance or class who's descriptor to fetch 51 | * @return The descriptor of the instance or class. 52 | */ 53 | public static function getDescriptor(object:Object):XML { 54 | var name:String = getClassName(object); 55 | if(!describeLookup[name]) { 56 | describeLookup[name] = describeType(object); 57 | } 58 | return describeLookup[name]; 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /lib/src/mx/states/State.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package mx.states { 24 | 25 | import flash.events.EventDispatcher; 26 | 27 | [DefaultProperty("overrides")] 28 | public class State extends EventDispatcher { 29 | private var initialized:Boolean = false; 30 | public var name:String; 31 | private var _overrides:Array; 32 | public var transitionSpeed:Number = 0; 33 | 34 | public function State(properties:Object=null) { 35 | overrides = []; 36 | super(); 37 | if(properties is String) { 38 | name = properties as String; 39 | } else { 40 | for (var p:String in properties) { 41 | this[p] = properties[p]; 42 | } 43 | } 44 | } 45 | 46 | public function get overrides():Array { 47 | return _overrides; 48 | } 49 | public function set overrides(value:Array):void { 50 | _overrides = value; 51 | } 52 | 53 | public function initialize():void { 54 | if (!initialized) { 55 | initialized = true; 56 | for (var i:int = 0; i < overrides.length; i++) { 57 | IOverride(overrides[i]).initialize(); 58 | } 59 | } 60 | } 61 | 62 | public function apply(target:Object):void { 63 | for (var i:int = 0; i < overrides.length; i++) { 64 | IOverride(overrides[i]).apply(target); 65 | } 66 | } 67 | 68 | public function remove(target:Object):void { 69 | for (var i:int = 0; i < overrides.length; i++) { 70 | IOverride(overrides[i]).remove(target); 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/src/com/flow/containers/ViewSwapper.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.containers { 24 | 25 | import com.flow.components.Component; 26 | 27 | import flash.display.DisplayObject; 28 | import flash.display.Sprite; 29 | 30 | [DefaultProperty("view")] 31 | /** 32 | * A simple container that will show one view at a time. 33 | */ 34 | public class ViewSwapper extends ViewStack { 35 | 36 | private var _view:DisplayObject; 37 | 38 | /** 39 | * Constructor 40 | */ 41 | public function ViewSwapper() { 42 | super(); 43 | addChild(new Sprite()); 44 | } 45 | 46 | /** @private */ 47 | override public function validateProperties():void { 48 | super.validateProperties(); 49 | } 50 | 51 | /** 52 | * The view to show. Setting this will throw out the old view. 53 | */ 54 | public function set view(value:DisplayObject):void { 55 | if(!_view) { 56 | removeChild(_view); 57 | addChildAt(value, 0); 58 | } else { 59 | if(value is Component) { 60 | (value as Component).active = false; 61 | } else { 62 | value.alpha = 0; 63 | } 64 | if(selectedIndex == 1) { 65 | removeChildAt(0); 66 | addChildAt(value, 0); 67 | selectedIndex = 0; 68 | } else { 69 | removeChildAt(1); 70 | addChildAt(value, 1); 71 | selectedIndex = 1; 72 | } 73 | } 74 | _view = value; 75 | } 76 | public function get view():DisplayObject { 77 | return _view; 78 | } 79 | } 80 | } -------------------------------------------------------------------------------- /lib/src/com/flow/skins/VideoPlayerSkin.mxml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 28 | 29 | 30 | [HostComponent("com.flow.components.VideoPlayer")] 31 | 32 | 33 | 34 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /lib/src/com/flow/skins/AlertSkin.mxml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 28 | 29 | 30 | [HostComponent("com.flow.components.Alert")] 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /examples/src/com/flow/commands/InitApplicationCommand.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011 Tuomas Artman, http://artman.fi 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package com.flow.commands { 24 | 25 | import com.flow.managers.TextFormatManager; 26 | import com.flow.skins.ButtonSkin; 27 | import com.flow.skins.CheckboxSkin; 28 | import com.flow.skins.HScrollBarSkin; 29 | import com.flow.skins.TextInputSkin; 30 | import com.flow.skins.VScrollBarSkin; 31 | 32 | import flash.text.TextFormat; 33 | 34 | public class InitApplicationCommand extends Command { 35 | 36 | [Embed(source="/assets/fonts/FreeUniversal-Regular.ttf", fontFamily="Universal", fontWeight="normal", advancedAntiAliasing="true", embedAsCFF="false")] 37 | private const Universal:Class; 38 | 39 | [Embed(source="/assets/fonts/FreeUniversal-Bold.ttf", fontFamily="Universal", fontWeight="bold", advancedAntiAliasing="true", embedAsCFF="false")] 40 | private const UniversalBold:Class; 41 | 42 | public function InitApplicationCommand() { 43 | super(); 44 | TextFormatManager.registerTextFormat("normal", new TextFormat("Universal", 11, 0, null, false, false, null, null, null, 0, 0, null, 2)); 45 | TextFormatManager.registerTextFormat("heading", new TextFormat("Universal", 18, 0, true, false, false, null, null, null, 0, 0, null, 2)); 46 | TextFormatManager.registerTextFormat("bold", new TextFormat("Universal", 11, 0, true, false, false, null, null, null, 0, 0, null, 2)); 47 | 48 | // Tag skin classes so they get included 49 | ButtonSkin; 50 | HScrollBarSkin; 51 | VScrollBarSkin; 52 | TextInputSkin; 53 | CheckboxSkin; 54 | } 55 | } 56 | } --------------------------------------------------------------------------------