View unanswered posts | View active topics



Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
AS3 on linux 
Author Message
Member

Joined: Thu Oct 09, 2008 5:53 pm
Posts: 7
Reply with quote
I have a solution to use AS3 in Linux.

You need :
Vim (or Gvim) with the plugin NERDTree (http://www.vim.org)
Flex SDK
Java JRE 6.0
Flashplayer for linux

Then you have to install the actionscript.vim syntax (you'll find it at http://abdulqabiz.com/files/vim/actionscript.vim - Thanks for his work) and put it on your Vim file (usually /usr/share/vim/vimcurrent/syntax).

Edit your gvimrc file (/usr/share/vim/gvimrc) with vim or gedit. Be careful, you have to be root to do it. It is the file witch configure gvim.

Then put this code. The lines witch start with " are commentaries :

Code:
"The wombat file was downloaded on vim.org and moved in /usr/share/vim/vimcurrent/plugin. If you use gvim, it's a very good theme.
:colorscheme wombat

"NERDTree wad downaloaded on vim.org and moved in /usr/share/vim/vimcurrent/plugin. With this command, you can launch it when you start gvim. It is a filesystem explorer. With it your, gvim looks like the flashdevelop environment.
:NERDTree /home/pepinot "Add the path you want NERDTree starts.

:set nu "This vim command set the lines numbers
:syntax enable "To launch the syntax

"Then I added some abbreviations
"For example, type nclass and space and a new class will appear
:ab nclass
         \ package<cr>
         \ {<cr>
         \ <cr>
         \   public class ... extends ...<cr>
         \   {<cr>
         \<cr>
         \      public function ... ():void<cr>
         \      {<cr>
         \      }<cr>
         \   }<cr>
         \ }<cr>

:ab prf
         \ private function ... ():void<cr>
         \ {<cr>
         \ <cr>
         \ }<cr>
:ab puf
         \ public function ... ():void<cr>
         \ {<cr>
         \<cr>
         \}<cr>
:ab prv private var
:ab puv public var
:ab iflash import flash.
:ab inc include "";

"The following abbreviation define your swf. You have to put it just before your class
:ab swfP  [SWF(width="800", height="600", backgroundColor="#FFFFFF",frameRate="30")]
 
"Preview in webbrowser
command Preview :!firefox %<CR>

"This command (:DebugF) launch flashplayer debug. In gvim, juste type :DebugF or :De and tab
command DebugF :! /bin/flashplayerdebug/flashplayer

"This command (:Flash Helloworld.as) compile the SWF with mxmlc
command -nargs=1 Flash :! /home/pepinot/Programmation/FlexSDK/bin/mxmlc /home/pepinot/Programmation/Projets/<args>

"This command (:NewProject) create a new project as Flashdevelop
command -nargs=1 NewProject :! mkdir /home/pepinot/Programmation/Projets/<args> /home/pepinot/Programmation/Projets/<args>/bin /home/pepinot/Programmation/Projets/<args>/lib


Of course, you can add a lot of other command. I suggest to write them in this topic if the members accept.

Oh and I am sorry for my very bad english.


Tue Dec 02, 2008 11:17 am
Profile
Member

Joined: Thu Dec 04, 2008 3:16 pm
Posts: 5
Reply with quote
Oh wow, I've been looking for this. I'll try it out later.

Thanks a ton!


Thu Dec 04, 2008 3:17 pm
Profile
Member

Joined: Thu Dec 04, 2008 3:16 pm
Posts: 5
Reply with quote
Hm, I have a little problem.

When I start up vim/gVim it says that :NERDTree /home/sko is not an editor command. It lets me use :NERDTree and all the files are in the right place, since everything appears to load up correctly (except the startup settings, presumably because of the error), but it still gives me an error in the beginning about NERDTree. Anyone know what's up?

EDIT: Also, the colorscheme doesn't load up correctly unless I use the menu... :( Compiling and everything works, though.


Fri Dec 05, 2008 1:50 pm
Profile
Member

Joined: Thu Oct 09, 2008 5:53 pm
Posts: 7
Reply with quote
I'm sorry ! You have to put wombat.vim in the colors file (vim/vimcurrent/colors).

About your NERDTree problem, do you have an error if you remove the path ?


Fri Dec 05, 2008 5:12 pm
Profile
Member

Joined: Thu Dec 04, 2008 3:16 pm
Posts: 5
Reply with quote
I tried putting wombat.vim in ~/.vim/colors and in /usr/share/vim/colors (default directory in Arch), and I think it finds it fine, but it just loads up oddly. It looks like it changes the font colors but not the background color. When I use :colorscheme wombat inside Vim, it loads the scheme just fine.

Also, yeah, I commented out the NERDTree and it worked fine It should startup since I installed the plugin, though. It works great when I use :NERDTree within Vim. What's it in startup for in the first place?

I'm sorry I'm bothering you with all this. I'm using Vim 7.2.25, by the way. You helped me discover the usefulness of Vim, though, so I'm reading up a book about it. Thanks for showing me that it can compile Flash!

P.S. I think this is in the wrong section.


Last edited by Skofo on Fri Dec 05, 2008 11:11 pm, edited 1 time in total.



Fri Dec 05, 2008 10:12 pm
Profile
Member

Joined: Thu Oct 09, 2008 5:53 pm
Posts: 7
Reply with quote
Well, I don't see how to resolve your errors. Maybe you should ask in a vim forum and explore vim documentation.

I made this post in this section because I was a Flashdevelop user and I wanted to develop my flash programs on Linux as I did with Flashdevelop on Windows XP. So this solution get closer Flashdevelop working. By the time, I want to develop AS3 C-tags and auto completion on Vim witch is the best free solution to code actionscript on Linux.

If you have any problem to compile, send me a personal message.


Fri Dec 05, 2008 11:10 pm
Profile
Member

Joined: Thu Dec 04, 2008 3:16 pm
Posts: 5
Reply with quote
Here's something you can put in your vimrc file (I prefer to use ~/.vimrc or ~/.gvimrc instead of /usr/share/(g)vimrc) so it automatically appropriately highlights .as files when you open them:
Code:
au BufNewFile,BufRead *.as set filetype=actionscript
syntax on


Fri Dec 05, 2008 11:34 pm
Profile
Member

Joined: Thu Oct 09, 2008 5:53 pm
Posts: 7
Reply with quote
I put it. Thanks.


Sat Dec 06, 2008 8:34 am
Profile
Member

Joined: Sat Sep 13, 2008 3:10 pm
Posts: 19
Reply with quote
Hello,
There is also that, which work well :
http://arthurdick.com/projects/as3/

the only problème I see with it is that the Ant task use "mxmlc" to compile and not "fcsh" so the compiler have to be reload at each compile and it's long.

I don't know if it is easy to make new task.jar using "fcsh" to compile and I don't understand why adobe don't give it like that ?
(the .jar used by scite as3 come from the ant flex folder)

However I did't arrive to make working the "debug" task of the build.xml gived by scite as3 author, may it is faster ? I just use the "test" one with debug option to true.
I don't know why the debug and test don't use the same techniques ?

There also :
http://axdt.org/ which work well and compile fast, but eclipse is a big soft and I prefère light soft like FlashDevellop or Scite


Wed Mar 04, 2009 9:54 am
Profile
Member

Joined: Wed Mar 11, 2009 12:40 pm
Posts: 4
Reply with quote
hi, i've read post, and try tu install axdt under ubuntu 64, and in order to install plugins inside eclipse, in the plugin axdt need org.apache.ant, and didn't install all , hope someone help me lot thanks.


Wed Mar 11, 2009 12:53 pm
Profile
Member

Joined: Sat Sep 13, 2008 3:10 pm
Posts: 19
Reply with quote
Hello,

When I installed axdt it didn't work with the official version of eclipse that I installed from apt-get.
After installed the last version of eclipse doaloaded on his site it was working well.
Don't know your problem and how you have installed eclipse, but may be it could be a piste ?


Thu Mar 12, 2009 6:51 pm
Profile
Member

Joined: Sat Sep 13, 2008 3:10 pm
Posts: 19
Reply with quote
Hello,

As I said before I'm using http://arthurdick.com/projects/as3/ and the probleme is that it don't use fcsh and it have to reload mxmlc at each compilation.

Flashdevelop use fcsh and it seems that it is fdbuild.exe who start it.

Do you know if it can be easy to port fdbuild to Linux and to connect it to scite AS3 ?


Sat Jun 20, 2009 1:47 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
3akucka wrote:
Hello,

As I said before I'm using http://arthurdick.com/projects/as3/ and the probleme is that it don't use fcsh and it have to reload mxmlc at each compilation.

Flashdevelop use fcsh and it seems that it is fdbuild.exe who start it.

Do you know if it can be easy to port fdbuild to Linux and to connect it to scite AS3 ?

Technically, FlashDevelop (ProjectManager plugin) is hosting FCSH, and it calls FDBuild with an inter-process ID so FDBuild can ask FlashDevelop to send compile instructins to FCSH.

In summary, FlashDevelop works as a compilation service for FDBuild.

I'm not sure how this can be "ported" to SciTE: AFAIK it doesn't have a mecanism to start a persistent process that other scripts can communicate with.


Sat Jun 20, 2009 2:42 pm
Profile WWW
Member

Joined: Sat Sep 13, 2008 3:10 pm
Posts: 19
Reply with quote
Thank you, I was hoping it could be easier, like a sort of an ant task... so I won't be abble to make that thing.

Do you know an other way to start fcsh, with an ant tash (don't know if it's possible) or something else ?

I saw that : http://zarkov.bigsource.de/front_content.php?idcat=3
witch seems to be what I need ? but actualy the standalone version don't support fcsh...


Tue Jun 23, 2009 7:22 pm
Profile
Member

Joined: Sat Sep 13, 2008 3:10 pm
Posts: 19
Reply with quote
3akucka wrote:
Hello,
There is also that, which work well :
http://arthurdick.com/projects/as3/

the only problème I see with it is that the Ant task use "mxmlc" to compile and not "fcsh" so the compiler have to be reload at each compile and it's long.

I don't know if it is easy to make new task.jar using "fcsh" to compile and I don't understand why adobe don't give it like that ?
(the .jar used by scite as3 come from the ant flex folder)


Hello,

I finnaly found a way to compile from scite as3 and fcsh with that python script :
http://flexcompile.googlecode.com/svn/trunk/flexcompile.py
I found it here :
http://blog.neolao.com/post/2009/05/07/72-accelerer-la-compilation-flash-avec-fcsh
where there is and build.xml example to make it working from scite + ant

I just changed the build.xml to that :
Code:
<?xml version="1.0"?>
<project name="Sample.as" basedir="">
    <property name="flexcompile" value="./flexcompile.py" />
    <property name="fcsh.bin" value="/home/ubuntu/Desktop/flex_sdk_3.4.1.10084/bin/fcsh" />

    <target name="swf" description="swf">
        <echo>Build test</echo>
        <exec executable="${flexcompile}" failonerror="true">
            <arg line="${fcsh.bin} mxmlc
                       -output test.swf
                       Sample.as"/>
        </exec>
    </target>
</project>


and it work fine.
it's far from Flashdevelop but it's a not bad way to do as3 on Linux and to compile fast and easily !


Mon Mar 08, 2010 9:29 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 25 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.