Standalone actionscript interpreter? - actionscript-3

I want to to play around with Actionscript, mostly to compare the language with Javascript (I'm interested in the type system). Is there a straightforward way to do that or do I need to also install Flash or something similar? I'd prefer something that works on Linux but Windows-only is fine too.
Basically, I want to know if there is something for Actionscript that is analogous to v8/NodeJS or Rhino for Javascript, where you can run JS scripts directly (using console.log for output) without having to use a browser, create an HTML page, etc.

There is an amazing online tool capable of compiling Actionscript 3.0, this will aid your investigation of the language!
http://wonderfl.net/

As3Eval also is a good tool. Play around with the demo to get a feel for it.

It's windows only, but download Java, then install FlashDevelop : http://www.flashdevelop.org/
It'll download the flex sdk and everything you'll need to get started.
You'll need flash player to see your tests, and normally the debug player (take the standalone), which you can download here: http://www.adobe.com/support/flash player/downloads.html
As #neil says, you can also use wonderfl to test directly online, though obviously the experience won't be the same as a full ide.
You should be able to develop on Linux directly if you want to install flash builder (eclipse) but it's not free

Related

AIR Build Server Setup

I am at the point where I am running into incredibly long build times for my project and more projects to come. I would like to make a build server but I have not had any experience with them aside from downloading files from them as an end user.
My ideal setup is this: A GitHub where I can place my .fla file, classes and ANEs. The server sees this, compiles it, and allows me to test it remotely or hook into some debugger that lets me see stack traces and active variables at breakpoints and errors like Adobe Animate or Flash Builder.
Now I see there are GitHub plugins for Jenkins. I see there are questions referring to how to set one up with Flex/AIR. I come here with a few issues.
I am too far into my project to switch over from using Animate to something like Flash Develop or anything ADT related. The only thing I have found is how to take existing elements from my library in Animate and have them in a .swc for handling. However, this doesn't let me access existing elements in the Timeline and would rather not try to export/position/handle them in code (which is the only workaround that I see if this is not possible)
I run ANEs that are dependent on Google Play services and other Android specific libraries. Thus, I haven't been able to use the standard mobile debug launcher for AIR. I see Jenkins has some specific abilities for Android. Is it possible to somehow use this to give me a proper window for testing? I am thinking that I would need to run their emulator after compiling everything but I am unsure if there is a more efficient method or if it would even work.
I have never worked with Jenkins before or any other tools capable of automating tasks. Any step by step explanations is appreciated if you have the time.

Running Flash (AS3) code in Haxe

I am starting out developing in Haxe in combination with OpenFl, and am in a situation where I need to be able to run Flash/AS3 code in a Haxe program which is being compiled to Flash anyway.
I know I could use the command lime build -as3 as3source/ and then edit that code and manually insert the AS3 code I need to run, but I would prefer not doing that if I can.
Is there any way to do this?
You can compile your AS3 code into a separate swf or swc and then use -swf-lib to use it from Haxe.
You can always write a build script which enters the code in combination with the command for you, if you just want to avoid doing it manually, but I belive that´s the kind of answer you want.
I just find build script very usefull.
You may want to look at this article, some major options are described there (including tools for converting AS3 code to Haxe and technique with -swf-lib).

MouseEvent.RIGHT_CLICK is undefined at runtime?

ANSWER To use this and any new features in 11.2, the swf-version needs to be turned all the way up to 15.
My setup:
FlashBuilder 4.6 Build instructions include "-swf-version=13"
Flex SDK version 4.6.0 (build 23201) playerglobal.swc (current one from
Adobe's page,
http://www.adobe.com/support/flashplayer/downloads.html, said to be
11.2 as well)
Standalone debugger projector (11.2.202.228)
Browser flash player plugin (11.2.202.228)
So by my reckoning, I'm up to date in everywhere I should be, to be able to use MouseEvent.RIGHT_CLICK (Adobe Documentation:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/MouseEvent.html#RIGHT_CLICK) but, if I do
I understand that right-click was initially supposed to be AIR only, but that's supposedly changed, which is supported by the fact that it's in the website documentation and in the class definition for MouseEvent,
I want to play around with a few right-click stuff in Flash, but it seems like something's definitely not working correctly. Anyone got an insight as to what's wrong?
I'm a bit confused by some of the comments, so in case it's me poorly explaining what's going on, so here's an example of my code running and compiled, with source attached,
http://www.tymonrovers.com/seaders/asdf.html
SWF Version in build instructions need to be up at 15... as detailed http://helpx.adobe.com/flash-player/release-note/release-notes-developer-flash-player.html#main_authoring_flash_player
Damnit! I know it looks obvious now, but I do think they should probably detail that in the docs as well, they've got the specific versions of the SDKS for AIR and Flash, but not the swf version info, which while it might sound overkill, would certainly solve irritations like this when you forget that one little bit of a tweak you need to do for new features. Ah well, all working now. :/
-swf-version=15

Alternative to using Flash Projector as Autorun Interface?

I have been given the task of creating an Autorun installer for a distributable CD, and thought I would challenge the task with Flash. In previous versions of flash it was possible to use fscommand and trickery to run other local exe files, but due to virus creators and what-not, this has been reworked and totally destroyed for others to use.
So as a Flash developer I have hit a bit of a brick wall with this, and am asking out for any alternative ideas anybody may have? I am quite open with learning new languages/programs, and would like any expert advice from people in the know.
Just as a heads up for what features are required:
GUI with simple graphics/buttons
Ability to launch external exe/pdf files
must be able to be compiled to an exe, which can be launched by any windows machine without installing third party software eg Java.
The only simple solution I have thought of is making an html page, but using a browser is something I want to avoid doing!
Please Help :)
Christian
You can continue using flash freely if you want. There is a bunch of projector tools like northcode swf studion, Zink, mProjector and others. You can also create your own tool using any system programing language that produces windows executable - the only thing you will need - is to create an ActiveX instance of Flash Player and set up minimalistic API to allow Flash call required system functions.

Flash ActionScript 3.0 - Any free compiler, tools and tutorials?

I have got an assignment in which I have to implement a AS3 wrapper for any FLV player and I have to expose actionscript functions (External Interfaces?) so that other can be used in other different applications via CallFunction API. I have few questions regarding this -
Are the tools for this are freely available? I know Flex SDK is but I want standalone swf (I means Flash Player 10) that can be used anywhere without any dependency and should contain FLV player embedded or should be able to load it from a particular location by supplying the URL.
Is it possible only with an ActionScript compiler (or any free tools?). My problem is that I don't have flash or flex builder and I don't want to spend money on these because I don't work on it.
As I have almost zero knowledge about it. Can you guys please explain me (if possible with details) that what I need to do. Any resoures on how to create and compile?
If any of you have ever done this it would be really great if you guys can share samples. I've heard that many people have done the same thing for video players.
I can share a bit of my setup
I use Flash (CS5) for creating assets
I use FlexSDK as the compiler
And do all the code in FlashDevelop
Flashdevelop is for PC only for now, it's free and comes since the last few versions now with a debugger
I use FlexSDK to compile and Eclipse with AS IDE or something along those lines, and then preview things in a web browser using an html page with the swf file embedded.
check out projectsprouts. its a pretty nice Flash (as2/3/Flex/AIR) generation tool that can help you stub out your project, compile it, and even create unit tests if you want. pretty simple ruby install (i am a ruby newb, and got is running pretty easily). It was a pretty good support base, and an active mailing list where people will be happy to help you along.
It is important to note that the FlexSDK has very little to do with Flex unless you are linking against classes that are Flex specific. mxmlc does not have anything to do with MXML even though it will also compile MXML.
Here is an article that describes Flash development on Linux. It is pretty old, but the principles are the same. With an Actionscript 3 Compiler (contained in the FlexSDK) and a text editor, you are off to the races. It is a lot easier with Flash Builder 4, FDT 4, Intellij IDEA, Flash Develop, etc ;)