AS3 (and even ES4) can be evaluated anywhere (quickly)


Hi. While searching for ABC parsers I’ve accidentaly found an interesting (and obviously old) ES4/AS3 evaluator UI, which wraps Tamarin pre-built ABCs using a pure SWF environment. That means it runs Tamarin inside SWF. o_o

I’ve also found the old ES4 reference implementation some months ago.


That’s a good job IMO.


the “ES4 reference implementation” link you provide is blocked

AFAIK there is no official reference implementation of ES4

admin talking

as mentioned before you keep posting without selecting a category
and now you post link to “dangerous file”

do that one more time and your account will be blocked
consider yourself officially warned


? Here it displays normally. MediaFire doesn’t warn me so. Then I’m not really sure whether it’s dangerous, since I got it from a archive in Also, I don’t use antiviruses or the anti-malware ones. If you want it, check it yourself at; it’s in


Oh, and also check the following links before judging me:

(Downloads page)

(License accepting page)

(Direct download link, since it has to be inspected in the HTML page.)

Oh if ES4 hadn’t an implementation reference… That Zwetan thinks he’s the god of this world.


a pre-release is not a reference implementation

A reference implementation is, in general, an implementation of a specification to be used as a definitive interpretation for that specification

you should definitively avoid the personal attack of this kind

as an admin of this forum if I see a blocked and/or dangerous links
off course I gonna mention them and warn about them

if you can see the file on mediafire that’s probably because you have an account there
and you uploaded the file, so yeah you have access to the file you uploaded to your own account

anyway this forum has basic rules, respect them


a pre-release is not a reference implementation

But I hard somewhere in the pre-release it was a reference implementation. Or maybe I’m perhaps confusing with the source code.

(Okay, I did an attack. Sorry.)


After spending some time on this forum I’ve came to the realisation that indeed @zwetan you have a pretty big ego that’s why no one contribute to RedTamarin because your human skills are barely non-existent or close to none. Indeed you have strong logical IQ but your emotional intelligence IQ is below zero. Here is my advice for you: grap yourself few books about Emotional Intelligence from my part I will recommend one from Daniel Coleman:

If you want to be successful in life and not only in front of your keyboard you need to get rid of your old archaic OS which is located in your reptilian brain. You need to replace it with a more advanced one which has new features which will give more joy and hapiness in your life and probably to your wife and children and most importantly all other humans which will encounter you in the future. Please don’t marry until you do this and don’t get children until the update is finished otherwise all humanity will have a miserable life.

Truly yours,

Someone who was like you in the past.


Thanks to everyone for this entertaining thread. Personally knowing Zwetan, I think would suffer from using such a book. He gets emotional about code related matters, do you have a book about that? :smiley:


Yeah he sould go and read the Hadith of the Prophet Muhammad to know what it means to be a kind human being.

Here he can find some valuable information :

Don’t worry Zwetan I think I was worst than you concerning being an asshole. Now I try to be a better human being.

If by chance you are drinking some kind of enery drink specially the MONSTER energy drink please stop because that might be a good reason why you are such a hard case. The symbols on the can are three times the number 6 in hebrew.

Truly yours,

a brother who was a hard case in the past…


Look @gdeverlant

your 2 posts in this thread are completely off topic
and could be somewhat interpreted as personal attacks
stop that, you have been warned now

considering the personal, you know nothing about me
wether I’m married or not, wether I have kids or not
wether I am religious or not, etc.
all those informations are personal and private as they should

Don’t play that game on other members of this forum
or you will be instantly banned

This forum is here to talk about ActionScript 3 and associated subjects
if you need to talk about conspiracy theory and other emotional subjects
I’m pretty sure there are others forums for you out there that will gladly welcome you


now to stay on topic @Hydp

you can find an ActionScript eval method in avmplus/tamarin and also in redtamarin

see ShellCore::evaluateString in ShellCore.cpp

for a use case see as3shebang

    Runtime.eval( source ); 
catch( e:Error )
    trace( e.getStackTrace() );
    exit( EXIT_FAILURE );

the current available version of as3shebang is quite basic, the next version will allow much more features
here few links and screenshots


Note: my goal wasn’t the eval function, but regarding that, if you’re trying to imitate ES3 Global.eval, I don’t think this eval will be equivalent to ECMA-262 one. The eval there in ES3 pushes the scope frames, that is:

(Note: you can execute that in browser’s console finely.)

    let x = 0
    eval('x = 123')
    x // 123

In this example I’ve used let local definitions from ES4/ES2015+, but no diff’ anyways. It was just to avoid inserting properties in the environment Global object, really.

But good work anyway. (The issue I’ve with RedTamarin is that it started crashing when trying to execute any SWF (including my 2MB lexer). I’ve tried compiling it with MXMLC, targeting both SWF 11 and SWF 29. I think it doesn’t interpret SWFs properly, this way…)


…let your code talk.


Of course you don’t like to taste your own medicine when it comes to attack people telling them how stupid they are I think that everyone noticed how champion you are. There is only one way for you to get out of this hamster wheel be kind.

Everything in life turns out as it should, you reap what you sow.

Personnally I don’t care about this forum I care more about how kind people are.


well… about the original post “AS3 can be evaluated anywhere (quickly)”
the eval() method in avmplus/tamarin/redtamarin or a tool like as3shebang
allow you to eval AS3 quickly

the scoping of variables does support package
eg. you can define something like that


package test.something
    public var x:uint = 123;

package test.otherthing
    public var x:uint = 456;

import test.something.*;
trace( x )

using Runtime.eval( source ) it will output “123”

with any SWF?

redtamarin can support SWF version FROM SWF9 to SWF21

be sure you indicate a correct SWF version when you build with MXMLC

either use a config

    <!-- Specifies the version of the compiled SWF -->

or $ mxmlc -swf-version 14

redtamarin will interpret any SWF tags doABC and ignore the tags it does not understand

the crash is either the SWF version or you try to use API that are not available in redtamarin

note: if you don’t report a bug it is unlikely to be fixed


the crash is either the SWF version or you try to use API that are not available in redtamarin

Well, I’m aware that RedTamarin doesn’t implement all playerglobal.swc definitions, for example, even though Flash API would only be helpful for tracing bitmaps and URL requests, really.

It’s funny how RedShell only executes fine at first time, but then suddenly stops working. The crash report isn’t too clear and that’s it:

avmplus crash: exception 0xC0000005 occurred
Writing minidump crash log to avmplusCrash.dmp

I’ve tried compiling fundamental things, but I got exactly this same error. :-/ It’s disappointing sometimes.


What is funny is to use an open source project, get a crash, and expect things will resolve itself like by magic without taking the time to post as bug report.


@Hydp I’m not sure what your background is but for the last 20+ years of software development it is common to encounter bugs or require features in commercial projects and in open source projects.

As a developer of both commercial and open source projects it’s a normal part of the software development process.

There is a joke, “Eventually hardware fails and eventually software works.”

All software has had 5 to 10 years where bugs were not uncommon and users would report them. Not all software of course but many projects and certainly projects in development.

For me, it’s usually around version 3.0 that most bugs are worked out and version 4.0 when most features are included.

What you do when you encounter a bug is check the home page of the project for bug submission.

A typical bug report looks like the following:

Description of problem

Steps to reproduce

What you expect to happen

What actually happens

Additional notes and details (version, operating system, etc)


When compiling actionscript RedShell crashes.

avmplus crash: exception 0xC0000005 occurred
Writing minidump crash log to avmplusCrash.dmp

Steps to Reproduce:

  1. Create AS file named with code:
    trace(“Hello world”);
  2. In terminal call redshell (works)
  3. In terminal call redshell again (crashes on this step)

What I expect to happen:
The compiler to produce a abc file

What actually happens:
The compiler runs first time fine but on second time it crashes

Tested on Windows X, and RedShell 1.0

It looks like you already posted a bug report in another thread. My comments below:

I would say that in my experience people will be more willing to help if you post your setup and your code or a code fragment. Since I don’t have RedTamarin installed I can’t help. I posted another question on how to get it all set up.

Once that’s there if you want to post your test code then other people can test it and help you debug it. Also, people are attempting to help. Be kind to them. :wink: