//////////////////////////////////////////////////////////////////////////////// // // 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. // //////////////////////////////////////////////////////////////////////////////// package mx.effects { import mx.effects.effectClasses.RotateInstance; [Alternative(replacement="spark.effects.Rotate", since="4.0")] /** * The Rotate effect rotates a component around a specified point. * You can specify the coordinates of the center of the rotation, * and the starting and ending angles of rotation. * You can specify positive or negative values for the angles. * *
Note: To use the Rotate effect with text, * you must use an embedded font, not a device font.
* * @mxml * *The <mx:Rotate>
tag
* inherits all of the tag attributes of its superclass,
* and adds the following tag attributes:
* <mx:Rotate * id="ID" * angleFrom="0" * angleTo="360" * originX="0" * originY="0" * /> ** * @see mx.effects.effectClasses.RotateInstance * * @includeExample examples/RotateEffectExample.mxml * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public class Rotate extends TweenEffect { include "../core/Version.as"; //-------------------------------------------------------------------------- // // Class constants // //-------------------------------------------------------------------------- /** * @private */ private static var AFFECTED_PROPERTIES:Array = [ "rotation" ]; //-------------------------------------------------------------------------- // // Constructor // //-------------------------------------------------------------------------- /** * Constructor. * * @param target The Object to animate with this effect. * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public function Rotate(target:Object = null) { super(target); instanceClass = RotateInstance; hideFocusRing = true; } //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- //---------------------------------- // angleFrom //---------------------------------- [Inspectable(category="General", defaultValue="0")] /** * The starting angle of rotation of the target object, * expressed in degrees. * Valid values range from 0 to 360. * * @default 0 * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public var angleFrom:Number = 0; //---------------------------------- // angleTo //---------------------------------- [Inspectable(category="General", defaultValue="360")] /** * The ending angle of rotation of the target object, * expressed in degrees. * Values can be either positive or negative. * *
If the value of angleTo
is less
* than the value of angleFrom
,
* the target rotates in a counterclockwise direction.
* Otherwise, it rotates in clockwise direction.
* If you want the target to rotate multiple times,
* set this value to a large positive or small negative number.