Skip to main content
Participant
March 17, 2014
Question

9-Slice scaling not working in FB4?

  • March 17, 2014
  • 1 reply
  • 1011 views

I just upgraded my FB3 flash project to FB4.7, and saw that my 9-slice symbols (which I exported from an FLA to a SWC) have stopped working.  That is, the whole graphic is now getting stretched. If I use the exact same SWC and the exact same code in my FB3 environemt all is well.

The code is really basic:

var spr:MyRoundedRect = new MyRoundedRect(); // MyRoundedRect comes from the FLA with 9slice scaling

spr.scaleX = 4;

spr.scaleY = 3;

addChild(spr);

Am I missing something? I this a known bug in Flex Builder 4.7?

Anyone else ever encounter this?

Right now, I feel like going back to Flex Builder 3, where the world seemed a better place.

This topic has been closed for replies.

1 reply

Amy Blankenship
Legend
March 17, 2014

Hm, I haven't had this problem...but then again when I use FB I am not using the MXMLC compiler. Instead, Flash pro is still compiling (for Flash 10.2). Can you give more details of how your project is set up?

alex0816Author
Participant
March 18, 2014

I'm using Flash Builder 4.7 for a pure flash project (ie, no mxml) & all my graphics objects are in a swc that was exported from an FLA. 

I've made some progress with that issue. If I explicitly assign the scale9Grid dimensions in the code, it seems to work:

  obj.scale9Grid = new Rectangle(x,y,w,h)

...but having to do that is a real productivity killer.  Would be nice to use the 9-slice guide setting in the FLA

Amy Blankenship
Legend
March 18, 2014

Sorry...I find writing the manual code to create, position and add things to the stage so tedious that if my swf involves visible assets, I create it on the timeline. So the only thing I get from swcs is audio. I don't know for sure what to tell you, but you could try specifying the 3.6A SDK which will allow you to target a lower player. It's unlikely to be Flash Builder itself--it's only running the MXMLC compiler or Flash Pro as a compiler.