Xray ( The AdminTool ) becomes opensource

Many of us used Admin tool for debugging flash movies in the past, being a great debugging tool (for me much better than the one provided in flash).
Now Admin Tool is an opensource project!
What is Xray?
Xray (The AdminTool) is a “snapshot viewer” of the current state of your Flash application without impacting the performance or the file size of your application. Xray’s true nature is to look into the very guts of the Flash application and dissolve the 2d myth you see on screen to a 3D tangible entity you can truly crawl through.
The downloads provided with Xray are:

Other links:

More info available at: http://labs.blitzagency.com/?cat=2
http://www.osflash.org/doku.php?id=xray_the_admintool

Flade, opensource 2D physic engine

Today Davide shows to me this link to a new opensource project regarding Flash.
It’s a “free library for simulating 2D physics in Flash using Verlet integration. It currently features particles, stick & angular constraints, wheels, and surfaces composed of line segments. Designed primarily for games with a goal of speed and ease of use”
I immediately downloaded the available “alpha” release and made a first test..

Flade 2D physic engine
Title: Flade (0 click)
Caption: Flade 2D physic engine
Filename: flade.swf
Size: 5 KB

I don’t know if the project is still alive and which is the developement status, but it looks very promising.
…And here the code used for the example above:

var psystem = new ParticleSystem();
psystem.setDamping(1.0);
psystem.setGravity(0.0, 0.4);
// cooefficient of restitution
psystem.setKfr(0.1);
// surface friction for particles
psystem.setFriction(0.5);
// surfaces
var sA = new Surface(new Point(0, 0), new Point(1, 200));
sA.setIsOrientH(false);
psystem.addSurface(sA);
var s0 = new Surface(new Point(1, 200), new Point(100, 200));
psystem.addSurface(s0);
var s2 = new Surface(new Point(220, 170), new Point(300, 200));
psystem.addSurface(s2);
var s3 = new Surface(new Point(300, 200), new Point(400, 150));
psystem.addSurface(s3);
var sB = new Surface(new Point(399, 150), new Point(399, 0));
sB.setIsOrientH(false);
psystem.addSurface(sB);
// circle surface
var circA = new CircleSurface(170, 220, 70);
psystem.addSurface(circA);
var leftX  = 10;
var rightX = 50
var widthX = rightX - leftX;
var midX   = leftX + (widthX / 2);
var topY = 160;
// wheels
var wheelA = psystem.addWheel(leftX, topY, 10);
var wheelB = psystem.addWheel(rightX, topY, 10);
wheelA.coeffSlip = 0.0;
wheelB.coeffSlip = 0.0;
// body
var rectA = psystem.addRectangle(new Vector(midX, topY), widthX, 10);
// wheel struts
var conn1 = psystem.addConstraint(wheelA.wp, rectA.p3);
conn1.setRestLength(5);
var conn2 = psystem.addConstraint(wheelB.wp, rectA.p2);
conn2.setRestLength(5);
var conn1a = psystem.addConstraint(wheelA.wp, rectA.p0);
conn1a.setRestLength(5);
var conn2a = psystem.addConstraint(wheelB.wp, rectA.p1);
conn2a.setRestLength(5);
psystem.paintSurfaces();
this.onEnterFrame = function() {
var keySpeed = 2.0;
if(Key.isDown(Key.LEFT)) {
wheelA.rp.vs = -keySpeed;
wheelB.rp.vs = -keySpeed;
} else if(Key.isDown(Key.RIGHT)) {
wheelA.rp.vs = keySpeed;
wheelB.rp.vs = keySpeed;
} else {
wheelA.rp.vs = 0;
wheelB.rp.vs = 0;
}
if (Key.isDown(Key.UP)) {
if (ang.targetTheta < 2.9) ang.targetTheta += .1;
} else {
if (ang.targetTheta > angDefault) ang.targetTheta -= .1;
}
psystem.timeStep();
psystem.paintWheels();
psystem.paintConstraints();
}

SEPY for OSX 10.4

SEPY ActionScript Editor running on TigerWorking on my new mac mini I finally managed to get sepy run for OSX (actually i made an installer for OSX 10.4).
I have fix the major platform related bugs, there are still some issues (such as mainmenu disappearing sometimes, import/export features), but on my first test it seems quite stable. Download it from sourceforge here: http://sourceforge.net/…&release_id=340616

I’ve also put a new testing Windows version here: http://sourceforge.net/project/…&release_id=340550

Is CGWS becoming open-source?

Christian Giordano, a friend and one of the Flash artist I estimate a lot for his creativity, recently decided to begin to make his works sources available for download.
If you never visit his site I suggest you to see some of the examples he’s publishing on the download area.. really nice!

p.s. See you next week, i’m flying to Malaga for a little holiday 🙂

http://nuthinking.com/goodies/downloads.htm

XML2Object revisited

An XML2Object revisited class.
Basically it works in the same ways as the previius one, but now in the parseXML method it can be defined a 2nd parameter which will tell to the parser to put all xml nodes into arrays. In this way all variables created into the returned object will be stored into array. for example:

import it.sephiroth.XMLObject;
myxml.onLoad = function(){
     	var data = new XMLObject().parseXML( this, true );
}

The second addition to this class is the parseObject method, which will convert any object into an xml. for example, this code:

import it.sephiroth.XMLObject;
myobject = {
   	attributes : {
    		name : "custom object",
    		type : 1   	},
   	item : [   { name : "Varese", code : "VA" },   { name : "Milano", code : "MI" }  ],
   	channel : {   name : "City",   country : "Italy"  } }
data = new XMLObject().parseObject(myobject,"TEST");

will produce this xml string:

<?xml version="1.0"?> 	<TEST type="1" name="custom object"> 		<item> 			<name>Varese</name> 			<code>VA</code> 		</item>   		<item>    			<name>Milano</name>    			<code>MI</code>   		</item>   		<channel>    			<name>City</name>    			<country>Italy</country>   		</channel>  	</TEST>

And here’s the class code: XMLObject.as

Natural Docs

I recently discovered this project (opensource) thanks to a post in SEPY feature requests. Natural Docs is an open-source, extensible, multi-language documentation generator.
It has native support for C#, Perl and ActionScript2 (PHP, Python, etc. has basic support).
It seems a really valid project, the problem (for me) actually is that is doesn’t support javadoc, even if I read on its forum that he’s planning to support it in the future.
Natural Docs requires Perl 5.05 or higher to run. If you’re using Linux or Mac OS X, you should already have it. If you’re using Windows and haven’t installed it yet, you can get ActiveState’s ActivePerl for free.
There are free versions available for many other platforms as well.

Download Version 1.34 from sourceforge.net site

Drag and Drop Tree component, yet another!

Yes, this is another drag and drop tree component 🙂
It was a log I wanted to extends the built-in Flash mx 2004 Tree component in order to allow drag and drop operations.. but time was always my enemy.
I was lucky that i need one for work.. i look around and i founded some cool other similar components, but i wanted to be able to do it by myself 😉
It just extends the base Tree component and you can set some drag and drop rules, just costants..
for example, i set these costants to be used:

  • TreeDnd.DEFAULT
  • TreeDnd.DENYALL
  • TreeDnd.DENYDRAGFOLDER
  • TreeDnd.DENYDRAGITEM
  • TreeDnd.DENYDROPFOLDER

they can be used in combinations:
myDnd.dragRules = TreeDnd.DENYDRAGFOLDER | TreeDnd.DENYDROPITEM
in this way you cannot drag a folder, only leaf nodes, and you cannt drop the dragged item into a leaf node, only into a folder or before/after another leaf node…

Get Adobe Flash player


Download the component here.

MTASC : Motion-Twin ActionScript 2 Compiler

MTASC is the first ActionScript 2 Open Source free compiler.
Right now it’s a command line compiler which get .as files as input and will generate .swf files as output. This means it can be easily integrated into any editor which can run command line tools (such as sepy).
It seems MTASC is more and more quickly than the internal flash compiler:
MTASC is based on the best compiler technology available (namely the OCaml programming language) and thus provide a great speed improvement over MMC (compile around 100 classes in less than 5 seconds).
Since the source code is made more concise by using good technology, it is more easy to maintain and implement robust and proven typing algorithms. The feedback we get from Open Source community help us fixes the bug quickly.

It’s made using OCaml as programming language.
The mailing list is available at this link: http://lists.motion-twin.com/mailman/listinfo/mtasc
For examples, download and bugs refer to the linked MTASC page.