Posts Tagged ‘FLEX’

Saturday, February 28th, 2009

Alchemy is going to shake things up a bit.  As witnessed before from Quake running in flash and now ODE compiled to run in flash using Alchemy (LLVM based). It is an early test but shows what could be possible.

Mihai Pricope has a post with sources on how he got the ODE (Open Dynamics Engine) a great open source physics engine for 3D, running on the AVM2 Flash Player virtual machine.

I’ve took Alchemy for a test and decided to compile ODE (Open Dynamic Engine). Just to add yet another physics engine to the Flash World. It was a hell of a ride but I finally got to produce some bouncing balls :). For a still unknown reason some as 3d libraries have been very slow to render 6 translucent walls and 2 balls. Papervision3D seems to move quite decent.

You can download the ode sources from here. To recompile them do (you need to have the Alchemy environment turned on):

Flash 10 will become mainstream shortly and with that the possibilities of using Alchemy in your projects is becoming a reality for production.  But what specifically can you do with Alchemy, a project that helps to compile C/C++ code into AVM2 capable files?

Alchemy described from Adobe:

With Alchemy, Web application developers can now reuse hundreds of millions of lines of existing open source C and C++ client or server-side code on the Flash Platform.  Alchemy brings the power of high performance C and C++ libraries to Web applications with minimal degradation on AVM2.  The C/C++ code is compiled to ActionScript 3.0 as a SWF or SWC that runs on Adobe Flash Player 10 or Adobe AIR 1.5.

Alchemy is based on the LLVM Low Level Virtual Machine that allows new levels of code translation.  Maybe this can lead to more effective and performing code to run on the iPhone with flash player 10. Or some type of system that allows flash developers to code in AS3 or take projects and get them ready to run on the iPhone much like some of the Java to Cocoa compilation systems and Unity3D using mono to compile down to iPhone capable code.

Thursday, February 5th, 2009

Recently two compact tweening engines have been released. Grant Skinner’s GTweeny and laborat’s ByteTween. This adds to the two that focus on micro-tween kit sizes in TweenLite and TweensyZero

Basically these engines look to be micro and provide pretty nice features while being so small. Micro tweening engines like GTweeny (3k), ByteTween (1.7k), TweenLite (2.7k), TweensyZero (2.9k) and Tweener (9k) have varying levels of support of features (Tweener being the most loaded with color and filter support without other kits just init, also TweenLite with a nice configurator to include only what you need).  Micro kits have benefits when used for banners, animated assets (where you have many assets and the per asset savings is worthwhile) and other places you just want really small output.

Light Transition ByteTween

(1.7k)

This kit has a c# version as well as a small as3 bytetween version.

The ByteTween static class eats only 1.7K of compiled clip! With this size it supports:

  • Creation of tweens of any numeric property (not color/uint properties).
  • Pause,Unpause,Cancel operations based on the tween target and property.
  • Overlap system that cancel tweens of same property in order to avoid erroneous behavior
  • Alpha tween with negative alpha support (negative alpha sets the MovieClip visibility to false)
  • ’scale’ tween of both ’scaleX’ and ’scaleY’ properties.
  • OnComplete callback with any number of parameters
  • Easy interface for creating new tweens!

Download light_transition_CS_0.5a.zip.zip (c# version)

Download thelab_ByteTween.zip

TweenLite

(2.7k) base

  • SPEED – I’m not aware of any popular tweening engine with a similar feature set that’s as fast as TweenLite. See the speed comparisons yourself.
  • Feature set – In addition to tweening ANY numeric property of ANY object, TweenLite can tween filters, hex colors, volume, tint, saturation, contrast, frames, and even do bezier tweening, plus LOTS more. TweenMax extends TweenLite and adds even more capabilities like pause/resume, rounding, event listeners, timeScale, and more. Overwrite management is an important consideration for a tweening engine as well which is another area where the GreenSock tweening platform shines. You have options for AUTO overwriting or you can manually define how each tween will handle overlapping tweens of the same object.
  • Expandability – With its new plugin architecture, you can activate as many (or as few) features as your project requires. Or write your own plugin if you need a feature that’s unavailable. Minimize bloat, and maximize performance.
  • Management featuresTweenGroup makes it surprisingly simple to create complex sequences and groups of TweenLite/Max tweens that you can pause(), resume(), restart(), or reverse(). You can even tween a TweenGroup’s “progress” property to fastforward or rewind the entire group/sequence.
  • Ease of use – Designers and Developers alike rave about how intuitive the GreenSock tweening platform is.
  • Updates – Frequent updates and feature additions make the GreenSock tweening platform reliable and robust.
  • AS2 and AS3 – Most other engines are only developed for AS2 or AS3 but not both.

Download TweenLite

TweensyZero

(2.9k) base

Here are some simple steps to help you get started with creating your first animations with TweensyZero. TweensyZero is a light weight version of Tweensy most core features found in Tweensy are available to TweensyZero. Documentation for TweensyZero can be found under the folder ‘documentation/zero’ or online

Download TweensyZero

gTweeny

(3k)

gTweeny is gTween‘s lightweight younger sibling. It strips a lot of the secondary features of GTween (proxy, timing modes, etc) in favour of smaller file size. It is currently under 3kb…

Download gTweeny

Here is a list of all open AS3 “Micro” Tweening engines < 5k

Here is a list of all open AS3 Tweening engines and base kits

The decision on which to use can be affected be features you want, how it feels (many use the same object syntax so it is dynamic), what performance do they have (all are orders of magnitude faster than the built in tween (flash) or transitions (mx/flex)), which size is ok, author/community support needed (some are more active than others adding features or simplifying and tweaking performance methodically), and many other factors.  There are definitely plenty to choose from.

Speed Tests for many Tween Engines

For more on each features see their sites or these previous lists on tweening engines:

Monday, February 2nd, 2009

Don’t know how I missed this but just this last month a new site has launched called wonderfl that allows quick as3 compilation side by side that is encouraged by community and similar to a demo scene.

This could be great for generating new ideas much like machima and demo scenes have done in the past.  This stype of stuff goes down with the flash community anyways but being able to do it on a site and fork and evolve scripts and game it is a great idea.

Effects with filters, bitmaps, pixel manipulation, pixel bender and papervision would benefit greatly from the type of innovation that could happen here quickly in small doses. See what you can throw down, maybe some fireworks.

Tuesday, January 20th, 2009

Adobe will essentially open up the RTMP protocol officially. RTMP has been used in other tools such as Red5 and haXe video for some time now.  But officially having it open will make it possible for more products built on it.  I am sure that most of this is to combat silverlight and to gain more video users that can play flash formats. RTMP spec will be posted here when ready.

RTMP provides an enhanced and efficient way to deliver rich content. Developers and companies will have free and open access to the documented RTMP specification to help enable unparalleled delivery of video, audio and data in the open AMF, SWF, FLV and F4V formats compatible with Adobe Flash Player.

Adobe has also been working on more real-time protocol tools based on UDP instead of TCP (which RTMP is based) that fall under RTMFP using ordered UDP that will be interesting to watch evolve.  Stratus is so far a sample of what is to come there.The UDP based real-time tools will be able to beat the capabilities of TCP based real-time  tools when using authoritative servers.

But with the RTMP announcement, multiuser and video applications should thrive even more with an open RTMP spec.

Monday, January 12th, 2009


(use arrow keys and spacebar to control the red ball)

A new 3d physics library is under development and in early stages called jiglibflash.  Like the Box2D ports it is based on a C++ library of the same name called jiglib, only this is 3D instead of 2D.  It is similar in purpose to WOW Engine which is the other current open source 3d flash physics engine.  For more on this toolkit see the links below.

UPDATE: katopz has also ported this to use Away3D as the renderer.

UPDATE: Also updated for the sandy3d engine as the renderer.

Tuesday, December 30th, 2008

SWFAddress 2.2 has been released.  SWFAddress is pretty much THE solution for deep linking in flash and works greatly in combo with THE embedding solution into (X)HTML/Javascript for flash SWFObject.

The new SWFAddress has just arrived after seven months of active development, various contributions and lots of positive feedback from the community. The list of changes includes the following:

  • Refactored JavaScript implementation
  • New SWFAddress.swc AS3 component
  • New CS4 based Splash screen sample
  • New Digg API sample
  • New up() method for easier deep linking path navigation
  • New XSS protection that doesn’t affect special characters
  • Support for Internet Explorer 8
  • Support for custom HTTP status messages in the SEO sample
  • Improved title handling
  • Improved unload event handling for IE
  • Updated Rails sample
  • Fixed getBaseURL() for AS3
  • Fixed Safari 2.0-2.0.3 support
  • Build-in fix for the Firefox 3/Mac OSX blinking effect
  • Additional onLoad fix for application/xml content type
  • Fixed optional options parameter for the popup method
  • Cross platform build script
  • Various optimizations

I believe that this new version is pretty stable and won’t require an update soon. There are two known Safari bugs (19202 and 20355) that currently affect the project and we can only hope that they will make it’s way into the next major release of the browser.

SWFAddress has grown significantly in the last two years and it’s very likely that we’re going to provide a lite version for users who need just the basic functionality. Very soon the same API will become available for Silverlight and we’re also scheduling the development of a jQuery plugin.

Friday, November 28th, 2008

I am working with lots of content now that is flash and unity3d in game development for the web, and occasionally systems built in flash, javascript or other have to communicate with Unity3D and vice versa.  You can do this from the server side (WWW/WWWForm class or sockets) OR you can also communicate client side for many things such as sending name value pairs or variables into Unity3D, Flash or the javascript in page as needed. There are some great tools like UnityObject that is like swfobject (only you have to update it to work with latest browsers) that make this more simple to send in params and messages. The same can be applied to Silverlight. It is pretty simple all in all but having a sample to start with is good with all these technologies.

Paul Tondeur threw togetother a little sample that shows how you can integrate Unity3D, Flash and javascript in the page fairly simply with lots of great demos.  It really is just about passing parameters around into the objects from javascript, then within Flash calling ExternalInterface to call external javascript or within Unity3D calling Application.ExternalCall.

//Flash adding callback for javascript code
ExternalInterface.addCallback("functionNameInBrowser", functionNameInFlash );
//Unity3D calling javascript code
Application.ExternalCall("javascriptFunction", "Parameter1");

Nothing too tasking but if you want to see samples of this working together from flash, flex, javascript, unity3d then check it out. Zip on over to Paul’s site to grab the files and more demos and samples. All examples are bundled in one download, which includes all the Unity3D, Flash, Flex, Actionscript and Javascript files.

Here’s some demos

Monday, November 17th, 2008

Augmented reality is a very cool technology.  It is the star wars holograms that we always want, it is playing a game that maps out the physical world mixed with virtual assets, it is straight up cool.

The FLARToolKit is doing some of this cool in Flash.  This little toolkit is pretty sweet mapping points and sets of points to patterns, colors or other visual queues that technology can latch onto.  Combine this with a webcam and you have some pretty cool AR.

(more…)

Saturday, October 11th, 2008


as3isolib is a great isometric library for actionscript 3
by Justin Opitz.  This is a lower level isometric library that could be used in building your own isometric gaming engine or learning more about the popular isometric view in games or other flash content.

From building basic blocks…

To constructing sprites and objects with individual iso objects with their own bounding boxes.


This sample shows a two piece tree, a common issue with sprites in isometric is where to slice them up.  This sample shows a tree with the leaves able to be in front of a character so that you could walk under the tree and be in front of the trunk but covered by the trees.  Essentially height is respected.

Sample code for the tree tutorial:

package
{
import as3isolib.display.IsoSprite;
import as3isolib.display.primitive.IsoBox;
import as3isolib.display.scene.IsoGrid;
import as3isolib.display.scene.IsoScene;

import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLRequest;

public class IsoApplication extends Sprite
{
 private var scene:IsoScene;
 private var assets:Object;

 private var loader:Loader

 private function loadAssets ():void
 {
  loader = new Loader();
  loader.contentLoaderInfo.addEventListener(Event.INIT, loader_initHandler);
  loader.load(new URLRequest("assets/swf/assets.swf"));
 }

 private function loader_initHandler (evt:Event):void
 {
  buildScene();
 }

 private function buildScene ():void
 {
  scene = new IsoScene();
  scene.hostContainer = this;
  scene.container.x = 200;
  scene.container.y = 200;

  var treeTrunkClass:Class = loader.contentLoaderInfo.applicationDomain.getDefinition("TreeTrunk") as Class;
  var treeLeavesClass:Class = loader.contentLoaderInfo.applicationDomain.getDefinition("TreeLeaves") as Class;

  var grid:IsoGrid = new IsoGrid();
  grid.showOrigin = false;
  scene.addChild(grid);

  var s0:IsoSprite = new IsoSprite();
  s0.setSize(25, 25, 65);
  s0.moveTo(50, 50, 0);
  s0.sprites = [treeTrunkClass];
  scene.addChild(s0);

  var s1:IsoSprite = new IsoSprite();
  s1.setSize(125, 125, 100);
  s1.moveTo(0, 0, 75);
  s1.sprites = [treeLeavesClass];
  scene.addChild(s1);

  scene.render();
 }

 public function IsoApplication ()
 {
  loadAssets();
 }
}
}

current features

  • simple scene creation
  • 3 primitive types
  • base class for displaying user-created content
  • plenty of styling option on vector based primitives
  • integrates well with a variety of tween engines
  • standard 3D isometric positional sorting

So get busy building the flash version of roller coaster tycoon…

Saturday, October 4th, 2008

This project is stacked with cool, but is also useful, an ogg/vorbis player in flash/as3.  Arek Korbik at barelyfocused implemented a port for a pure Ogg/Vorbis audio library called FVorbis.  Check out the demo (need flash player 10). Groovy.

The name is: FVorbis. Which stands for more or less “Ogg and Vorbis in Flash”. That’s right, pure ActionScript 3 implementation of the Ogg and Vorbis libraries that require no kind of native support from the Flash Player. A simple Vorbis player implemented using the new FVorbis lib compiles to about 46KB SWF file. And that’s it.

To top it off the code is actually written in haXe, a favorite of the flasherati. This version was iterated from the Cortado’s JOrbis code.

Ogg Vorbis is a great open source audio format which is widely popular in game engines such as recent tools like Unity3D (which will be launching their iPhone dev kit on Oct 22 btw but I digress), so it is great to see it starting to appear in flash. Thanks Arek.