Skip to main content
Known Participant
February 23, 2013
Question

Feathersui themes problem

  • February 23, 2013
  • 1 reply
  • 1417 views

Hi there,

I'm trying to set up a hello-world app using feathersui framework and starling. I've got starling to work perfectly just by following their example on the website and instead of passing the class name "Game" to Starling object, I've passed the name of the class that is used for feathers  UI.  All  featherui and starling SWC's are in the project settings.

I'm getting this error about importing the package themes

Line 41172: Definition feathers.themes:MetalWorksMobileTheme could not be found.

Unfortunately, every example included in the source file uses one of the provided themes and I couldn't get any to work!

Please help.

package

{

    import starling.display.Sprite;

    import feathers.themes.MetalWorksMobileTheme;    /// here is the problem!!  any idea?

    import feathers.controls.Button;

    import feathers.controls.Label;

    import feathers.controls.Callout;

    import starling.events.Event;

    class feathers extends Sprite

    {

        public function feathers()

        {

            this.addEventListener( Event.ADDED_TO_STAGE, addedToStageHandler );

        }

        protected var theme:MetalWorksMobileTheme

        protected var button:Button;

        protected function addedToStageHandler( event:Event ):void

        {

            this.theme = new MetalWorksMobileTheme(this.stage);

            this.button = new Button();

            this.button.label = "Click Me";

            this.addChild(button);

            this.button.addEventListener(Event.TRIGGERED, bt);

            this.button.validate();

            this.button.x = (this.stage.stageWidth - this.button.width) / 2;

            this.button.y = (this.stage.stageHeight - this.button.height) / 2;

        }

        private function bt(e:Event):void

        {

            const label:Label = new Label();

            label.text = "Hi, I'm Feathers!\nHave a nice day.";

            Callout.show(label, this.button);

        }

    }   

}

This topic has been closed for replies.

1 reply

February 23, 2013

Not sure on your feathers question, but just wanted to say you can remove every instance of 'this' that you have in your class. In as3 there's only a few times you need this anymore - and it'll save you loads of typing.

rotten_69Author
Known Participant
February 23, 2013

Thanks for the suggestion. 

rotten_69Author
Known Participant
February 25, 2013

Anyone have an idea on how to solve this problem?