How to #1: Can be possible to write Flex applications without MXML?

Filed under 3.0, Flex Beyound basic, Flex Tutorials, General announcements

#1: Completly. Since the Flex MXML language references to actionscript 3.0 classes. While in there you can write part of a Actionscirpt project using Flex Builder or just write a package’s inside class that contains all necessery needs to do it.

here’s a short example of it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
>>
 
package {
import flash.display.Sprite;
import flash.text.TextField;
 
public class test extends Sprite
{
public function test()
{
var text:TextField = new TextField();
text.text = "Hello World!";
addChild(text);
}
}
}

4 Comments

  1. imtiyaz
    Posted April 10, 2007 at 11:34 am | Permalink

    But how can i say that this is Flex Applicaiton.
    Application is root component for Flex component ( i think )
    and we are not using flex api anywhere here…
    the entire thing uses flash and AS3
    is not it

  2. Posted September 5, 2007 at 1:21 am | Permalink

    You’d not using Flex where it excels over AS.

    The advent of Flex opens up what Adobe has always guarded with Flash & AS, if Adobe has grown to understand rich internet applications need a structured declarative syntax (via mxml) using a rich set of components, Flex users should appreciate that much.

    In fact my thinking is that over time certain scripted functions (e.g. event handling) need not be done strictly in AS

  3. Posted October 17, 2007 at 12:41 pm | Permalink

    I’m still not convinced of the need for mxml. In my opinion Flex apps always seems to have this signature sluggishness, and I assume the mxml layer is the culprit. What good is it for anyways? AS is easy enough!

  4. doug
    Posted May 22, 2008 at 9:48 pm | Permalink

    mxml is slow and big. a Hello World app (like above) is about 1K w/o mxml and about 250K w/ mxml.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*