Tuesday, January 15th, 2008

as3Query: jQuery port to ActionScript

Category: Adobe, Flash, JavaScript, jQuery

First we see the new jQuery 1.2.2 release, and now “nitoyon” has ported jQuery to ActionScript 3.0 creating as3Query.

This port has everything bar the Ajax features, and it comes with a set of demos:


  1. function animate(f:Boolean):void {
  2.     // Select 'RoundRect' elements using CSS selector
  3.     $("RoundRect:" + (f ? "odd" : "even"))
  4.         .addTween({
  5.             rotation: 90,
  6.             scaleX: 0.5,
  7.             scaleY: 0.5,
  8.             time: 0.6,
  9.             delay: 0.3,
  10.             transition: "easeOutCubic"
  11.         })
  12.         .addTween({
  13.             scaleX: 1,
  14.             scaleY: 1,
  15.             time: 0.5,
  16.             delay: 0.9,
  17.             transition: "easeOutElastic",
  18.             onComplete: function():void {
  19.                 // restore the rotation and call again.
  20.                 this.rotation = 0;
  21.                 animate(!f);
  22.             }
  23.         });
  24. }

as3Query Demo

Posted by Dion Almaer at 8:57 am

3.9 rating from 37 votes


Comments feed TrackBack URI

I did a very similar thing lat year ago:

Comment by Peter Goodman — January 15, 2008

Where flash is concerned, it’s worth delving into class oriented programming… I use prototype and jQuery or own written mini libs in all my xhtml projects, but more out of nescessity then choice. I used to do the same in flash, till I discovered the power of classes. That said, I must say libraries like these can be quite a boon for quick and dirty projects, for big long term projects, use classes, you’ll do yourself (and possibly other parties that will maintain the project) a big favour.

Comment by NetBen — January 16, 2008

does anyone have or know of a place with examples of using the as3query library in conjunction with an mxml page? i would like an example that maybe has some mxml elements, and shows jquery like event binding-

Comment by chrismarx — September 23, 2008

Leave a comment

You must be logged in to post a comment.