HAXE Flash9 Assembler Library and Compiling SWF


Haxe
is a very interesting project that is a scripting language that can create SWF for Flash.

Haxe has now added Flash9 Assembler library called hxASM and released version 1.1.4 that includes performance updates for Flash9 SWFs compiled using Haxe scripting.

I have to compile SWFs dynamically right now in a service and this is a very attractive solution with the new version and the performance improvements. Previously there was some slow down and only static content really worked well but if this is equal or a 30% improvement that is excellent.

Flex 2 can also compile at the command line you can compile flash9 swf with or without the flex2 libraries, when using mxml the flex libraries are included which add 100k or so minimum. It is not required to compile with flex 2 libraries though.

Flex 2 command compiler options

Haxe command compiler tutorial

Using Haxe with Flex 2

Using Haxe hxASM

Full Haxe API (includes all flash libraries)

AS3 Geom Class Exporter for 3ds max to PV3D, Sandy and Away3D

shirotokoro has created something interesting in the view of a pipeline for getting assets from 3d into the new Flash 3D engines with a Geom Class Exporter for 3ds max for PV3D, Sandy and Away3D.

One of the difficulties is the DAE/COLLADA and ASE imports dynamically at runtime in Flash 3d Engines sometimes takes some work to clean up the 3d objects in COLLADA xml or the ASE or 3ds if you are Sandy. But this takes that step out of the process and exports 3d models straight to flash 3d engine object scenes.

This is great for models that don’t’ need to be dynamically imported/parsed (which takes lots of time usually to parse the DAE in flash). I am not sure how detailed or elaborate the models can get as I haven’t had a chance to play with it yet but it is an interesting idea and development but the cat samples he has are fairly complex for a flash 3d engine and they look great. I think this can be used elsewhere preparing objects for 3d in flash as precompiled movieclips already. Maybe even a turbosquid like market for flash 3d. This could be fun.

from shirotokoro via pv3d list:

AS3 Geom Class Exporter is a 3DS Max designed script that allows you to directly export 3D models to AS3 classes.

he benefit is that you don’t need anymore to load and parse a texte file (ase, obj, 3ds).
You just have to import the class and to create an instance, like you do with usual objects like plan, sphere and box classes.

This script is compatible with the following AS3-3D engines :

Away3d
Sandy 3.0
Papervision 1.5

Installation :

Download zip file and unzip in any folder.
In 3DS Max, tools tab, open the maxscript panel and click the “execute script” button.
Select the script. It is now displayed in the available scripts list.
Select it, a new AS3 panel “AS3 geom Exporter” appears.

Options :

- Package : the exported class package
– ClassName : the class name
– Engine : the 3D engine you want to use
– Scale : scale the 3D object
– Swap face normal : with some 3D models, the faces export is swapped, you can fix this by selecting this box.

Here are rendering examples of an object in the following 3D engines :

Away3d
Sandy
Papervision
Download demo sources and 3ds max script

 

Thanks shirotokoro !

SharpDevelop 3.0 (Open Source .NET IDE) w/ WPF and XAML Support

SharpDevelop 3 which can be downloaded from build servers here is looking pretty good for revision 3 of my favorite .NET Open Source IDE and maybe even favorite overall considering it responds quicker that everyone’s .NET tool VS.NET.

The latest revision in builds just got the WPF and XAML tools in there. I tend to not use SharpDevelop for website development but do so for class libraries, apps and maybe forms development on occasion. This might help the layout side of things for the next gen of user interface development in .NET beyond just Expression.

One thing that has been apparent with IDEs as sometimes as they grow in size and scope and try to add more features, it is actually a slow down in some cases. I have been slowed from VS.NET 2003 to 2005. They are great tools but things start taking longer, it seems it should be the other way around.

When I need to just bust out a class library many times I do so in SharpDevelop because it is responsive and quick. I just hope they retain this speed. I unfortunately like to work on many projects at once so my IDE has to be smart about long processes (I curse you pending checkins! In 2004 when in beta VS.NET forced me to external IDE source control in Subversion and TortoiseSVN – much happier now).

XAMLPad right now is a pretty good quick development tools for XAML as well beyond just Expression and VS.NET Orcas Beta.

Be sure to try out SharpDevelop if you have not yet and develop .NET or would like to start. It is a great IDE and has some good extras like converting C# > VB.NET buffers whichcan be extended out to a service.

AS3 APE Physics Engine Recently Updated, New License (MIT) and New Demo

APE an actionscript physics engine and it recently moved from LGPL to MIT license, updated to version .45 and added a new walker demo.  Although the Google group is available there is no RSS feed of releases for this engine so be sure to check back for new releases of APE Physics Engine for AS3 from Alec Cove.

Walk on!

AIR Application Export Panel for Flash CS3

Grant Skinner has one upped the Flash CS3 AIR application export ability by adding a very useful panel to package Adobe AIR applications.

This is a pretty nice tool as usual from gskinner.  Be sure to check out the panel and all the installation info at Grant Skinner’s blog.

Download the AIRPanel zip file from here 

The AIR iPhone Desktop Widget

merhl has created an Adobe AIR iPhone widget for using the AIR runtime that is pretty cool.  It only has some sample screens for most buttons in it but you can actually browse the web on it using the web browser and it flips sideways to show the screen flip.  Check out your website or blog on the desktop iPhone.  Get your AIR iPhone now!

 

merhl has made it auto updating with AIR so as he adds more functionality it will autoupdate.  That is one neat aspect of doing desktop app/widget work with flash and AS3 in AIR is that it is much more capable of syncing content and that content is usually extremely optimized for fast delivery and keeping it up to date.  Plus you can make chrome and shiny things with it.

Papervision3D Flash CS3 Components Released

John Grden the resident Flash rockstar \m/ and of Red5 fame has been kind enough to release the Papervision3D FlashCS3 UI Components.

What’s nice about this is it lowers the bar to people using Papervision3D and make it more accessible to non programmers.  I have been working to get Papervision3D in many projects but this will make it easier to get designers more into the engine and using Flash to create pv3d experiences. It may also help others to combine pv3d and 2d into some neat mashups (all this can be done before in script but when barriers are lowered usually more creativity follows, also visual use of 3d models in the IDE is powerful).

Here’s what John has cooked up:

Finally! After waiting for a couple of months, I’m able to release the new Flash CS3 Papervision3D Components! There’s a lot to cover, but to get things started, let’s look at the features:

  • Design-time render and editing in Flash IDE
  • 3 Material types supported – BitmapFileMaterial, BitmaAssetMaterial and MovieAssetMaterial
  • Creates MovieScene3D and Free or Target camera
  • Manages resizing / centering of Papervision3D scene [optional]
  • Dynamic masking to constrain the viewable render area to the bounds of the component [optional]
  • Full API and access to Scene, Camera, Collada objects to code around
  • Automatically loads materials via Collada file [when materials list is not given]
  • New Custom Panel for modifying rotation, camera zoom, camera focus, camera Z at design-timeReady to get started?
    Download it hereYou’ll needs some docs with that sauce:
    DOCSWanna see it in real world action? I used it for the slide presentations at the class this last weekend at RMI.
    Here are the demo files and the project for the Jedi Training Sphere slide show

    In case you wanted to see the Jedi Sphere in action, and thus, the slides from the classes:
    Developer’s slides
    Designer’s slides

    And of course, you can find all of that stuff out on Google code:
    Papervision3D google home

Be sure to check out the quick video and more info over at RockOnFlash

Rock on John!

What was SWFObject and UFO is now one SWFfix for Embedding Flash in XHTML/HTML

Photo Sharing and Video Hosting at PhotobucketIn case you haven’t heard the SWFObject creator Geoff Stearns and the UFO creator have teamed up to create a new Flash Embed kit for HTML/XHTML called SWFFix that is more DOM compliant yet works.  Its always been a battle on this front of DOM standards vs Javascript when it comes to Flash embedding.

This teamwork to make a common kit will help to consolidate all issues with this and hopefully provide a really solid platform for embedding flash that takes into account all browser and satisfies standards but also works all the time. Making it harder to vote against when it comes time to decide what technology to use.

Of course there have been libraries like SWFAddress (for deep linking in flash and back button support easily) that have been built on top of SWFObject that will have to be switched over that have large user bases and following.

Check out SWFfix (of course this project has been very quiet and is not public since Feb 6-7th) hrm.

SWF to XAML Converter SWF2XAML (Flash to WPF/Silverlight)

Photo Sharing and Video Hosting at PhotobucketMichael Swanson has created a SWF2XAML converter that you should check out.  It has quite a few features and fixes that would seem like conversion from SWF to XAML might not be worth the time.  This might change that.  I think that it is important to stay up on all vector technologies as a RIA solution provider and we do not treat platforms like religions rather tools to use at our disposal.

The conversion at least for the vector art looks pretty on target.

Photo Sharing and Video Hosting at Photobucket

Features

The following table contains a list of features that are supported by the current version of the SWF2XAML tool or are planned for a future release. Where there are issues, I’ve tried to address them in the Comments column. If you’d like to see some visual illustrations, take a look at the Eye Candy.

Support Feature Comments
Yes  Frame by Frame Advance Use the horizontal scroll bar at the bottom of the window to navigate frames in the SWF file. Because frames in a SWF file must be processed sequentially, later frames will need to calculate intermediate frames, so jumping forward may take some time.

* The current version of the SWF2XAML tool does not cache prior frames (and that feature in Edit/Preferences is permanently disabled). So, when navigating backwards, the file will be re-calculated from the beginning. Depending on the file complexity, this may take some time.
Yes Explore Project Folder Choose File/Explore Project Folder to view the folder that contains any exported assets (like XAML files and bitmap images).
Yes XAML Export Choose File/Export… to export the current frame to a XAML file.
Yes Save Frame as Bitmap To save the current frame as a bitmap image (.PNG), choose File/Save Bitmap. The image will be named frame####.png where #### is replaced by the current frame number. The file will be saved to the subfolder identified in the application preferences.
Yes Launch XAML File Choose File/Launch XAML to automatically export the current frame to a XAML file and launch it in your default browser (normally Internet Explorer). 
Yes Launch Original SWF File Choose File/Launch Original to launch the current SWF file. If you have the Flash Player installed, this will open the player and begin the animation.
Yes Copy XAML to Clipboard Choose Edit/Copy XAML to copy the XAML for the current frame to the system clipboard.
Yes Copy ResourceDictionary Choose Edit/Copy ResourceDictionary to copy a XAML ResourceDictionary element that represents the shapes that have been defined up to the current frame. The XAML is copied to the system clipboard. Note that any shapes that are defined after the current frame will not be included (so, to include everything, first navigate to the last frame of the SWF file).
Yes Go To Specified Frame Choose Edit/Go To… and enter a frame number to jump to that frame. Because Flash files must be processed sequentially, all interim frames will also need to be calculated, so this may take some time.
Yes Preferences Choose Edit/Preferences… to configure various aspects of the tool:

  • The Display tab contains settings that determine the opacity of the Onion Skin mode and the stroke color and fill opacity for Wireframe Mode.
  • The XAML tab contains settings to export to WPF/E-compliant XAML and to control its formatting.
  • The Files tab controls where the various file types are saved on your system. By default, each SWF file will have its own subfolder created.
  • The Advanced tab contains settings that control how the tool caches various assets. Although caching of assets can improve performance, there may be a significant memory cost involved.
Yes Stage Clipping Choose View/Clip Stage to toggle clipping of the frame on and off. Often times, frames in a Flash file contain elements that can’t be seen with clipping turned on.
Yes File Information Choose View/File Information to enable the File Information pane. This pane displays information about the SWF file, including: file name, file signature, version, file length, frame width, frame height, frame rate (in fps), and the total frame count.
Yes Display List Choose View/Display List to enable the Display List pane. Think of the Display List as a stack of layers that make-up the current scene. You can use the checkboxes to selectively hide/unhide elements until the frame content looks the way you’d like. Note that not all checkboxes will change the visual display (only Shapes, MorphShapes, Sprites, Buttons, and Text).
Yes Advance Sprite Frames Many Flash files contains movie clips (or Sprites) that are sub-elements that have their own animation frames. Although these animations will automatically progress with each frame in the main scene, choosing View/Advance Sprites will manually advance each sprite in the scene by a single frame.

** If you run across a single frame Flash file and it doesn’t appear to animate properly, it may be because you need to manually advance the sprites in the scene.
Yes Wireframe Mode Choose View/Wireframe Mode to display the outlines of the elements in each frame. The wireframe stroke color and fill opacity can be configured under Edit/Preferences. Note that XAML exported or copied to the clipboard in this mode will represent the wireframe version of the frame (i.e. what you see).
Yes Onion Skin Mode Choose View/Onion Skin Mode to toggle opacity of the entire tool window. When Onion Skin Mode is enabled, the tool window becomes semi-transparent so that it can be moved over the top of a comparison window (like the Flash Player). This is useful to visually compare the converted geometry. The opacity of the window can be configured under Edit/Preferences.
Yes Tag Statistics Choose View/Tag Statistics to view a table of the Flash tags that have been encountered up until the current frame in the current file. To get statistics for the entire SWF file, choose Edit/Go To… to jump to the last frame of the file, then view the tag statistics.
Yes View Original Size Choose View/Original Size to size the frame to the height and width that is specified in the Flash file. When using Onion Skin Mode, this makes it easier to do a visual comparison with the Flash Player.
Yes Shape Morphs Shapes that were authored to morph over a specific number of frames are supported in the conversion. This includes geometry, fills, strokes, gradients, matrix transformations, etc.
Yes Clipping Layers Layers in the Display List that are set to clip lower layers are supported. Although these layers don’t have any visual strokes or fills, toggling these layers in the Display List pane will affect the display.
Yes Bitmaps All JPG, indexed color, and full color bitmap types are supported. Note that indexed color modes are simply converted to 32-bit RGBA PNG files (as are JPG files with an alpha layer, unique to Flash files).
Yes Color Transformations Simple color transformations (multiply and add) are supported per-layer in the Display List.
Yes/No Shape Fill Types  All fill types are supported to varying degrees:

  • Solid fills are fully supported
  • Both radial and linear gradient fills are supported. However, the new radial gradient settings in later Flash versions are not supported.
  • Bitmap fills are supported, but non-repeating clipped fills currently have some issues.
Yes/No  Buttons Only the button “up” state is currently converted and displayed. Also, there is no interactivity. 
No Frame Blend Modes No current support for various frame blend modes that were introduced in later versions of Flash.
No Dynamic Text Although static glyph text is supported, there is currently no support for text that uses locally-installed fonts.
No ActionScript All ActionScript code is currently ignored. As such, no interactivity is converted. 
No Sound No sounds are currently exported or played; they are simply skipped.
No Video All video is skipped. 

Installation

To get the SWF2XAML tool up-and-running on your system, follow these steps:

  • Make sure that you have the .NET Framework 3.0 installed on your machine. If you’re running Windows Vista, you can skip this step, because the Framework is automatically installed with the operating system.
  • Download SWF2XAML_0.2.zip (521KB).
  • Extract all of the files to a folder of your choice.
  • Double-click SWF2XAML.exe to run the tool.

AS3 Character Rigging Classes from the Algorithmist

Photo Sharing and Video Hosting at PhotobucketThe Algorithmist posted an AS3 character rigging class library. The kit includes some really specific classes for building characters and is quite well done.

The library includes all you need to rig up characters in flash and includes the source, samples for flex and what the hell more could you ask for?

The Algorithmist calls it the Singularity Package and it contains:

Singularity Package Contents (character rigging classes)

All rigging classes are in the Singularity package, which must be added to your path when building a new Flex project. The current package organization for the rigging classes is as follows,

Singularity.Rigs
Arm – 2-link bone chain representing right or left arm in a humanoid biped.

BaseBone – Base class encapsulating functionality common to Bones and Connectors.

Biped – Used to create and animate humaniod biped characters.

Bone – Represents a single bone with support for fast propagation of FK transformations in bone chains. The Bone class is optimized for linking bones together in chains.

Chain – Manager class for a single chain of bones.

Clavicle – 1-link connector representing right or left clavicle in a humanoid biped.

Connector – Optimized container for multiple single-bone chains with a single input and multiple terminators. Chains or additional connectors linked forward at each terminator.

  Foot – 1-link connector representing right or left foot in a humanoid biped.

  Hand – Multi-link connector representing right or left hand in a humanoid biped.

  Head – 1-link connector representing a humanoid biped head.

  IBone – Bone interface – represents all functionality a bone must implement.

  IChain – Chain interface – represents all functionality a bone chain must implement. Chains and Connectors implement IChain and are considered interchangeable when propagating FK.

Leg – 2-link bone chain representing right or left leg in a humanoid biped.

Neck – 1-link connector representing the neck of a humanoid biped.

Pelvis – Multi-link connector representing the pelvis of a humanoid biped.

SimpleSpine – 1-link connector providing the simplest representation of a humanoid biped spine. Used for very simple (but fast) game characters.

Template – Templates are used to skin (or draw bones) for segmented characters. Refer to SimpleSkinTest for examples.

When developing physics and character based animation rigging can help to really speed things along in 3d and here in this case in 2d flash.  This allows the developer/animator more freedom to work on the animation and not about redrawing.  It also helps to create characters that can be animated from the beginning rather than an afterthought which usually leads to less troublesome issues. 

The AS3 rigging classes are used for skelton rigging and skinning of 2D characters. The rigging class library is organized around the development of highly specific articulated rigs. The current focus is on humaniod bipedal characters. In a 3D animation package or game engine, a bone hierarchy would normally be represented as a tree structure. In this class library, bones and chains are organized in a structure that is easier to deconstruct and understand by OOP programmers. This structure has some performance advantages, particularly when propagating FK in a 2D rig.

The only drawback to this kit is it is not fully open source and commercial use must be approved.

The Singularity AS3 parametric curve library requires the Flash 9 player and a development environment supporting Actionscript 3. All demonstration programs were created with FlexBuilder 2. The AS 3 character rigging classes are copyrighted and licensed for personal, experimental usage. Please contact me to obtain authorization for commercial use. The download includes the entire Singularity package (which includes the parametric curve library).

Download library (.zip) here. Before running any example programs, place the Singularity package in your build path.

FlashDevelop 3 Alpha Released: Best Flash IDE Gets an Upgrade

Photo Sharing and Video Hosting at PhotobucketObligatory posting on FlashDevelop3 Alpha being released.  To people like me alpha means “old school” released.  I am ready to use it today!

Download it here

If you are not using FlashDevelop for your coding portion of your flash application, you might be missing out.  There is a reason some of the best actionscripters (ahem actioncoders) use it.

AS3 Mouse Gesture Recognition

Didier Brun of ByteArray just keeps throwing down.  Here is another great showcase of the power of AS3 and the tools that can be built with it, strongly based on alogorithms proven in other hardcore languages. This project is a Mouse Gesture Recognition lib for AS3 (demo)

Photo Sharing and Video Hosting at Photobucket 

Mouse gesturing can be used for recognition of letters, numbers or even just programmable actions by gesture.  Imagine an application that allows you to just make a gesture (even if its not a drawing program or letter recognition) that would open when you make an open gesture, or close a file with a slash gesture. I have many uses for this planned. Very inspiring stuff.

A bit on the algorithm from Didier at ByteArray, I just don’t think it can be made any more simple:

Photo Sharing and Video Hosting at Photobucket

  1. Each letter is defined by a n ‘ 8-directions gesture sequence
  2. The mouse moves are saved with the same 8-directions sensibility
  3. A Levenshtein distance is calculated from each letter to the user moves
  4. The algorithm return the best candidate (lowest levenshtein cost)

Usage

Example for the B :

gesture=new MouseGesture(stage);
gesture.addGesture(“B”,”260123401234″);
gesture.addEventListener(GestureEvent.MATCH,matchHandler);

function matchHandler(e:GestureEvent):void{
trace (e.datas+” matched !”)
}

This project is OPEN SOURCE under RPL License.
2007-05-17 v1.0 mouse_gesture_v1_0.zip

JavaFX and JavaFX Script – the Java RIA Kit

Photo Sharing and Video Hosting at PhotobucketSun has launched JavaFX using JavaFX Script which is a RIA kit for Java.  I will have to look further into this for a few specifics like 3d support but there is another great Java library for effects called processing.  But an RIA tool using Java applets may seem mid-ninties-ish but Java applets have been having some success online including many 3d viewers, games like runescape, mini apps, financial tools and ftp toolkits on their limited desktop and web usage. 

Market Direction?

This seems to confirm that the market is currently headed towards RIA applications with the three big development companies introducing new toolkits for RIA and interactive web apps (Microsoft Silverlight, Flash9/AS3, now Sun JavaFX).

This RIA kit is Open (Source) for Business

There is an open source community for this development at openjfx.org.  This could be one of the first results of the open sourcing of Java recently.

Additional Competition Possibly

I like this because its open source and because it will put pressure on the competition of Adobe vs. Microsoft possibly.  Adobe will be launching Flashlite 3 soon with FLV video support which is quite a race on the mobile side.  Most importantly, Java has a full consistent package now which may help its adoption since it spans mobile, tv, web, desktop. Historically Java kits have been all over the place.  Adobe may eventually be pressured into opening up Flash at some point if this gains traction and advances quickly.  Or this could be a dying flare thrown up in Java’s demise.  Personally now that it is open, I think that Java has only just started and gaining a second wind.

Duke is open for business. via Shaver as silly season continues

PSD to XAML Converter

Photo Sharing and Video Hosting at Photobucketflowlabs has a PSD to XAML converter. 

Psd2Xaml (with a splash of swf)

Simple, free, open-source tool for converting Photoshop .PSD files to XAML. Also supports limited SWF conversion to XAML.
This project is a by-product of the development of PaintLab, a node-based paint application.
Read more about the underlying PSD parser in this article: http://www.codeproject.com/cs/media/PSDParser.asp

Usage

Drag’n’drop PSD or SWF files to the application, and it will create XAML files in the same directory but with the extension xaml instead of psd. The individual layers’ bitmaps are saved in a subdirectory with the same name as the output .xaml file plus “_Bitmaps”.

Example: “Test.psd” is converted to”Test.xaml” and a new folder with the name “Test.xaml_Bitmaps” will be created, containing the bitmaps.

Downloads

Application: Psd2Xaml.zip (233 kb)
Source: Psd2Xaml_src.zip (226 kb)
Test media: Tiger.swf (16 kb)  DVDMenu.zip (psd, 989 kb)

It’s Gr-r-r-e-eat!!

Follow

Get every new post delivered to your Inbox.