1

Okay, I downloaded the Flex 4 SDK from Adobe and extracted the contents to ~/Documents/flex4_sdk.

Now I have the following simple MXML file:

<?xml version="1.0"?>
<!-- usingas/StatementSyntax.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Label id="label1"/>

</mx:Application>

When I compile it with mxmlc /path/to/file.mxml, I get:

Loading configuration file ~/Documents/flex4_sdk/frameworks/flex-config.xml
/path/to/file.mxml (38642 bytes)

However, the resultant SWF file is blank. (Basically just a white canvas.)

Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
  • That code should result in a blank SWF. BTW: The Flex 4 SDK works fine for me on Ubuntu 10.04 with Sun's Java 6. – James Ward Jun 22 '10 at 13:22

1 Answers1

0

I get the same results if I Try to compile similar code using Flash Builder on Windows.

Try to give the label a value so there is actual a visual piece on your application

<mx:Label id="label1" text="Label1"/>

If at all possible I strongly recommend using the Flex 4 spark Application instead of the old mx approach. Your app might look like this:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx">

    <s:Label text="label1" />
</s:Application>
JeffryHouser
  • 39,401
  • 4
  • 38
  • 59