The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Dynamically Created and Rotated MovieClips, with CLIK button children, get Skewed!?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamically Created and Rotated MovieClips, with CLIK button children, get Skewed!?

    For our game we've been developing a radial menu in Flash CS4, using AS3 and CLIK widgets. In the December release all radial buttons worked as expected... but something changed in the February release. Radial buttons began to get skewed.

    Here is how the SWF looks in the Scaleform Launcher (and in UDK) while having the ActionScript 3 Settings Source path pointing to C:\UDK\UDK-2011-12\Development\Flash\AS3\CLIK:

    Here is how the SWF looks in the Scaleform Launcher (and in UDK) while having the ActionScript 3 Settings Source path pointing to C:\UDK\UDK-2012-02\Development\Flash\AS3\CLIK:

    What is easily seen is that the circular line, which is uninterrupted with December CLIK code, gets broken and staggered while using the February CLIK code. What is less obvious (unless you download both images and flip back and forth with a picture viewer) is that the reason for this is that the dynamically spawned movie clips with CLIK widgets are getting skewed somehow. What's also noteworthy is that they appear get skewed more with irregular degrees of rotation... e.g. a CLIK button rotated at 0 degrees or 90 degrees, almost appears to not have any skew, but CLIK buttons at 23.5 or 47.25 degrees are far more skewed.

    In both screen grabs the only difference is AS3 CLIK code. To help you better repro here is what's going on in the script:

    There is a Quad with 4 CLIK buttons on the stage. In the library there is a Movie Clip called "fanA" which holds the CLIK button and the CLIK label, positioned upwards from the clip's origin a set distance. There is also a "fanB" which holds a different CLIK button and CLIK label a higher distance from the origin.

    When the Quad button "Toolkit" is clicked, a MovieClip called "Flyout" is created and added as a child to the Quad. 4 instances of "fanA" are created and added as children of the "Flyout", and are each rotated a set number of degrees to create the illusion of a circular base. They also get their own icons and textField strings. A similar action happens when the "Security" CLIK button is clicked, except now "fanB"s are added to a new "Flyout" and rotated.

    The code itself is pretty robust to allow for a high number of dynamically spawned menus from different sets of arrays... so hand animating the clips and widgets is not a viable solution, especially given that it worked fine 2 months ago. The problem has to lie somewhere in the February AS3 CLIK code. Incidentally, the SWF exported with the December CLIK code imports and works fine in the February build of UDK. My only concern is that there may be changes from the December CLIK code that will be incompatible with the February UDK Scaleform code, or that this could be a symptom of a larger problem.

  • #2
    Wow. No thoughts from anyone?


    • #3
      Have you gone into the components fla and seen if the actual object itself has changed? Could you try copying and pasting the same object from the old components.fla to the new one? Just a thought - don't know if that would work.


      • #4
        Im getting a very similar problem, didn't used to happen back in oct/nov build, now some things on my main menu flash seem a bit skewed.


        • #5
          @Looter222, glad to hear I'm not the only one. I've continued to reference a previous build's CLIK widgets within flash, and they so far seem to work with new build's of UDK. My luck will probably run out though.

          It's worth noting (while I'd forgotten this in my earlier post) that I'd also modified the CLIK definitions to keep buttons from auto-resizing, since that is definitely not desired behavior. It could be that the auto-resize has a conflicting affect with rotation.

          Looter222, are your skewed elements rotated at all?


          • #6
            Persists in the July build.


            • #7
              Sorry you guys are having some troubles with this. I would be happy to investigate this and try to come up with a solution for you, but I would first need either sample files that reproduce the issue, or a detailed walkthrough of how to duplicate the issue on my end.


              • #8
                I got your source files, and can confirm this is an issue. I cannot offer a solution at present. I thought it might be related to Tween(), so I removed your Tween, and instead simply positioned the elements using:

                new_button.rotation  = wedge_rotation;
                That resulted in the same problem. So it's not Tween(). I also tried placing the CLIK button (Btn) of FanA inside a container movie clip, and that did not solve the problem either. My guess is that this could be a genuine bug of some kind. The best I can do is pass this info on to the team, but I cannot give you an ETA on any kind of solution. In the meantime, if you manage to come up with a solution or work-around, I hope you will let us know.

                I can however confirm that this is very likely a CLIK related bug, not a core issue. I replaced the fanA CLIK buttons with a simple movie clip of a red semi-circle. When I run the sample now, the line is perfect, as it should be (see screenshot below). This leads me to believe it's a CLIK related problem.


                • #9
                  Thanks Matt. I did come up with a work around in which I commented out some of the auto-size code in the file... which is about the hackiest solution ever, but since I'm not taking advantage of button auto-sizing anywhere else I can probably get away with it for a while. If I have to I'll replace buttons with CLIK buttons on the radial menu with a different kind of button.

                  Thanks for passing it along.