Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

9-Slice scaling not working in FB4?

New Here ,
Mar 17, 2014 Mar 17, 2014

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.

TOPICS
ActionScript
902
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 17, 2014 Mar 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 18, 2014 Mar 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 18, 2014 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 18, 2014 Mar 18, 2014

Thanks Amy, well this next question will probably reveal my ignorance of Flash/Flex...  How do you set FB's compiler to be the same as the FlashPro compiler? When I look at the Compiler properties of my project, it only says "This project will use AIR SDK 3.4" - and there doesn't seem to be an option to change it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 18, 2014 Mar 18, 2014

I had forgotten about that with as only projects (I only have 4.7 on one computer due to the fact that it doesn't play well with FlexUnit and older Flash Player). You might want to try the workaround posted in the last message of this thread.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2014 Mar 19, 2014

Finally figured it out.  If you export assets to SWCs, they'll lose their scale9Grid setting if you export from CS3 to be used in FB4.  Re-opening and exporting in the latest FlashPro fixed it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 19, 2014 Mar 19, 2014
LATEST

Glad you found a solution.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines