Comments on: Foxhole UI Components for Starling Update https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/ Archive of older blog posts written by Josh Tynjala about Flash, Flex, and ActionScript Wed, 26 Jun 2013 02:52:46 +0000 hourly 1 https://wordpress.org/?v=4.9.9 By: Josh Tynjala https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50311 Fri, 31 Aug 2012 01:33:50 +0000 http://joshblog.net/?p=1390#comment-50311 You don’t add children to a List. You pass it a ListCollection as a data provider.

]]>
By: LiangYibing(Chinese) https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50310 Fri, 31 Aug 2012 01:16:38 +0000 http://joshblog.net/?p=1390#comment-50310 I’m looking forward to the change of your TabBar
When I only replace the “ScrollContainer” with “List” at the TiledColumnsLayoutScreen.as in your LayoutExplorer project.The children button always overlap.where I was going wrong?

]]>
By: Josh Tynjala https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50309 Fri, 31 Aug 2012 00:18:05 +0000 http://joshblog.net/?p=1390#comment-50309 Currently, tabs are always equal in size. There is no way to have tabs with different widths. I have created a feature request for this.

You can set the layout property on a List, just like with ScrollContainer. Where are you having trouble? I need more specific information.

]]>
By: LiangYibing(Chinese) https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50307 Thu, 30 Aug 2012 09:16:36 +0000 http://joshblog.net/?p=1390#comment-50307 Can you show me how can use the List do something like LayoutExplorer that used the ScrollContainer.Because when I added many my object that have many childen object in ScrollContainer,the screen changed so slowly.I am a newcomer to starling and foxhole.I couldn’t solve the problem three days.

]]>
By: LiangYibing(Chinese) https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50305 Thu, 30 Aug 2012 07:40:47 +0000 http://joshblog.net/?p=1390#comment-50305 Thanks again.But I want to based the width of my _tabBar on the embedFont automatically.I thought the TabBar can do it.But it seems that I have to try your method.

]]>
By: Josh Tynjala https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50303 Mon, 27 Aug 2012 03:55:21 +0000 http://joshblog.net/?p=1390#comment-50303

But I can’t dispose the icon and the embedFont label.

You don’t need to dispose them. The TabBar will dispose its children (the tabs) and then the children will dispose their children.

But I have another question,I don’t know how to adjusted one of my buttons in width on the _tabBar

There isn’t a supported way to adjust the width of one specific button on a TabBar. You could probably call getChildAt() to get a specific tab after the TabBar validates and resize it. You may need to manually call invalidate() on the TabBar after you do that. Otherwise, it has no way to know that one of the tabs has been resized.

]]>
By: LiangYibing(Chinese) https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50299 Thu, 23 Aug 2012 04:27:11 +0000 http://joshblog.net/?p=1390#comment-50299 Oh,I just added this ‘this._tabBar.removeChildren();’and It is ok.
But I have another question,I don’t know how to adjusted one of my buttons in width on the _tabBar.Can you tell me how to do?Thank you.

]]>
By: LiangYibing(Chinese) https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50298 Thu, 23 Aug 2012 03:53:42 +0000 http://joshblog.net/?p=1390#comment-50298 I use the embedFonts in the AzureTheme’s tabInitializer(),and use icon and your tabBar like that.

this._tabBar.dataProvider = new ListCollection(
[
{ label: "树",  defaultIcon:new Image(this._iconAtlas.getTexture("Tree")) ,  action: BUILD_TREE}
]);

But I can’t dispose the icon and the embedFont label.Can you tell me how to do?Thank you.

this._navigator.clearScreen();
this._tabBar.dispose();

]]>
By: LiangYibing(Chinese) https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50291 Tue, 21 Aug 2012 08:48:12 +0000 http://joshblog.net/?p=1390#comment-50291 It’s very kind of you.I use it in your HelloWorld project.It can work.Thank you.

[Embed(source='/../assets/images/fonts/MSYHBD.ttf', embedAsCFF='false', fontName='MSYHBD')] 
public static var Msyhbd:Class;
this.font = new Msyhbd();
button.labelFactory = function():ITextRenderer{
   return new TextFieldTextRenderer();
}	
this.button.defaultLabelProperties.textFormat = new TextFormat(font.fontName, 30, 0x000000);
button.defaultLabelProperties.embedFonts = true;
]]>
By: Josh Tynjala https://joshblog.net/2012/08/17/foxhole-ui-components-for-starling-update/#comment-50289 Tue, 21 Aug 2012 05:39:50 +0000 http://joshblog.net/?p=1390#comment-50289 Make sure that you’re using the TextFieldTextRenderer, as explained here. Then set embedFonts at the same time that you set the textFormat:

button.defaultLabelProperties.textFormat = new TextFormat("Arial", 12, 0xffffff);
button.defaultLabelProperties.embedFonts = true;
]]>