Tamarin Project

Adobe and Mozilla announced that Adobe will contribute source code from the latest Adobe® ActionScript™ Virtual Machine (AVM2), the standards-based scripting language engine in Adobe Flash® Player 9, to a new open source project known as Tamarin that will be hosted by the Mozilla Foundation.

AVM2, as currently shipping in Adobe Flash Player 9, was built from the ground up to work with the next generation of ActionScript. The new virtual machine is designed to deliver the performance and features to support the needs of rich Internet application developers. Source code from AVM2 being contributed to the Tamarin project implements ECMAScript 4th edition language features such as namespaces, classes, and optional strongly typed variables, and includes a Just In Time (JIT) compiler that translates ActionScript bytecode to native machine code for maximum execution speed.

The Tamarin project will result in an ECMAScript 4th edition engine that Mozilla will use within the next-generation of SpiderMonkey, the core JavaScript engine embedded in Firefox®, Mozilla’s free Web browser, and other products based on Mozilla technology. The code will continue to be used by Adobe as part of the ActionScript Virtual Machine.

Read more, visit the Tamarin FAQ

Add comment November 8th, 2006

FDT 1.5 Released

Powerflasher FDT 1.5.1 for Eclipse 3.2 is now available...

From the Powerflasher site:

Thanks to everybody for the patience. The new Powerflasher FDT 1.5 version is available from now on. It is a free minor update for all FDT fans. We hope the development time for version 2.0 with AS3 support feels short with it.

New Features:

  • Eclipse 3.2 support
  • MAC help update improved
  • Better UTF-8 Support
  • New: Project- and workspace wide reference search
  • New: Mark occurrence in the editor area
  • New: External SWF Viewer (ESV) with ANT support (windows only for the first step)
  • New: classpath editor (imports projectclasspaths to the Flash IDE)

Also new for everyone who was not involved in the public beta:

  • New: fdt.flashCompile ANT new option failonerror="true/false"
  • New: FSCommand2 added to TopLevel.as
  • New: Help Panel rework, also works on mac now
  • New: Quickfixes for foreign types
  • New: Function Variable QF to create a method
  • New: Console LineTracker for MTASC Problems(enables ProblemHover)
  • New: Quick-View: Type Dependency (Ctrl-U)
  • New: Texthovers and Declarations in Comments and Strings
  • New: Editor "Mark Occurences"
  • New: "Set Returntype" Quickfix with type-detection
  • New: Search References
  • New: Show variable-initializer in JavaDoc e.g. var a : String = "Hallo";
  • New: TextEdit - Folding actions
  • New: Other Perspectives from Flash Perspective available
  • New: File associaton of AS-Files via Content Types ("ActionScript Source File")
  • New: Ant-View available from Flash Perspective
  • New: Parser Performance optimizations
  • New: Folding of multiple singleline comments
  • New: Autoclosing of blockcomments optional
  • New: ANT Task "fdt.browse" opens external browser
  • New: Editor Links to AS-Language Elements
  • New: TODO Marker "//!"
  • And of course bugfixes and small other improved things

IMPORTANT: FDT from now on needs Eclipse >= 3.1 and so is not running on 3.0.x any more!

The update is quite easy:

Launch Eclipse, Help -> Software Updates -> Find and Install and select "Search for new features to install". Then mark the checkbox with the Powerflasher FDT site and its done.

We´ve made every update in the last months on the test URL for public beta test. If you participated on it, you already know some of the new features but especially the classpatheditor and the external SWF viewer will be new for all of you. So we hope that we were able to clean out all major bugs in this period but to be realistic, there might be still some. (Why does the bloggers need to be so fast)

Please, post things you find in the bugforum http://www.powerflasher.com/fdt/forum/viewforum.php?f=12 The team will try to fix it quickly.

We hope you will really enjoy it and love the new release as we do. It is still more pure coding comfort.

The Powerflasher Team

1 comment October 31st, 2006

AS2.0 Event based Timer class.

This Timeout class provides a timer which will dispatch an “onComplete” event message, when the timer is complete.

import mx.utils.Delegate;
import mx.events.EventDispatcher;

class Timeout {
	
	private var timerInterval : Number;
	private var duration : Number;
	private var destroyed : Boolean = false;
	private var running : Boolean = false;

	public function addEventListener(type : String, handler : Function) : Void {}
	public function removeEventListener(type : String, handler : Function) : Void {}
	private function dispatchEvent(e : Object) : Void {}

	/**
	 * Timeout provides a timer which will dispatch an onComplete message.
	 * 
	 * @usage
	 * function myTimeoutHandler() {
	 *   trace("Timer complete");
	 *   // do something after timeout?
	 * }
	 * var duration : Number = 1; // duration as Seconds
	 * var myTimeout : Timeout = new Timeout(duration);
	 * myTimeout.addEventListener("onComplete", myTimeoutHandler);
	 * myTimeout.go();
	 */
	public function Timeout(duration : Number) {
		EventDispatcher.initialize(this);
		if(duration != undefined) {
			this.duration = Math.abs(duration)*1000;
		}
	}
		
	public function go() : Void {
		if(!running) {
			running = true;
			setTimeout();
		} else {
			restart();
		}
	}
	
	private function setTimeout () : Void {
		timerInterval = setInterval (Delegate.create(this, timeoutComplete), duration);
	}

	public function restart (newDuration : Number) : Void {
		if(newDuration != undefined) {
			duration = newDuration;
		}
		dispose();
		go();
	}

	public function dispose () : Void {
		clearInterval(timerInterval);
		running = false;
	}

	public var crush : Function = dispose;
	public var kill : Function = dispose;
	public var destroy : Function = dispose;

	public function toString() : String {
		return "[Object Timer : "+ timerInterval + " ]";
	}

	[Event("onComplete")]
	private function timeoutComplete ():Void {
		clearInterval(timerInterval);
		dispatchEvent({type:"onComplete", target:this});
	}
}

Usage

function myTimeoutHandler() {
  trace("Timer complete");
  // do something after timeout?
}
var duration : Number = 1; // duration as Seconds
var myTimeout : Timeout = new Timeout(duration);
myTimeout.addEventListener("onComplete", myTimeoutHandler);
myTimeout.go();

If you’d like to stop the Timer before it’s completed…
myTimeout.dispose();. Or you can use myTimeout.crush();, myTimeout.kill();, myTimeout.destroy(); depending on your mood.

You can restart the timer myTimeout.restart(); and change the timer duration myTimeout.restart(2);

7 comments April 20th, 2006

Next Posts