outaTiME

as3Query: jQuery port to ActionScript

Posted in actionscript, development, extension, jquery by outaTiME on January 15, 2008

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:

JAVASCRIPT:

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

as3Query Demo

(Via Ajaxian.)

Leave a Reply