Home > Flash > Flex – linux flex fedora flex get start flex flex cli compile flex hello world

Flex – linux flex fedora flex get start flex flex cli compile flex hello world

Q. How to get Flex started using my VI and CLI?

# Side note
* Get Flex SDK, follow the steps
* There is no directory rule actually! So, 2 files i put here: /var/www/html/flash/src
[sun@example src]$ ls
flashs.mxml Greeter.as
[sun@example src]$

# Steps:

1. Google and download Flex SDK, following is mine

[sun@example src]$ ls /home/sun/Downloads/flex
Adobe_Flex_Builder_Linux_InstallLog.log  com.adobe.flexbuilder.update.site  Eclipse_FlexBuilder_code_readme.htm  Installers       license.htm  sdks
Adobe_Flex_builder.sh                    eclipse                            FlexSDKShellScript.sh                install.support  Player       Uninstall Adobe_Flex_Builder_Linux

2. Edit or Create the flashs.mxml file, here is mine

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
  xmlns:mx="http://www.adobe.com/2006/mxml"
  horizontalAlign="center" verticalAlign="center"
>

  <mx:Button id="myButton" label="I'm a button!" />
</mx:Application>

3. Basic ActionScript which is .as file, here is mine

[sun@example src]$ cat Greeter.as
package
{
    public class Greeter
    {
        public function sayHello():String
        {
            var greeting:String;
            greeting = "Hello World!";
            return greeting;
        }
    }
}

4. Just build & run the damn flex!

[sun@example src]$ /home/sun/Downloads/flex/sdks/3.0.0/bin/mxmlc flashs.mxml
Loading configuration file /home/sun/Downloads/flex/sdks/3.0.0/frameworks/flex-config.xml
/var/www/html/flash/src/flashs.swf (150825 bytes)
[sun@example src]$ ls
flashs.mxml  flashs.swf  Greeter.as
[sun@example src]$ firefox flashs.swf

Done.

Advertisements
Categories: Flash
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: