David Wolever
David Wolever

Reputation: 154494

Interactive ActionScript interpreter?

Is there some sort of interactive ActionScript interpreter? Similar to Firebug's JavaScript command line or Python's interactive shell?

Upvotes: 22

Views: 11733

Answers (4)

Wernight
Wernight

Reputation: 37600

flash-console project does exactly that. They have a demo and an online help.

  • Special commands start by a slash like /help
  • Variables can be stored and accessed via $some_name
  • / changes current scope to the last returned value.

The project is meant to be integrated in your project.

Upvotes: 1

mab
mab

Reputation: 810

There's also Frontal:

http://code.google.com/p/frontal/

It has an ActionScript interpreter built into it. It's based on the ECMA 2.62 (JavaScript) standard so it's not full AS3 and doesn't support things like packages and classes but it's still extremely handy.

As I mentioned, the interpreter is part of a larger library implementing the Frontal language but if you were so inclined you could pretty easily just rip out the interpreter.

Or you could just use it in Frontal. And if you did then you do get a console that allows you to run ActionScript in a primitive shell. For example, go to the Frontal website. (I can't post the link because my reputation is low but it's frontalcode + com.) Right-click and choose "View Frontal Source..." This will open the Frontal console. At the bottom of the console, click "command line." This is your "shell."

Try something like this say:

5 + 4 * 10

or

movie.alpha = 0.5

Upvotes: 5

tst
tst

Reputation: 3351

Try AS3Eval Library - it is AS3 compiler implemented in AS3. It has simple interactive shell.

Upvotes: 24

Luke
Luke

Reputation: 21236

Actionscript is a compiled language and the compiled byte code is executed by the Flash Player Virtual Machine. There are a number of tools out there that will create Actionscript byte code based on Actionscript source code. I'm not aware of the existance of any tools that will intrepet AS byte code and execute it other than Adobe Flash Player.

Although I do not say it's not possible, I haven't seen nor heard of any tools that gives you an interactive shell for Actionscript.

Upvotes: 1

Related Questions