Archive for the ‘TOOLS’ Category

Monday, May 26th, 2008

Tink posted a great library manager for using external assets in your flash projects. When you start getting deep in projects you end up either having to roll your own that might end up being project specific, or you can just grab this from Tink and it is nice and standardized now for you.

Here’s and example of our Library & LibraryManager classes that we use in some of our Flex and AS 3.0 projects to manage our external assets stored in SWF’s.

The classes enabled you to create multiple libraries of embedded (retaining and giving access to code) or loaded SWF’s.

You can create instance of Library wherever you want, but you can also create them through the LibraryManager giving you a single class to gain access to all your Library instances.

As you develop more and more flash/flex projects with AS3 these types of utilities come in handy. Another that comes to mind is Arthur Debert’s BulkLoader and polygonal labs Data Structures for Game Developers that are all great kits.

Add Tink’s Library and LibraryManager to your arsenal today! Thanks Tink.

Wednesday, April 16th, 2008

A great Action Message Format (AMF) remoting kit for server side for the pythonistas is pyAMF, they recently released PyAMF 0.3 and have a sample running up on Google App Engine. There is also a tutorial for getting PyAMF running on Google App Engine. Aral Balkan got this running as well.

Features of pyAMF currently:

More on the PyAMF library:

Monday, January 14th, 2008


Just recently through the holidays Degrafa has made some great strides as a very cool SVG pathing and designers toolkit for Flex. I have to say some recent Flex apps have really looked good like Picnik and Buzzword but this kit looks to clean up the lack of design and default style-itis that has plagued most common Flex Apps.

This so far looking like a pretty strong kit for bringing the designer pipeline into Flex to provide some really nice looking web styled apps. It has a direct crossover to Silverlight and Path objects that are largely just a series of data created in Expression or exported from Illustrator into XAML. The one benefit of Flex/Flash is it compiles to a very small SWF where with Silverlight you have to package the XAML in a zip and use the downloader object to extract it out. These XAML files and Paths can get massive as I am sure the ones for Degrafa will for Flex but the compile option is nice as it is compressed heavily.

All about Degrafa

Yes the launch includes shiny buttons…

Sphere Sample (right click for source)

Also, it appears it is a way to bridge the pathing and pipeline for flash or Silverlight. At one of the contributors blogs they mention this:

We have lot of interesting features planned for the coming releases. There is also a converter app that will be made available for converting the juicy Degrafa graphics to XAML.

Degrafa has gone live.

Developing…

Sunday, January 13th, 2008

Here is an interesting look to start the new year at Google Trends for some common keywords to this blog audience. Comparing AS2, AS3, Silverlight and actionscript you can see that there is some pretty interesting things happening.

as3 as2 actionscript silverlight  

First off, AS2 and AS3 are clouded because they are also related to EDI and EDI-INT so they get a bit inflated. Silverlight though is pretty unique in the naming. So from this graph we can see this happening:

  • Silverlight and AS3 are growing rapidly
  • Silverlight is crossing over as3 or meeting it
  • The market looking for Silverlight is about 8-10 times as large as actionscript/as3/as3
  • Silverlight and AS3 are growing, AS2 has no growth left and is an EOL language (end of life)
  • AS2 (even with crossover to EDI trends for “as2″) leveled out, where AS3 is starting to lift to a larger market. This is strongly due to it being a fun language based on ES4 and interests programmers.
  • The as3 effect started right in March-April 2007 (hrm I started this blog in April 2007 coincidenc? j/k :))

Another chart including Flex shows a better picture of the keyword wars between flex and silverlight.

as3 as2 actionscript silverlight flex

So from this graph we can see this happening:

  • Flex has a large buzz
  • Adobe’s marketing efforts are many while silverlight is more unique and focused
  • Flex, as3 and Silverlight are popular, and growing in their support (the growth market for technology is in these areas, not in tech from Flash 8/as2)
  • AS2 still taking a nosedive

Flash and Flex programmers and designers should know that with Silverlight 2.0 release coming and the capabilities of Silverlight 2.0 more competitive, flashers should be working on Flex, Flash9 or at least AS3 if not Flex. The RIA competition market will heat up immensely this year with Silverlight 2.0 and possibly Flex3 and coding and programming for Flash and Flex is becoming more involved. It also has a very strong competitor in Silverlight 2.0 coming that will drive this market.

This is all great news if you are ready for it, if you are still coding actionscript2 (AS2) and paying no mind to Silverlight, Flex or at least actionscript3 (AS3) then you will see your market slowly start to fade as things are ramped up and more of a programming focus in the vector wars. If you are a flash coder and ignoring Silverlight, your solutions will suffer. If you are a silverlight coder or .NET coder and ignoring the Flex and AS3 rise your solutions will suffer. I have been playing in AS3, Flex and Silverlight for over a year on both now and they are an entirely new platform with great programming models. The competition puts focus on this market so it is a great time to be skilled in these areas.

Friday, January 11th, 2008
Interesting library for html to flash front end. Basically this runs off the HTML in your page to draw the same in Flash. I am sure there are great pitfalls in this but when controlled this could be very key in a flash add-on to CMS or CMS content. Might be useful for many things.

Wrapper is a cross-browser compliant HTML/CSS rendering engine written in ActionScript that sits on top of your standards compliant HTML page. Wrapper eliminates cross-browser issues and makes integrating ActionScript and HTML/CSS projects possible without needing to compile.

Wrappers strives to answer the most common problems web designers face without forcing them to learn too many new things. Most web sites can be created in HTML or CSS, then when you need to extend Wrapper’s capabilities you can either use JSON to call functions within ActionScript or you can load compiled plug-ins. Wrapper also has built in methods within CSS to load custom fonts, display elements as any shape, and fill them with linear or radial gradient background colors. ActionScript’s event model is also implemented within Wrapper’s HTML. Wrapper’s best features are the ones that you get for free because of how it is set up. It’s like getting all the great features of the Flash Player without needing to deal with compiling and being able to create your content the same way any HTML page would be created. Wrapper is fully accessible to the search engines and integrates well with any back-end technology.

Wrapper is currently released as a fully functional open source beta for Flash Player 9. Wrapper is set up as a pre-compiled plug-in but can easily be integrated into any Flex or AIR applications or even as an ActionScript framework for creation of compiled projects.

Documentation can be found in the wiki and news about this project can be found at http://motionandcolor.com

Examples can be found in the downloads http://code.google.com/p/htmlwrapper/downloads/list

Source is for everything is in svn http://code.google.com/p/htmlwrapper/source

I checked it out and it looks pretty well done, most of the time HTML to Flash or vice versa has to be a semi-controlled environment in terms of the markup. This and FlashML which is only AS2 I am using a partially converted to AS3 are part of my rotation for HTML<–>Flash content challenges for research right now. Usually most CMS in Flash has content loaded into the flash and then an alternate (sometimes similar) representation, here this is trying to merge the two which has it’s challenges.

Try out a demo (view source)

EDIT: Title dyslexia


Saturday, December 15th, 2007


haXe, one of the coolest and most versatile languages and platforms of today just released something to add to the already amazing feature set of haXe.  Nicolas Cannasse has posted about releasing haXe Video 1.0. I have been engulfed by Red5 for a few weeks and this could not have come at a better time for fun.

haxeVideo is an opensource video streaming server entirely written in haXe.

Features of haXe Video 1.0:

  • FLV streaming using RTMP protocol
  • Webcam and Microphone recording to FLV file
  • Live streaming for web conferencing
  • light and fast scalable server
  • only 50 KB of server source code : modify whatever you need !

Links

Wednesday, December 5th, 2007

Picnik is an excellent application that makes believers out of RIA skeptics made with Flash/Flex.   Today Picnik is now integrated with Flickr bringing user friendly photoshop essentially to the masses

This is a pretty interesting market direction as more photo companies like photobucket and flickr add to the competition for photo editing. As flash based uploads, photo editors, word processors, presentation creators, conference systems, office apps, planning apps and many others all over the web does this mean the services model is really here and RIA is not just a fad?

The model of software is changing, again. The one competitive edge that web applications, and specifically RIA apps have over desktop is that many desktop apps are bloated, have legacy evolution that caused heavy, busy interfaces and absolutely no abstraction of the possible user level in many cases. Web applications are for a broad audience so these applications will see many benefits in making simplified versions of applications for lower skilled users, and then for advanced users more features.

The model is entirely different. They also have the ability to embed in sites like flickr, photobucket, social networks, office product offerings, small business servers, etc.  They could even compete on these sites.  The install base will not be millions of client computers but networks and clusters of users at online places and services.

This was a dream with ASP applications and software as a service.  The problem was before RIA some of the limits of the web were preventing web apps from overtaking and beating out the features of desktop apps. RIAs and the web, web services, user controlled  environments are changing the way software is used. is   We aren’t entirely there yet but RIAs are reviewing their schematics, late at night, and are slowly taking over the software world and changing the model.  Like a ninja is Picnik.

Regarding Picnik, I can’t say enough about the simplicity, clean design that they have pulled off here.  The website and application have an identical brand.  The application is extremely responsive and acts like html sites would when it comes to text and forms. The integration of services, webcam, all filters in flash, on and on.  They really have a great team and it seems like they are both a great product team but also have the right quality. The new market is extremely agile, the paradigm is shifting.

Tuesday, December 4th, 2007

Only a year after release Papervision is getting a major update to 2.0.

Get it while it is hot from the SVN server on google code: http://papervision3d.googlecode.com/svn/trunk/branches/GreatWhite

Papervision3D, launched a year ago, really sparked the AS3 and flash/flex world and inspired every flash guru I know into working on this code. There have been some great tools made and some fwa’s won but it is only the beginning.

I am mostly looking forward to performance enhancements, ascollada integration, culling and Andy Zupko’s 2d bitmap effects on 3d.

New features:

  • Faster!
  • ShadeMaterials
  • Shaders
  • ASCollada (animation support)
  • Frustrum Culling
  • Multiple Viewports (3d editor anyone?)
  • Render to Scene
  • and more!

SVN server and branch:

We do indeed like to ride the racecars!

Tuesday, November 27th, 2007

Found via Zeh, this great bulk loading kit for AS3 from Arthur Debert.

AS3 Loaders are very useful, but when you have large projects there is always a pause and focus on loading scenarios and architecture needed for your loading scenarios, sometimes this can literally eat days and entirely change performance with wrong moves. BulkLoader is a well written kit from Authur Debert that makes loading scenarios or using BulkLoader as a base to your loading situations a great pluggable piece of code that has many excellent features.

Some of the calls like BulkLoader.getLoader(“main-site”).getContent(“bg”), are also very similar to Silverlight’s downloader object that can be queued like this. All in all a kit that is very useful that I have already put to work and will help teams standardize on bulk loading for those killer flash apps.

Creating a BulkLoader instance

// creates a BulkLoader instance with a name of "main-site", that can be used to retrieve items without having a reference to this instance

var loader : BulkLoader = new BulkLoader("main-site");

Add urls to load

// simplest case:
loader.add("logo.png");

// use an "id" so the item can be retrieved later without a reference to the url
loader.add("background.jpg", {id:"bg"});

// since the url by itself can't tell us what the filetype is, use the type property to let BulkLoader know what to do:
loader.add("/some-web-services?size=Large", {type:"image"});

// add an item that should be loaded first (higher priority):
loader.add("/data/config.xml", {priority:20});

// add a max try number (defaults to 3)
loader.add("/unreliable-web-services.xml", {maxTries:6});

// you can also use a URLRequest object , this will load from a POST request

var postRequest : URLRequest = new URLRequest("/save-prefs.php");
postRequest.method = "POST";

var postData : URLVariables = new URLVariables(myPostDataObject );
postRequest.data = postData;
loader.add(postRequest, {"id":"settings"});

// of course, all options can be combined:
loader.add("the-sound-webservices?name=maintrack", {"id":"soundtrack", type:"sound", maxTries:1, priority:100});

Listening for events

// simplest case:
loader.add("logo.png");

// use an "id" so the item can be retrieved later without a reference to the url
loader.add("background.jpg", {id:"bg"});

// since the url by itself can't tell us what the filetype is, use the type property to let BulkLoader know what to do:
loader.add("/some-web-services?size=Large", {type:"image"});

// add an item that should be loaded first (higher priority):
loader.add("/data/config.xml", {priority:20});

// add a max trie number (defaults to 3)
loader.add("/unreliable-web-services.xml", {maxTries:6});

// you can also use a URLRequest object , this will load from a POST request

var postRequest : URLRequest = new URLRequest("/save-prefs.php");
postRequest.method = "POST";

var postData : URLVariables = new URLVariables(myPostDataObject );
postRequest.data = postData;
loader.add(postRequest, {"id":"settings"});

// of course, all options can be combined:
loader.add("the-sound-webservices?name=maintrack", {"id":"soundtrack", type:"sound", maxTries:1, priority:100});

Listening for events:

// attaching events to all items:

// this will fire once all items have been loaded
loader.addEventListener(BulkLoader.COMPLETE, onAllLoaded);

// this will fire on progress for any item

// the event , BulkProgress is a subclass of ProgressEvent (with extra information)
loader.addEventListener(BulkLoader.PROGRESS, onAllProgress);

// this will fire if any item fails to load:

// the event is BulkErrorEvent and holds an array (errors) with all failed LoadingItem instances
loader.addEventListener(BulkLoader.ERROR, onAllError);

// you can also listen to events in individual items               

// this will fire as soon as the item registred with the id of "bg" is done loading (even if there are other items to load)
loader.get("bg").addEventListener(Event.COMPLETE,onBackgroundLoaded)

// this will only trigged if the config.xml loading fails:
loader.get("data/config.xml").addEventListener(BulkLoader.ERROR, onXMLFailed);

Starting the loading operation

BulkLoader will only begin loading once you call the start method:

loader.start();

Retrieving content


var theBgBitmap : Bitmap = loader.getContent("bg") as Bitmap;

// you don't need to keep a reference to the loader intance, you can get it by name:
var theBgBitmap : Bitmap = BulkLoader.getLoader("main-site").getContent("bg") as Bitmap;

// you can also use the conviniece methods to get a typed object:
var theBgBitmap : Bitmap = loader.getBitmap("bg");

// grab a BitmapData directly:
var theBgBitmap : Bitmap = loader.getBitmapData("bg");

Other convenience functions: getXML, getText, getNetStream, getSound, getMovieClip, getNetStreamMetaData.

You can retrieve an item using it’s id, it’s url as a String or as the URLRequest object (if the item was created with an URLRequest).

Arthur also has experience on Tweener so making simplified calls and minimalist code to make a library successful is very clear in the notes/goals on the project and the resulting code:

BulkLoader is a minimal library written in Actionscript 3 (AS3) that aims to make loading and managing complex loading requirements easier and faster. BulkLoader takes a more dynamic, less architecture heavy aproach. Few imports and making heavy use of AS3′s dynamic capabilities, BulkLoader has a one-liner feel that doesn’t get your way.

BulkLoader tries to hide the complexity of loading many data types in AS3, providing a unified interface for loading, accessing and events notification for different types of content.

This library is licensed under an open source MIT license.

Features:

  • Connection pooling.
  • Unified interface for different loading types.
  • Unified progress notification.
  • Events for individual items and as groups.
  • Priority
  • Stop and resuming individually as well as in bulk.
  • Cache managing.
  • Statistics about loading (latency, speed, average speed).
  • Multiple kinds on progress indication: ratio (items loaded / items to load), bytes , and weighted percentage.
  • Multiple number of retries.
  • Configurable logging.

Design goals:

  • Minimal imports.
  • Few method to learn.
  • Dynamic nature: items can be added by specifying a url as a String or a URLRequest .
  • Items can be assigned an identifier key to be used on retrieval.
  • Only one class to learn / use.

BulkLoader tries to gracefully handle progress notification in these use cases:

  • Few connections to open: bytes total can be used instantly.
  • Many connections opened: progress by ratio
  • Many connections opened for data of widely varying sizes: progress by weight.

Check out and download AS3 BulkLoader!

This is quite a contribution to the flash community and is a perfect candidate for the base of your loading assets projects and scenarios. Thanks Arthur!

Sunday, November 18th, 2007

Another great new 2D physics engine for AS3 has been released called Box2dFlashAS3 that is based on the excellent kit Box2D for C++. It has been a busy year for physics engines in AS3. FOAM was released this month, APE, the highly anticipated Motor Physics from polygonal labs and plenty more still I am sure.

The Box2dFlashAS3 version has some great demos available on the site that show, use the arrow keys to move to the different demos highlighted here.

  1. bridge
  2. ragdolls
  3. compound shapes
  4. rube goldberg / domino / tank tracks etc
  5. stacked boxes
  6. slider crank / piston
  7. pulleys
  8. gears

Box2DFlashAS3 is an open source port of Erin Catto’s powerful c++ physics library Box2D. Cycle through the demos to see some of the features.

Full source code for the engine and examples can be downloaded from the project’s sourceforge page found Here.

This kit is nice because it mimics Box2D for the crossover and ability of developers to use it in C++ and Flash AS3 moreso than other kits. It looks good and performs well except for a memory or FPS pause I get intermittently.  The demos are already inspiring many uses of the features highlighted for games and effects.