The beginning of time
Greetings to all! I will try to tell you about how I started programming for the Flash platform under GNU \ Linux and what tools I used for this. This post was written for Flash programmers migrating to GNU \ Linux, so some configuration and usage issues were intentionally omitted by me (it's pretty easy to understand, just want you to feel free to delve into the settings. Believe me, you will not regret and find a lot of new things for yourself). Let's go!
Tools
First of all I want to note that I am a poor student, so all the solutions that I will use are absolutely free. You can spend a certain amount and program more comfortably, but now it is not about that. It has repeatedly been told about such IDEs as IntelliJ IDEA, Adobe Flex Builder, Eclipse + FDT, but they all request from $ 200 to $ 700. There are free solutions - FlexBean plugin for Netbeans, AS3IDE plugin for Eclipse and others. Of course, in free solutions, many necessary features are missing (debugger, InteliSense, etc.), but still better than nothing.
My approach will seem to someone crazy and
self-embarrassment mocking at himself but nothing can be done, I like it so much. For writing source code I use the so-called.
SciTE programmer’s editor is easy to install:
sudo apt-get install scite . Read about the capabilities of this wonderful editor can be on the
official website or
its Russian counterpart , and in
Wikipedia . Pay special attention to the
translation of documentation .
To compile projects it is a sin not to use the free official FlexSDK from Adobe, so go to
the download page and download the archive (~ 330MB). I unpacked the archive into the flex folder in my home directory, but you can do this in any other directory.
And now - setting!
Thanks to Arthur Dick and his settings files, we can turn SciTE into a fairly powerful tool. To do this, we go to
his site and see which chips are available through his project, and this is:
- Syntax highlighting
- Autocompletion of keywords
- Automatic indents
- Testing and debugging with FlexSDK and Ant
and download
the setting itself . Who cares, you can download
my version of the settings , translated into Russian. Unpack the archive, look at the readme.txt and follow the instructions.
sudo apt-get install scite - already done
sudo apt-get install ant - for debugging
whereis ant - we look where it was installed, for further adding to the settings file
whereis google-chrome - for the same (you can have any other browser)
sudo cp ~ / Downloads / scite-as3 / actionscript.api / usr / share / scite /')
Well, I hope it will not work to copy from one file to another.
But how to make a compilation, you ask? One
Portuguese blog suggested how to implement it. To do this, add the following to the user settings file
mxmlc = / folder_where_packaged_flex / bin / mxmlc
command. compile . $ ( file. patterns . actionscript ) = $ ( mxmlc ) $ ( FileNameExt )
command. go . $ ( file. patterns . actionscript ) = ( $ browser ) $ ( FileName ) . swf
An important point: in order to compile not only * .as but also * .mxml sorts, you need to find the following line:
file. patterns . actionscript = * . as3 ; * . as
filter. actionscript = Actionscript ( as3 as ) | $ ( file. patterns . actionscript ) |
and make her so
file. patterns . actionscript = * . as3 ; * . as ; * . mxml
filter. actionscript = Actionscript ( as3 as mxml ) | $ ( file. patterns . actionscript ) |
Well, now almost everything is ready. The main thing is not to forget to make the
mxmlc file executable and not to forget to attach files to the build.xml projects, otherwise the ant will swear.
Testing
It is advisable to check the build quality, so we create an empty * .mxml file and write there:
< ? xml version = "1.0" ? >
< s: Application xmlns: fx = " ns.adobe.com/mxml/2009"
xmlns: s = "library: //ns.adobe.com/flex/spark"
xmlns: mx = "library: //ns.adobe.com/flex/mx" >
< fx: Script >
<! [ CDATA [
private function clk ( ) : void {
myLabel. text + = "World!" ;
}
] ] >
</ fx: Script >
< mx: Canvas borderStyle = "solid" >
< mx: VBox >
< mx: Label id = "myLabel" text = "Hello," />
< mx: Button label = "OK" click = "clk ()" />
</ mx: vbox >
</ mx: Canvas >
</ s: application >
Save as test.mxml and press Ctrl + F7. Voila?
Delicacy
To support the Russian language in UTF-8 encoding and to set a normal font, you need to add this magic to the user settings file:
# Font setting
font . monospace = font:! DejaVu Sans, size : 10
font . base = $ ( font . monospace )
font . small = $ ( font . monospace )
font . comment = $ ( font . monospace )
font . text = $ ( font . monospace )
font . text . comment = $ ( font . monospace )
font . embedded . base = $ ( font . monospace )
font . embedded . comment = $ ( font . monospace )
font . vbs = $ ( font . monospace )
code. page = 65001
LC_CTYPE = en_US. UTF - 8
Thank you all for your attention! Waiting for critics.
UPD. At the request of comments I post screenshots of the work of autocompletion and auto-indenting, as well as the compilation process (PS Ant'a, I haven’t screwed it yet).

Compilation…

All the rest…