tags:

views:

36

answers:

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"&gt;

    <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.)

A: 

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>
www.Flextras.com
The spark Application thing doesn't work, I'm afraid. Neither does adding the text property to the label.
George Edison
I finally switched back to Flex 3 - works like a charm :)
George Edison
Bizarre is all I Can say. Be sure to file a bug at bugs.adobe.com
www.Flextras.com