views:

31

answers:

1

I just started using Keith Peters Minimal Components. I am having an issue related to PushButton Class and I am hoping that someone has run into the same issue or may know what the solution is.

The problem is pretty simple. The TextField or Label if you will, on the button is not showing up. Here is the code.

bn = new PushButton();
bn.width = 100;
bn.x = 10;
bn.y = 10;
bn.label = "Start Recording";
this.addChild(bn);
+1  A: 

I guess you are using source code version of minimal comps and compiling it with flex 3.x

There is a slight difference between 3.x and 4.x in embedding fonts. Goto to the source code of com.bit101.components.Component, and you'll find the following sentences.

// Flex 4.x sdk:
                [Embed(source="/assets/pf_ronda_seven.ttf", embedAsCFF="false", fontName="PF Ronda Seven", mimeType="application/x-font")]
                // Flex 3.x sdk:
//              [Embed(source="/assets/pf_ronda_seven.ttf", fontName="PF Ronda Seven", mimeType="application/x-font")]
                protected var Ronda:Class;

Comment out the flex 4.x sdk line, and uncomment the flex 3.x line!
Otherwise, you can use swc version!

9re