MX and Spark Rotate effects in Flex 4.5

I'm porting an application from Flex 3.1 to 4.5 and having following problems with the Rotate effect:
1. I want to keep using mx.effects.Move, but the originX and originY properties of mx.effects.Rotate in 4.5 do not work correctly.
It seems no effect on location of the rotation center, which is always (0,0) no matter what values you set.
Is this a bug with MX effects in 4.5. I'm using the trial version.
2. Adobe suggests to use Spark effects, but I can not use spark.effects.Rotate because there are no originX and originY properties with it.
The rotation center for Spark Rotate is (0,0). It seems cannot be changed.
Any suggestions?

1. Is the element you are animating inside of a spark container?
2. Try using the transformX/transformY properties on the element itself rather than on the effect.
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Declarations>
        <s:Rotate id="r" target="{b}" angleBy="360"/>
    </fx:Declarations>
    <s:Button id="b" x="100" y="100" label="Rotate" click="r.play()" transformX="20" transformY="11" />
</s:WindowedApplication>
You might find the autoCenterTransform property of the effect useful as well.
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Declarations>
        <s:Rotate id="r" target="{b}" angleBy="360" autoCenterTransform="true"/>
    </fx:Declarations>
    <s:Button id="b" x="100" y="100" label="Rotate" click="r.play()"/>
</s:WindowedApplication>

Similar Messages

  • AutoCenterTransform on rotate effect not working !!!

    Is there a workaround or known bug fix for the fact that the autoCenterTransform=true is not working for the rotate effect.
    I tried this with the spark Rotate effect control and played it in IE with FlashPlayer 10.3.1818.14 and also on Firefox with FlashPlayer 10.2.153.1
    Even Adobe's sample here isn't working.
    http://help.adobe.com/en_US/flex/using/WS6C251DAF-9EBC-4a79-820B-E4AA5B2ADCE8.html#WS4A706 08A-1304-4463-8FC6-B4ABC41078A8
    I also tried using the old mx Rotate effect like this, and it is no longer working with Flex 4.5 SDK.
    <mx:Rotate id="rotateEffect" target="{this}" originX="{this.width/2}" originY="{this.height/2}"
    angleFrom="0" angleTo="360" duration="2000" repeatCount="1" effectEnd="rotateEndHandler()"/>
    This rotate effect using Flex 3.6 sdk works fine using the FlashPlayers listed above.
    <mx:Rotate  id="rotateEffect" target="{this}" angleFrom="0" angleTo="360" duration="2000" repeatCount="1" effectEnd="rotateEndHandler()"/>

    I found a workaround for my custom Button that I had built to rotate itself around it's center and was being used inside a mx VBox.  I wrapped the whole thing in a spark Group component which I set to the same size as the Button and then put that Group inside my VBox that was set with horizontalalign and the button now rotates properly on it's center point.

  • Problem with spark:resize effect and constraint-layout

    Hi,
    maybe its just a missuderstanding, but how i an get this to work.
    Also move effects doesnt seem to work.
    Does somebody have a Link, where I can get deeeper in constraints and spark.effects?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    minWidth="955" minHeight="600"
                    width="100%" height="100%"
                    currentState="State1"
                    initialize="init()">
         <s:layout>
             <s:BasicLayout/>
         </s:layout>
        <fx:Script>
             <![CDATA[
                 import flash.utils.Timer;
                 import flash.events.TimerEvent;
                 import flash.events.Event;
                private var timer:Timer;
                 private function init():void {
                     timer = new Timer(5000);
                     timer.addEventListener(TimerEvent.TIMER, switcher);
                     timer.start();
                 public function switcher(event:TimerEvent):void {
                     if (currentState =="State1") {
                         currentState = "State2";
                     } else  {
                         currentState = "State1";
             ]]>
         </fx:Script>
         <s:states>
             <s:State name="State1"/>
             <s:State name="State2"/>
         </s:states>
         <s:transitions>
             <s:Transition fromState="State1" toState="State2">
                 <s:Resize target="{mainPanel}" />
             </s:Transition>
             <s:Transition fromState="State2" toState="State1">
                 <s:Resize target="{mainPanel}" />
             </s:Transition>
         </s:transitions>
        <s:Panel id="mainPanel"
                 horizontalCenter="0" verticalCenter="0"
                  width.State1="250"  height.State1="200"
                  horizontalCenter.State2="0" verticalCenter.State2="0"
                  left.State2="20" right.State2="20" top.State2="10" bottom.State2="50">
         </s:Panel>
    </s:Application>

    I think there are bugs in this area for transitioning an objects size between states where two different sizing mechanisms are in play.
    If you transition from constraints to constraints or from width/height to width/height it should work better:
        <s:Panel id="mainPanel"
                 horizontalCenter="0" verticalCenter="0"
                 left.State1="200" right.State1="200" top.State1="100" bottom.State1="500"
                 left.State2="20" right.State2="20" top.State2="10" bottom.State2="50">

  • [svn:fx-trunk] 10358: Change Application. application so it can return spark Applications and spark WindowedApplications .

    Revision: 10358
    Author:   [email protected]
    Date:     2009-09-17 14:18:43 -0700 (Thu, 17 Sep 2009)
    Log Message:
    Change Application.application so it can return spark Applications and spark WindowedApplications.
    Application.application is still deprecated but this change makes the transition to using Spark Applications easier.
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-21898
    Reviewer: Gordon
    Tests run: checkintests, Application
    Is noteworthy for integration: no.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21898
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as

    Try setting the stepSize on the slider to 4. That should reduce the jiggle effect.
    Not sure if it helps, but the following way of placing the graphic in the skin means you don't need to use those binding tags. The group within the graphic will automatically scale. (I use 48 as an arbitrary size for the group. But it will always display relative to the size of the button. You may need to adjust the 30 and 8 values to match your original.)
    <s:Graphic left="1" right="1" top="1" bottom="1"  >
    <s:Group width="48" height="48" >
    <s:Rect  horizontalCenter="0" verticalCenter="0" height="30" width="8">
    <s:stroke>
    <s:SolidColorStroke color="0x000000"/>
    </s:stroke>
    <s:fill>
    <s:SolidColor color="0xff0000"/>
    </s:fill>
    </s:Rect>
    <s:Rect  horizontalCenter="0" verticalCenter="0" height="8" width="30">
    <s:stroke>
    <s:SolidColorStroke color="0x000000"/>
    </s:stroke>
    <s:fill>
    <s:SolidColor color="0xff0000"/>
    </s:fill>
    </s:Rect>
    </s:Group>
    </s:Graphic>

  • Photo effects in flex app

    HI,
    I have implemented basic image effects into flex app, such as opacity, darkness etc.  I am looking for some advanced effects such as, paint, cartoon etc, ones you can find in fotoflexer.com or lunapic.com
    Can anybody suggest something? algorithms?

    So, I'm going to take this as no one's noticed, and no one knows how to get these effects in other apps. Thanks everyone!

  • Use mx and spark components in pure ActionScript project?

    I'm working on an AIR project in Flash Builder 4, but I'm not using MXML at all (pure ActionScript). Is there a way for me to instantiate and use mx and spark components without MXML? If not, what is the minimal amount of MXML I have to use? FYI, I've already tried all of the following hacks with absolutely no luck:
    http://www.actionscript.org/forums/showthread.php3?t=143062
    http://ersatz.tv/2009/off-topic-flex-components-without-mxml
    http://stackoverflow.com/questions/141288/possible-to-use-flex-framework-components-withou t-using-mxml
    I much prefer ActionScript over MXML. Why does Adobe have such a hard-on for this MXML ****?! It's like all that code and all those great components are going to waste.

    Me too.. . I'm a pure as3 guy and all these components go to waste. You would think they would allow people to generate components via mxml or as3...

  • I have an optical sensor and two hall effect how can I data log?

    I have built a test rig which consists of a gyroscope.  The gyro is spun up by and electric motor.
    I need to measure the speed of rotation.  I’m using an optical sensor and two Hall
    Effect sensors.  I would like to record the
    output of these and I would like to build in some redundancy because there will
    be another bigger rig that will require more measurement.  E.g. vibration.
    I’m new to data logging so I’m not sure which hardware I
    should be getting.
    Thanks

    analog inputs are the most universal.  with software such as the functions included in the Sound and Vibration Measurement Suite, you can analyze the analog input channel which is connected to your hall effect and optical sensors for frequency and speed.  Vibration specific input cards will power accelerometers.  with the speed and angular position sensors (hall effect and optical) you can combine this information with your vibration sensors to determine the movement of the device with respect to position and speed.  These order analysis functions are part of the Sound and Vibration Measurement Suite. 
    What is more is that the Suite includes an assistant.  The assistant allows for the capture and datalogging of all analog and digital inputs as well as frequency and vibration analysis.  This is all configurable and does not require any LabVIEW programming.  If you decide you want LabVIEW programming, all the functions are there to support LabVIEW as well. 
    Here is the link:
    http://www.ni.com/soundandvibration/
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Math and circle rotation

    Okay this is a math question! :-)
    I worked on a logo for a class I'm taking in Illustrator. It looks like this:
    I created one tiny chair icon and then rotated it around the circle to space them. Thing is: I had to guess at the angle until I got it spaced right. I know there must be some way to figure that out mathematically without doing trial-and-error, only I don't know what it is. Unfortunately, I was always good at algebra but terrible at geometry! Does anyone know that type of math? I'd love to learn that as I expect to encounter many instances of this.
    Thanks, Phyllis

    360 divided by the number of elements will give you the angle.
    See
    Teri Pettit's tutorial on transform effects
    , especially the second "page" on rotation.
    Something like that can also be done with a scatter brush. The proper brush setting will take care of rotating each element with respect to your path, and you can futz around with sliders to get the size and spacing of elements you want.

  • [svn:fx-trunk] 11249: Fix contentBackgroundColor handling in DropDownListSkin and spark ComboBoxSkin .

    Revision: 11249
    Author:   [email protected]
    Date:     2009-10-28 16:24:32 -0700 (Wed, 28 Oct 2009)
    Log Message:
    Fix contentBackgroundColor handling in DropDownListSkin and spark ComboBoxSkin.
    QE notes: A couple baselines will need to be updated, since DropDownList and ComboBox weren't handling contentBackgroundColor correctly.
    Doc notes: None
    Bugs: SDK-23879
    Reviewer: Ryan
    Tests run: checkin, qe cyclone
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23879
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ComboBoxSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml

  • Create an automatic action script for 3d rotate effect

    Is it possible to create an action script that automatically applyes the 3d rotate effect with specific settings?
    An example would be when I press F2 it rotates the object instantly with my specific settings without ever having to press anything else.

    ok.
    draw yourself a shape, whatever you like. Go to Effect > 3D > Rotate and apply the settings you want.
    with your object selected, go to the Graphic Styles palette (Window > Graphic styles) and create new graphic style (either in the palette menu or the little button). Call it something memorable.
    draw a new object, again whatever you like. open the Actions palette (Window > Actions). Create new action. Give it a name and assign it to a Function key, then click OK (The action will start recording).
    Select your new object, then pick your new Graphic Style from the graphic styles palette. it should apply your 3D settings to the new object.
    click on the stop button at the bottom of the Actions palette.
    create new object, select it, hit your chosen function key. enjoy.

  • Yoga 2 Pro tent mode and auto-rotate not working

    I have had a Yoga 2 Pro since June. Recently the Tent mode and auto-rotate features do not work.
    When I put the Yoga 2 Pro into Tent mode the keyboard and touch pad are still active underneth. However, they shutoff when in tablet mode. Lenovo Transition starts automatically and is running.
    Auto-rotate does not work at all now. The screen is un-locked.

    Dear NX3
    Welcome to Lenovo forums
    Please try to uninstal the Lenovo transition program and download the version in the below link and instal it
    http://support.lenovo.com/us/en/downloads/ds038767
    Thanks
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • I think I have opened the sobig.f virus in my hotmail account and it keeps seding emails to my contacts. How do I stop it, and will it effect any of my other transactions like internet banking/shopping, is it safe?

    I think I have opened the sobig.f virus in my hotmail account and it keeps seding emails to my contacts. How do I stop it, and will it effect any of my other transactions like internet banking/shopping, is it safe To continue using my ipad ?

    This isn't due to malware. There is no known malware capable of infecting an iPad that has not been jailbroken (ie, hacked to allow apps from outside the App Store).
    As lizdance40 says, your Hotmail account has been hacked remotely. Change the password immediately. Hotmail accounts are popular targets, but as long as you choose a good password, and make sure that password is not the same as a password you use with any other account, you should be safe.
    I disagree with lizdance40's statement that you have to abandon the account and create a new e-mail address. If a hacker is able to get back in even after changing the password, the problem is not with the account itself. There's another vulnerability of some kind somewhere. Perhaps the account allows hackers to leave a "back door" to get back in (such as with GMail's delegation feature), in which case any such feature needs to be reviewed and have settings changed. Perhaps you are checking mail in an insecure manner while on an insecure network (ie, a wireless network that requires no password). Perhaps you are using a password on multiple accounts, and a different account has been compromised. Perhaps a hacker has used knowledge gained by prior access to your account to achieve "social hacking" (ie, convincing a tech to give him access because he has "forgotten the password"). There are many scenarios, but there's no good reason to abandon the account entirely.

  • How to create and save a file in flex web application ?

    Hi,
          I want to create and save a file form flex web application. Is it possible ?
    I have done some googling and found that its only possible through file referece, which needs some serverside implementation be called.
    Is it not possible with file reference to create and save file directly ?
    Can any one suggest how to over come this.
    Thanks in advance.

    Alex,
    code written with the Flex Builder 3 libraries will certainly run in Flash Player 10. However, what you need is not so much the capabilities of FP10 but the library functionalities of the Flex 4 package. And I think that Flex 4 code will only run in FP10 and not 9 (but haven't tested this as at work we have not yet been permitted to upgrade, so there is not a lot of point going for Flex 4!).
    Richard

  • Is there a way that you can copy and paste blade effects from one clip to the other so that the cuts are an exact duplicate of each other?

    Is there a way that you can copy and paste blade effects from one clip to the other so that the cuts are an exact duplicate of each other?

    The same cuts that I have in this clip that i performed with the blade tool, I want to duplicate, copye, paste and apply to another clip. I want the cuts to mimic and be an exact same. I wish i could highlight the clip, click copy and then highlight the other clip and then click paste and the cuts apply.

  • After install yosemite : one resolution and bad rotation external display

    0- macbook pro 2008 external screen HP L1750 (under a hp factory rotary arm support)  on minidisplay to vga
    ( this monitor works 60 and 75 htz (natively)
    1 - hello, after installing yosemite my external monitor L1750 is only resolution 1280 * 1024.
    Before, you have to know that every thing works properly throuth leopard and lion.
    and with rotation
    Well ! Under yosemite with out harware changed (just reboot and changed firmware): i have that :
    2 - only 12080*1024 resolution posssibility
              and when I rotate : i lost full screen with a twice black stripes.
    2,1 when i pull down'al' keyt on scale into pref monitor? i have this :
         but the rotate option send the same bad result to my external screen L1750 !!
    3 - i try with the option monitor vga and it work properly at 800 * 600. But, i don't know how to repeat or call this option again ,
    because is just appear like that for just a moment !!
    4 - Hp assistance factory have no solution !
    i espect solution :
    A - input the good resolution to the choice monitor HP L1750 for landscape and portrait to !!
    ( perhaps the same file used on leopard or lion OS) but where find and put it ?
    -a script to force resolution on the file already here, ...)
    or
    B - call choice vga monitor into pref monitor and some good resolution include on rotate option
    Thanks , a lot to read me and enjoy to answerd me usufull.
    have a good day

    Any Idea? please I work outside many times with my computer and work like that is a bull....t
    I need Help !

Maybe you are looking for