0 Replies Latest reply on Nov 10, 2007 9:45 PM by guitarstrummr

    Embedded symbol width / height

    guitarstrummr
      How do you properly retrieve an embedded swf symbol's height and width?

      I have a Flex 3 beta project where I am embedding a movieclip symbol. If I create an instance of that symbol in my Flex app, the height and width and rather arbitrary to the original width and height in the fla. Why? What the? How to fix?

      This is driving me nutes. In the fla the width and height are 106.9 and 52, respectively. I set up the movieclip with a linkageID and embed it from the swf within my flex project. When I create an instance of that symbol by that linkageID in my Flex app, the width and height are then 323 and 159.25, respectively. My code is (loosely) as follows:

      [Embed(source="buttons.swf", symbol="exitGame") ]
      public var btnEmbedExitGame:Class;

      ...

      public var btnExitGame : MovieClip;

      ...

      btnExitGame = new btnEmbedExitGame();

      At this point, btnExitGame has what appears to be a completely arbitrary height and width totally independent of anything I can find in the original fla. I need the original width and height in the fla, if possible. Please do help - if you can :)

      Regards

      Josh