| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <mx:Application height="500" width="500" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns:trix="Assets.*" |
| xmlns="*" |
| backgroundColor="0xFFFFFF" |
| |
| layout="absolute"> |
| |
| <mx:Script> |
| <![CDATA[ |
| import mx.controls.Image; |
| import mx.effects.WipeUp; |
| import mx.events.StateChangeEvent; |
| import mx.effects.effectClasses.WipeUpInstance; |
| |
| //Vars |
| public var myWipeUpInstance:WipeUpInstance = new WipeUpInstance(null); |
| |
| //Methods |
| public function doManualReset():void |
| { |
| if(currentState == "stateOne") |
| { |
| dispatchEvent(new Event("manualResetComplete")); |
| } |
| else |
| { |
| addEventListener("currentStateChange", handleCurrentStateChange); |
| currentState = "stateOne"; |
| } |
| } |
| |
| private function handleCurrentStateChange(e:StateChangeEvent):void |
| { |
| dispatchEvent(new Event("manualResetComplete")); |
| } |
| |
| //Reset the glow effect to default initialization |
| public function ResetEffectDefault():void |
| { |
| this.testEffect.stop(); |
| this.testImage.filters = null; |
| this.testEffect = new WipeUp(this.testImage); |
| } |
| |
| public function ResetImage():void |
| { |
| } |
| |
| public function MyScaleEasing():void |
| { |
| } |
| |
| public function MyMoveEasing():void |
| { |
| } |
| |
| public function MyMaskFunction():void |
| { |
| } |
| ]]> |
| </mx:Script> |
| |
| <mx:states> |
| <mx:State name="stateOne"/> |
| <mx:State name="stateTwo"/> |
| </mx:states> |
| |
| <mx:transitions> |
| <mx:Transition fromState="stateOne" toState="stateTwo"> |
| <mx:Sequence id="toStateTwo"> |
| <mx:WipeUp targets="{[testImage]}" duration="500"/> |
| </mx:Sequence> |
| </mx:Transition> |
| </mx:transitions> |
| |
| <!-- Simple Effects --> |
| <mx:WipeUp id="testEffect" /> |
| |
| <!-- UI Components --> |
| <mx:Image id="testImage" source="../../../../../Assets/Images/bluerect.jpg"/> |
| |
| </mx:Application> |