0 Replies Latest reply on Apr 7, 2009 8:14 PM by abdallas

    Animated Flash Component Scaling when used as Button Skin


      I am trying to skin the overSkin of a Flex Button component with an animated Flash .swc component. (Actually, an Accordion Header, but for all practical purposes the same.)


      All works completely fine, in most cases.  The problem I run into is when I have any objects in the Flash animation moving on and off stage.  When this happens, although the objects cannot be seen when moved off-stage, the viewable area of the Flash animation scales down in either direction, or both, to make room in the button for the objects off stage.


      If I play the animation directly in the application, or a Canvas, everything works fine and no scaling occurs.  But for a Button, where I really need it, I get the constant scaling back and forth as the Flash movie runs.  This can be REALLY annoying when trying to click on a button! (Or you find that you are no longer "over" the button (because it scaled down) so you get flicker back and forth between the Up and Over states.)


      Any ideas on how I can keep this from happening, either on the Flash or Flex side would be much appreciated.


      Pertinent Code:


      private var Film:Class;
      private var FilmOver:Class;


      animatedButton.setStyle("upSkin", Film);
      animatedButton.setStyle("overSkin", FilmOver);


      <mx:Button id="animatedButton" cornerRadius="0" />
      Note: I tried all assortments of setting dimensions I believe.


      Remember, the Flash component has objects that move in and off the stage from both directions, and this is the cause of the automatic resizing of the Button when it runs.