チェンジセット 196

差分発生行の前後
無視リスト:
コミット日時:
2008/01/13 03:16:38 (1 年前)
コミッタ:
nitoyon
ログメッセージ:

--

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/as3Query/samples/Test.as

    r184 r196  
    77        import test.Circle; Circle; 
    88        import test.Circle2; Circle2; 
    9         import com.nitoyon.aquery.*; 
     9        import com.nitoyon.as3query.*; 
    1010         
    1111        public class Test extends Sprite 
  • as3/as3Query/samples/test/Circle.as

    r182 r196  
    11package test 
    22{ 
    3         import flash.display.*; 
    4  
    5         public class Circle extends Sprite 
     3        public class Circle extends Base 
    64        { 
    7                 public function Circle() 
     5                internal override function drawShape():void 
    86                { 
    9                         graphics.beginFill(0xff0000); 
    10                         graphics.drawCircle(25, 25, 25); 
    11                         graphics.endFill(); 
     7                        graphics.drawEllipse(0, 0, width, height); 
    128                } 
    139        } 
  • as3/as3Query/src/com/nitoyon/as3query/$.as

    r183 r196  
    1 package com.nitoyon.aquery { 
    2         public function $(... args):aQuery { 
    3                 return aQuery.create(args[0], args[1]); 
     1package com.nitoyon.as3query { 
     2        public function $(... args):as3Query { 
     3                return as3Query.create(args[0], args[1]); 
    44        } 
    55} 
  • as3/as3Query/src/com/nitoyon/as3query/Dom.as

    r186 r196  
    1 package com.nitoyon.aquery { 
     1package com.nitoyon.as3query { 
    22import flash.utils.getQualifiedClassName; 
     3import flash.utils.Dictionary; 
    34import flash.display.DisplayObject; 
    45import flash.display.DisplayObjectContainer; 
     
    910                        var c:DisplayObjectContainer = DisplayObjectContainer(node); 
    1011                        return c.numChildren ? c.getChildAt(0) : null; 
     12                } 
     13 
     14                return null; 
     15        } 
     16 
     17        static public function lastChild( node:DisplayObject):DisplayObject { 
     18                if ( node is DisplayObjectContainer ) { 
     19                        var c:DisplayObjectContainer = DisplayObjectContainer(node); 
     20                        return c.numChildren ? c.getChildAt(c.numChildren - 1) : null; 
    1121                } 
    1222 
     
    2636        } 
    2737 
     38        static internal function getProperty( node:DisplayObject, prop:String ):Object { 
     39                return /firstChild|nextSibling|previousSibling/.test(prop) ? Dom[prop]( node ) : 
     40                        node.hasOwnProperty(prop) ? node[prop] : null; 
     41        } 
     42 
    2843        static public function nodeName( node:DisplayObject ):String { 
    2944                return getQualifiedClassName( node ).replace(/.*::/, ""); 
     
    3449        } 
    3550 
     51        static private var idList:Dictionary = new Dictionary( false ); 
     52 
     53        static internal function registerId( id:String, obj:DisplayObject ):void { 
     54                idList[ id ] = obj; 
     55        } 
     56 
     57        static internal function unregisterId( id:String ):void { 
     58                if( idList.hasOwnProperty( id )) 
     59                        delete idList[ id ]; 
     60        } 
     61 
     62        static public function getElementById( id:String ):DisplayObject { 
     63                return idList[ id ]; 
     64        } 
     65 
    3666        static public function getElementsByTagName( tagName:String, parent:DisplayObject = null, arr:Array = null ):Array { 
    37                 parent = parent || aQuery.stage; 
     67                parent = parent || as3Query.stage; 
    3868                arr = arr || []; 
    3969 
     
    4373                                var n:DisplayObject = p.getChildAt( i ); 
    4474 
    45                                 if ( nodeNameCmp( n, tagName ) ) 
     75                                if ( tagName == "*" || nodeNameCmp( n, tagName ) ) 
    4676                                        arr.push( n ); 
    4777                                if ( n is DisplayObjectContainer) 
     
    5282                return arr; 
    5383        } 
    54  
    55         static public function getProperty( node:DisplayObject, prop:String ):Object { 
    56                 return /firstChild|nextSibling|previousSibling/.test(prop) ? Dom[prop]( node ) : 
    57                         node.hasOwnProperty(prop) ? node[prop] : null; 
    58         } 
    5984} 
    6085} 
  • as3/as3Query/src/com/nitoyon/as3query/as3Query.as

    r186 r196  
    1 package com.nitoyon.aquery { 
     1package com.nitoyon.as3query { 
    22import flash.utils.Proxy; 
    33import flash.utils.flash_proxy; 
    44import flash.utils.getDefinitionByName; 
    55import flash.utils.getQualifiedClassName; 
    6 import flash.utils.ByteArray; 
    76import flash.utils.Dictionary; 
    87import flash.events.Event; 
    98import flash.net.registerClassAlias; 
    10 import flash.media.SoundTransform; 
    11 import flash.geom.Transform; 
    129import flash.display.DisplayObject; 
    1310import flash.display.DisplayObjectContainer; 
    1411import flash.display.Stage; 
    15 import com.nitoyon.aquery.aQueryFx; 
    16  
    17 public class aQuery extends Proxy { 
     12 
     13public class as3Query extends Proxy { 
    1814 
    1915        //-------------------------------------------------------------------------- 
     
    2521        private static var quickExpr:RegExp = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; 
    2622 
    27         public function aQuery(array:Array) { 
     23        public function as3Query(array:Array) { 
    2824                setArray( array ); 
    2925        } 
     
    4137        } 
    4238 
    43         static public function create(... args):aQuery { 
     39        static public function create(... args):as3Query { 
    4440                var a:Object = args[0] || _stage; 
    4541                var c:Object = args[1]; 
     
    5046                                // HANDLE $(html) -> $(array) 
    5147                                if( m[ 1 ] ) { 
    52                                         a = aQuery.clean( [ m[1] ] ); 
     48                                        a = as3Query.clean( [ m[1] ] ); 
    5349                                // HANDLE: $("#id") 
    5450                                } else { 
    55                                         throw new Error(); 
     51                                        var tmp:DisplayObject = Dom.getElementById( m[3] ); 
     52                                        if ( tmp ){ 
     53                                                return new as3Query( [ tmp ] ); 
     54                                        } 
     55                                        else 
     56                                                a = []; 
    5657                                } 
    5758                        // HANDLE: $(expr) 
     
    6162                // HANDLE: $(function) 
    6263                // Shortcut for ??? 
    63                 } else if( aQuery.isFunction(a) ) { 
     64                } else if( as3Query.isFunction(a) ) { 
    6465                        throw new Error(); 
    6566                // HANDLE: $(XML) 
    6667                } else if( a is XML || a is XMLList ) { 
    67                         a = aQuery.clean( [ a ]); 
     68                        a = as3Query.clean( [ a ]); 
    6869                // HANDLE: $(Class) 
    6970                } else if( a is Class ) { 
     
    7273 
    7374                if ( a is Stage && !_stage) 
    74                         aQuery.stage = a as Stage; 
    75  
    76                 return new aQuery( 
     75                        as3Query.stage = a as Stage; 
     76 
     77                return new as3Query( 
    7778                        // HANDLE: $(array) 
    7879                        a is Array ? a as Array : 
    7980 
    8081                        // HANDLE: $(arraylike) 
    81                         a.hasOwnProperty("length") && a.hasOwnProperty(0) ? aQuery.makeArray(a) : 
     82                        a.hasOwnProperty("length") && a.hasOwnProperty(0) ? as3Query.makeArray(a) : 
    8283 
    8384                        // HANDLE: $(*) 
     
    100101 
    101102        public function toString():String { 
    102                 return "[aQuery " + _array.toString() + "]"; 
     103                return "[as3Query " + _array.toString() + "]"; 
    103104        } 
    104105 
     
    126127        public function getArray():Array { 
    127128                // Return a 'clean' array 
    128                 return aQuery.makeArray( this ); 
    129         } 
    130  
    131         private var prevObject:aQuery = null; 
    132         private function pushStack( a:Object ):aQuery { 
    133                 var ret:aQuery = aQuery.create(a); 
     129                return as3Query.makeArray( this ); 
     130        } 
     131 
     132        private var prevObject:as3Query = null; 
     133        private function pushStack( a:Object ):as3Query { 
     134                var ret:as3Query = as3Query.create(a); 
    134135                ret.prevObject = this; 
    135136                return ret; 
    136137        } 
    137138 
    138         private function setArray(a:Array):aQuery { 
     139        private function setArray(a:Array):as3Query { 
    139140                _array.push.apply(_array, a); 
    140141                return this; 
    141142        } 
    142143 
    143         public function each(fn:Function, args:Object = null):aQuery { 
    144                 return aQuery.each( this, fn, args ) as aQuery; 
     144        public function each(fn:Function, args:Object = null):as3Query { 
     145                return as3Query.each( this, fn, args ) as as3Query; 
    145146        } 
    146147 
     
    155156                if ( key is String ) 
    156157                        if ( value == null ) 
    157                                 return length && aQuery[type || "attr"](this[0], key) || undefined; 
     158                                return length && as3Query[type || "attr"](this[0], key) || undefined; 
    158159                        else { 
    159160                                obj = {}; 
     
    165166                        // Set all the styles 
    166167                        for ( var prop:String in obj ) 
    167                                 aQuery.attr( 
     168                                as3Query.attr( 
    168169                                        this, 
    169                                         prop, aQuery.prop(this, obj[prop], type, index, prop) 
     170                                        prop, as3Query.prop(this, obj[prop], type, index, prop) 
    170171                                ); 
    171172                }); 
     
    186187 
    187188                var t:String = ""; 
    188                 aQuery.each( e || this, function(index:int, val:Object):void { 
     189                as3Query.each( e || this, function(index:int, val:Object):void { 
    189190                        if( this.hasOwnProperty("text") ) { 
    190191                                t += this["text"].toString(); 
     
    194195        } 
    195196 
    196         public function wrapAll(html:String):aQuery { 
     197        public function wrapAll(html:String):as3Query { 
    197198                if ( this[0] ) 
    198199                        // The elements to wrap the target around 
    199                         aQuery.create(html, this[0].stage) 
     200                        as3Query.create(html, this[0].stage) 
    200201                                .clone() 
    201202                                .insertBefore(this[0]) 
     
    211212        } 
    212213 
    213         public function wrapInner(html:String):aQuery { 
     214        public function wrapInner(html:String):as3Query { 
    214215                return each(function(...args):void{ 
    215                         aQuery.create(this).contents().wrapAll(html); 
    216                 }); 
    217         } 
    218  
    219         public function wrap(html:String):aQuery { 
     216                        as3Query.create(this).contents().wrapAll(html); 
     217                }); 
     218        } 
     219 
     220        public function wrap(html:String):as3Query { 
    220221                return each(function(...args):void{ 
    221                         aQuery.create(this).wrapAll(html); 
     222                        as3Query.create(this).wrapAll(html); 
    222223                }); 
    223224        } 
     
    239240        }; 
    240241 
    241         public function parent( filter:String = null ):aQuery { 
     242        public function parent( filter:String = null ):as3Query { 
    242243                return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 
    243244                        return a.parent; 
     
    245246        } 
    246247 
    247         public function parents( filter:String = null ):aQuery { 
     248        public function parents( filter:String = null ):as3Query { 
    248249                return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 
    249                         return aQuery.dir(a, 'parent'); 
    250                 }); 
    251         } 
    252  
    253         public function next( filter:String = null ):aQuery { 
     250                        return as3Query.dir(a, 'parent'); 
     251                }); 
     252        } 
     253 
     254        public function next( filter:String = null ):as3Query { 
    254255                return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 
    255                         return aQuery.nth(a, 2, 'nextSibling'); 
    256                 }); 
    257         } 
    258  
    259         public function prev( filter:String = null ):aQuery { 
     256                        return as3Query.nth(a, 2, 'nextSibling'); 
     257                }); 
     258        } 
     259 
     260        public function prev( filter:String = null ):as3Query { 
    260261                return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 
    261                         return aQuery.nth(a, 2, 'previousSibling'); 
    262                 }); 
    263         } 
    264  
    265         public function nextAll( filter:String = null ):aQuery { 
     262                        return as3Query.nth(a, 2, 'previousSibling'); 
     263                }); 
     264        } 
     265 
     266        public function nextAll( filter:String = null ):as3Query { 
    266267                return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 
    267                         return aQuery.dir(a, 'nextSibling'); 
    268                 }); 
    269         } 
    270  
    271         public function prevAll( filter:String = null ):aQuery { 
     268                        return as3Query.dir(a, 'nextSibling'); 
     269                }); 
     270        } 
     271 
     272        public function prevAll( filter:String = null ):as3Query { 
    272273                return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 
    273                         return aQuery.dir(a, 'previousSibling'); 
    274                 }); 
    275         } 
    276  
    277         public function siblings( filter:String = null ):aQuery { 
     274                        return as3Query.dir(a, 'previousSibling'); 
     275                }); 
     276        } 
     277 
     278        public function siblings( filter:String = null ):as3Query { 
    278279                return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 
    279                         return aQuery.sibling(a.parent.getChildAt(0), a); 
    280                 }); 
    281         } 
    282  
    283         public function children( filter:String = null ):aQuery { 
     280                        return as3Query.sibling(a.parent.getChildAt(0), a); 
     281                }); 
     282        } 
     283 
     284        public function children( filter:String = null ):as3Query { 
    284285                return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 
    285                         return aQuery.sibling(Dom.firstChild(a)); 
    286                 }); 
    287         } 
    288  
    289         public function contents( filter:String = null ):aQuery { 
     286                        return as3Query.sibling(Dom.firstChild(a)); 
     287                }); 
     288        } 
     289 
     290        public function contents( filter:String = null ):as3Query { 
    290291                return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 
    291292                        return a.root; 
     
    293294        } 
    294295 
    295         private function mapAndPush( a:String, fn:Function ):aQuery { 
    296                 var ret:Array = aQuery.map( this, fn ); 
     296        private function mapAndPush( a:String, fn:Function ):as3Query { 
     297                var ret:Array = as3Query.map( this, fn ); 
    297298                if ( a ) 
    298                         ret = aQuery.multiFilter(a, ret.getArray()); 
    299                 return pushStack(aQuery.unique(ret)); 
    300         } 
    301  
    302         public function append(... args):aQuery { 
     299                        ret = as3Query.multiFilter(a, ret.getArray()); 
     300                return pushStack(as3Query.unique(ret)); 
     301        } 
     302 
     303        public function append(... args):as3Query { 
    303304                return domManip(args, true, 1, function(a:DisplayObject):void{ 
    304305                        this.addChild( a ); 
     
    306307        } 
    307308 
    308         public function prepend(... args):aQuery { 
     309        public function prepend(... args):as3Query { 
    309310                return domManip(args, true, -1, function(a:DisplayObject):void{ 
    310311                        this.addChildAt( a, 0 ); 
     
    312313        } 
    313314         
    314         public function before(... args):aQuery { 
     315        public function before(... args):as3Query { 
    315316                return this.domManip(args, false, 1, function(a:DisplayObject):void{ 
    316317                        this.parent.addChildAt( a, this.parent.getChildIndex( this ) ); 
     
    318319        } 
    319320 
    320         public function after(... args):aQuery { 
     321        public function after(... args):as3Query { 
    321322                return this.domManip(args, false, -1, function(a:DisplayObject):void{ 
    322323                        this.parent.addChildAt( a, this.parent.getChildIndex( this ) + 1 ); 
     
    324325        } 
    325326 
    326         public function end():aQuery { 
    327                 return prevObject || aQuery.create([]); 
    328         } 
    329  
    330         public function find(t:*):aQuery { 
    331                 var data:Array = aQuery.map(this, function(a:DisplayObject, ...args):Array{ return aQuery.find(t,a); }); 
     327        public function end():as3Query { 
     328                return prevObject || as3Query.create([]); 
     329        } 
     330 
     331        public function find(t:*):as3Query { 
     332                var data:Array = as3Query.map(this, function(a:DisplayObject, ...args):Array{ return as3Query.find(t,a); }); 
    332333                return pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ? 
    333                         aQuery.unique( data ) : data ); 
    334         } 
    335  
    336         public function clone(events:Boolean = false):aQuery { 
     334                        as3Query.unique( data ) : data ); 
     335        } 
     336 
     337        public function clone(events:Boolean = false):as3Query { 
    337338                // Do the clone 
    338                 var ret:aQuery = map(function(...args):DisplayObject{ 
    339                         return aQuery.cloneObject(this) as DisplayObject; 
     339                var ret:as3Query = map(function(...args):DisplayObject{ 
     340                        return as3Query.cloneObject(this) as DisplayObject; 
    340341                }); 
    341342                 
    342343                if (events === true) { 
    343                         var clone:aQuery = ret.find("*").andSelf(); 
     344                        var clone:as3Query = ret.find("*").andSelf(); 
    344345 
    345346                        find("*").andSelf().each(function(i:int, ...args):void { 
    346                                 var events:Object = aQuery.data(this, "events"); 
     347                                var events:Object = as3Query.data(this, "events"); 
    347348                                for ( var type:String in events ) 
    348349                                        for ( var handler:Object in events[type] ) 
    349                                                 aQueryEvent.add(clone[i], type, events[type][handler], events[type][handler].data); 
     350                                                as3QueryEvent.add(clone[i], type, events[type][handler], events[type][handler].data); 
    350351                        }); 
    351352                } 
     
    355356        } 
    356357 
    357         public function filter(t:Object):aQuery { 
     358        public function filter(t:Object):as3Query { 
    358359                return pushStack( 
    359                         aQuery.isFunction( t ) && 
    360                         aQuery.grep(this, function(el:Object, index:int):Object{ 
     360                        as3Query.isFunction( t ) && 
     361                        as3Query.grep(this, function(el:Object, index:int):Object{ 
    361362                                return t.apply(el, [index]); 
    362363                        }) || 
    363364 
    364                         aQuery.multiFilter(t.toString(),_array) ); 
    365         } 
    366  
    367         public function not(t:Object):aQuery { 
     365                        as3Query.multiFilter(t.toString(),_array) ); 
     366        } 
     367 
     368        public function not(t:Object):as3Query { 
    368369                return pushStack( 
    369370                        t is String && 
    370                         aQuery.multiFilter(t as String, _array, true) || 
    371  
    372                         aQuery.grep(this, function(a:Object):Boolean { 
    373                                 return ( t is Array ? aQuery.inArray( a, t as Array ) < 0 :  
    374                                          t is aQuery ? aQuery.inArray( a, t._array ) < 0 : a != t); 
     371                        as3Query.multiFilter(t as String, _array, true) || 
     372 
     373                        as3Query.grep(this, function(a:Object):Boolean { 
     374                                return ( t is Array ? as3Query.inArray( a, t as Array ) < 0 :  
     375                                         t is as3Query ? as3Query.inArray( a, t._array ) < 0 : a != t); 
    375376                        }) 
    376377                ); 
    377378        } 
    378379 
    379         public function add(t:Object):aQuery { 
    380                 return pushStack( aQuery.merge( 
     380        public function add(t:Object):as3Query { 
     381                return pushStack( as3Query.merge( 
    381382                        get() as Array, 
    382383                        t is String ? 
    383                                 aQuery(t).get() as Array : 
     384                                as3Query(t).get() as Array : 
    384385                                t is Array ? t as Array :  
    385                                 t is aQuery ? t.get() as Array : [t] ) 
     386                                t is as3Query ? t.get() as Array : [t] ) 
    386387                ); 
    387388        } 
    388389 
    389390        public function _is(expr:String):Boolean { 
    390                 return expr ? aQuery.multiFilter(expr, _array).length > 0 : false; 
     391                return expr ? as3Query.multiFilter(expr, _array).length > 0 : false; 
    391392        } 
    392393 
     
    399400                        if ( this.length ) { 
    400401                                var elem = this[0]; 
    401                        
     402                       
    402403                                // We need to handle select boxes special 
    403                                 if ( aQuery.nodeName(elem, "select") ) { 
     404                                if ( as3Query.nodeName(elem, "select") ) { 
    404405                                        var index = elem.selectedIndex, 
    405406                                                a = [], 
     
    416417                                                if ( option.selected ) { 
    417418                                                        // Get the specifc value for the option 
    418                                                         var val = aQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value; 
     419                                                        var val = as3Query.browser.msie && !option.attributes["value"].specified ? option.text : option.value; 
    419420                                                         
    420421                                                        // We don't need an array for one selects 
     
    436437                        return this.each(function(){ 
    437438                                if ( val.constructor == Array && /radio|checkbox/.test(this.type) ) 
    438                                         this.checked = (aQuery.inArray(this.value, val) >= 0 || 
    439                                                 aQuery.inArray(this.name, val) >= 0); 
    440                                 else if ( aQuery.nodeName(this, "select") ) { 
     439                                        this.checked = (as3Query.inArray(this.value, val) >= 0 || 
     440                                                as3Query.inArray(this.name, val) >= 0); 
     441                                else if ( as3Query.nodeName(this, "select") ) { 
    441442                                        var tmp = val.constructor == Array ? val : [val]; 
    442443 
    443                                         aQuery("option", this).each(function(){ 
    444                                                 this.selected = (aQuery.inArray(this.value, tmp) >= 0 || 
    445                                                 aQuery.inArray(this.text, tmp) >= 0); 
     444                                        as3Query("option", this).each(function(){ 
     445                                                this.selected = (as3Query.inArray(this.value, tmp) >= 0 || 
     446                                                as3Query.inArray(this.text, tmp) >= 0); 
    446447                                        }); 
    447448 
     
    463464        } 
    464465 
    465         public function replaceWith( val:Object ):aQuery { 
     466        public function replaceWith( val:Object ):as3Query { 
    466467                return after( val ).remove(); 
    467468        } 
    468469 
    469         public function slice(...args):aQuery { 
     470        public function slice(...args):as3Query { 
    470471                return pushStack( _array.slice.apply( this, args ) ); 
    471472        } 
    472473 
    473         public function map(fn:Function):aQuery { 
    474                 return pushStack(aQuery.map( this, function(elem:Object,i:int):Object{ 
     474        public function map(fn:Function):as3Query { 
     475                return pushStack(as3Query.map( this, function(elem:Object,i:int):Object{ 
    475476                        return fn.call( elem, i, elem ); 
    476477                })); 
    477478        } 
    478479 
    479         public function andSelf():aQuery { 
     480        public function andSelf():as3Query { 
    480481                return add( prevObject ); 
    481482        } 
    482483 
    483         public function domManip(args:Array, table:Boolean, dir:int, fn:Function):aQuery { 
    484                 // this -> Sprite 
    485                 // args -> aQuery ( "TextField" ) 
     484        public function domManip(args:Array, table:Boolean, dir:int, fn:Function):as3Query { 
    486485                var clone:Boolean = length > 1, a:Array;  
    487486 
    488487                return each(function():void{ 
    489488                        if ( !a ) { 
    490                                 a = aQuery.clean(args); 
     489                                a = as3Query.clean(args); 
    491490                                if ( dir < 0 ) 
    492491                                        a.reverse(); 
    493492                        } 
    494493 
    495                         var obj:aQuery = this; 
    496  
    497                         aQuery.each( a, function():void{ 
    498                                 fn.apply( obj, [ clone ? aQuery.cloneObject(this) : this ] ); 
     494                        var obj:as3Query = this; 
     495 
     496                        as3Query.each( a, function():void{ 
     497                                fn.apply( obj, [ clone ? as3Query.cloneObject(this) : this ] ); 
    499498                        }); 
    500                 }) as aQuery; 
     499                }) as as3Query; 
    501500        } 
    502501 
     
    514513 
    515514        public function extend( ...args ):Object { 
    516                 return aQuery.extend.apply( null, args ); 
     515                return as3Query.extend.apply( null, args ); 
    517516        } 
    518517 
     
    540539                                        // Recurse if we're merging object values 
    541540                                        if ( deep && prop[i] is Object && target[i] ) 
    542                                                 aQuery.extend( target[i], prop[i] ); 
     541                                                as3Query.extend( target[i], prop[i] ); 
    543542 
    544543                                        // Don't bring in undefined values 
     
    551550        } 
    552551 
    553         private static var expando:String = "aQuery" + (new Date()).getTime(); 
     552        private static var expando:String = "as3Query" + (new Date()).getTime(); 
    554553 
    555554        static public function isFunction(fn:Object):Boolean 
     
    568567        } 
    569568 
    570         static private var cache:Dictionary = new Dictionary(); 
     569        static private var cache:Dictionary = new Dictionary( false ); 
    571570 
    572571        static internal function data( elem:Object, name:String = "", data:Object = null ):Object { 
     
    578577                // Prevent overriding the named cache with undefined values 
    579578                if ( data != null ) 
    580                         aQuery.cache[ elem ][ name ] = data; 
     579                        as3Query.cache[ elem ][ name ] = data; 
    581580                 
    582581                // Return the named cache data 
     
    587586                // If we want to remove a specific section of the element's data 
    588587                if ( name != "" ) { 
    589                         if ( aQuery.cache[ elem ] ) { 
     588                        if ( as3Query.cache[ elem ] ) { 
    590589                                // Remove the section of cache data 
    591                                 delete aQuery.cache[ elem ][ name ]; 
     590                                delete as3Query.cache[ elem ][ name ]; 
    592591 
    593592                                // If we've removed all the data, remove the element's cache 
    594593                                name = ""; 
    595                                 for ( name in aQuery.cache[ elem ] ) break; 
     594                                for ( name in as3Query.cache[ elem ] ) break; 
    596595                                if ( name != "" ) 
    597                                         aQuery.removeData( elem ); 
     596                                        as3Query.removeData( elem ); 
    598597                        } 
    599598 
     
    601600                } else { 
    602601                        // Clean up the element expando 
    603                         delete aQuery.cache[ elem ]; 
     602                        delete as3Query.cache[ elem ]; 
    604603                } 
    605604        } 
     
    633632        static public function prop(elem:Object, value:Object, type:Object, index:int, prop:Object):Object { 
    634633                // Handle executable functions 
    635                 if(aQuery.isFunction(value)) 
     634                if(as3Query.isFunction(value)) 
    636635                        value = Function(value).call(elem, [index]); 
    637636 
     
    643642                // internal only, use addClass("class") 
    644643                add: function( elem, c ){ 
    645                         aQuery.each( (c || "").split(/\s+/), function(i, cur){ 
    646                                 if ( !aQuery.className.has( elem.className, cur ) ) 
     644                        as3Query.each( (c || "").split(/\s+/), function(i, cur){ 
     645                                if ( !as3Query.className.has( elem.className, cur ) ) 
    647646                                        elem.className += ( elem.className ? " " : "" ) + cur; 
    648647                        }); 
     
    652651                remove: function( elem, c ){ 
    653652                        elem.className = c != undefined ? 
    654                                 aQuery.grep( elem.className.split(/\s+/), function(cur){ 
    655                                         return !aQuery.className.has( c, cur );        
     653                                as3Query.grep( elem.className.split(/\s+/), function(cur){ 
     654                                        return !as3Query.className.has( c, cur );      
    656655                                }).join(" ") : ""; 
    657656                }, 
     
    659658                // internal only, use is(".class") 
    660659                has: function( t, c ) { 
    661                         return aQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1; 
     660                        return as3Query.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1; 
    662661                } 
    663662        }, 
     
    677676                        var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"]; 
    678677 
    679                         aQuery.each( d, function(){ 
     678                        as3Query.each( d, function(){ 
    680679                                old["padding" + this] = 0; 
    681680                                old["border" + this + "Width"] = 0; 
    682681                        }); 
    683682 
    684                         aQuery.swap( e, old, function() { 
    685                                 if ( aQuery(e).is(':visible') ) { 
     683                        as3Query.swap( e, old, function() { 
     684                                if ( as3Query(e).is(':visible') ) { 
    686685                                        oHeight = e.offsetHeight; 
    687686                                        oWidth = e.offsetWidth; 
    688687                                } else { 
    689                                         e = aQuery(e.cloneNode(true)) 
     688                                        e = as3Query(e.cloneNode(true)) 
    690689                          &nb