I am just getting going with starling and feathersui trying to get the feathers theme to work.
I have managed to get it so the background color of the app changes to the theme color (so I know the theme is loading and running correctly) but there is nothing on the button or any other controller i have tried. The button is just plain black text , no button .
package {
import starling.display.Sprite;
import starling.display.Stage;
import starling.display.Image;
import starling.textures.Texture;
import starling.events.Event;
import starling.text.TextField;
import feathers.controls.Button;
import feathers.controls.Callout;
import feathers.controls.Label;
import feathers.controls.TextInput;
import feathers.themes.MetalWorksMobileTheme
public class Game extends Sprite
{
public function Game()
{
this.addEventListener( Event.ADDED_TO_STAGE, addedToStageHandler );
var stageWidth = 640;
var stageHeight=960;
var button:Button = new Button();
button.label = "Click Me";
button.x = 200;
button.y = 500;
addChild( button );
}
private function addedToStageHandler( event:Event ):void
{
new feathers.themes.MetalWorksMobileTheme();
}
}
}
I have added the path to the theme in my .source settings.
I must be missing something that is stopping it from loading, any help would be appreciated.
I had the same problem and it took me some time to figure this out but it's not that difficult if you think about it.
What you have to do is to add the themes directory to the source starling folder.
So if you have this folder setup:
Downloads/feathers-1.1.1/documentation
Downloads/feathers-1.1.1/examples
...
Downloads/feathers-1.1.1/source
Downloads/feathers-1.1.1/swc
Downloads/feathers-1.1.1/themes
First you have to add the source folder to your ActionScript Build Path. Then go to
Downloads/feathers-1.1.1/themes/MetalWorksMobileTheme/source/feathers/themes
and copy that folder to this location
Downloads/feathers-1.1.1/source/feathers
The new theme will now be in the correct folder and Flash Builder will know where to find it.
After you do this you might get some errors because the theme is referencing some assets (fonts and images) that are not found. You will find those here:
Downloads/feathers-1.1.1/themes/MetalWorksMobileTheme/assets
copy that folder to your project location or just edit the paths in the theme file and everything should be fine from there on.
Also I think you should add all your button creation code in the ADDED_TO_STAGE event handler like this:
Hope this helps