Search the web
Sign In
New User? Sign Up
ydn-flash · Yahoo! Flash Developer Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to prevent rescaling of Sprite decendants put in BorderPane?   Message List  
Reply | Forward Message #1238 of 2036 |
Hi!

When I put a Astra tree directly in a BorderPane it works - the
StageScaleMode.NO_SCALE does it's job:

// Astra Xml Tree...
xmlTree = new Tree();
xmlTree.dataProvider = new TreeDataProvider( initXml );
xmlTree.width = 200;
xmlTree.height = 400;

// ...put into BorderPane. Works! Rescales correctly
{target: this.xmlTree , constraint: BorderConstraints.LEFT},



But when I wrap the Astra tree into a Sprite, and put that sprite into
the border pane, the tree is rescaled (the StageScaleMode.NO_SCALE
"doesn't work" any more)...

// Astra Xml Tree...
xmlTree = new Tree();
xmlTree.dataProvider = new TreeDataProvider( initXml );
xmlTree.width = 200;
xmlTree.height = 400;

// ...put into a Sprite wrapper...
xmlTreeWrapper = new Sprite();
xmlTreeWrapper.addChild(xmlTree);

// ...wich is put into the BorderPane. Doesn't work, rescales uglily!
{target: this.xmlTreeWrapper, constraint: BorderConstraints.LEFT},



Any idea how to solve this?

Regards / Jonas





Fri Sep 5, 2008 10:58 am

jonasnys
Offline Offline
Send Email Send Email

Forward
Message #1238 of 2036 |
Expand Messages Author Sort by Date

Hi! When I put a Astra tree directly in a BorderPane it works - the StageScaleMode.NO_SCALE does it's job: // Astra Xml Tree... xmlTree = new Tree(); ...
jonasnys
Offline Send Email
Sep 5, 2008
3:07 pm

Sprites will always stretch their contents when you set their width and height. That's just how Sprites work. StageScaleMode.NO_SCALE has nothing to do with...
Josh Tynjala
joshtynjala
Offline Send Email
Sep 5, 2008
3:39 pm

Man, I have found this point so frustrating. I have learned it cannot be done (wasted last weekend on it). So non-intuitive, but totally true. When I set...
anthony.bollinger
anthony.boll...
Offline Send Email
Sep 10, 2008
11:18 pm

It's actually a little more intuitive when you look at the name of the class on which this constant is defined. StageScaleMode.NO_SCALE With that scaleMode...
Josh Tynjala
joshtynjala
Offline Send Email
Sep 11, 2008
12:11 am

Wow! In all the reading I have done on NO_SCALE, I have never read anything that explained it that well. I think I understand about half of it. Okay, so the...
anthony.bollinger
anthony.boll...
Offline Send Email
Sep 11, 2008
9:46 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help