チェンジセット 196
- コミット日時:
- 2008/01/13 03:16:38 (1 年前)
- ファイル:
-
- as3/aQuery/samples/test/Circle2.as (削除)
- as3/as3Query (移動) (as3/aQuery から 移動)
- as3/as3Query/samples (コピー) (as3/aQuery/samples から コピー)
- as3/as3Query/samples/CssSelectorDemo.as (追加)
- as3/as3Query/samples/CssSelectorDemo.swf (追加)
- as3/as3Query/samples/Test.as (更新) (1 diff)
- as3/as3Query/samples/test/Base.as (追加)
- as3/as3Query/samples/test/Circle.as (更新) (1 diff)
- as3/as3Query/samples/test/Polygon.as (追加)
- as3/as3Query/samples/test/Rect.as (追加)
- as3/as3Query/samples/test/RoundRect.as (追加)
- as3/as3Query/samples/test/Square.as (追加)
- as3/as3Query/samples/test/Star.as (追加)
- as3/as3Query/src (コピー) (as3/aQuery/src から コピー)
- as3/as3Query/src/com/nitoyon/as3query (移動) (as3/aQuery/src/com/nitoyon/aquery から 移動)
- as3/as3Query/src/com/nitoyon/as3query/$.as (コピー) (as3/aQuery/src/com/nitoyon/aquery/$.as から コピー) (1 diff)
- as3/as3Query/src/com/nitoyon/as3query/Dom.as (コピー) (as3/aQuery/src/com/nitoyon/aquery/Dom.as から コピー) (6 diffs)
- as3/as3Query/src/com/nitoyon/as3query/as3Query.as (移動) (as3/aQuery/src/com/nitoyon/aquery/aQuery.as から 移動) (82 diffs)
- as3/as3Query/src/com/nitoyon/as3query/as3QueryEvent.as (移動) (as3/aQuery/src/com/nitoyon/aquery/aQueryEvent.as から 移動) (11 diffs)
- as3/as3Query/src/com/nitoyon/as3query/as3QueryFx.as (移動) (as3/aQuery/src/com/nitoyon/aquery/aQueryFx.as から 移動) (11 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/as3Query/samples/Test.as
r184 r196 7 7 import test.Circle; Circle; 8 8 import test.Circle2; Circle2; 9 import com.nitoyon.a query.*;9 import com.nitoyon.as3query.*; 10 10 11 11 public class Test extends Sprite as3/as3Query/samples/test/Circle.as
r182 r196 1 1 package test 2 2 { 3 import flash.display.*; 4 5 public class Circle extends Sprite 3 public class Circle extends Base 6 4 { 7 public function Circle()5 internal override function drawShape():void 8 6 { 9 graphics.beginFill(0xff0000); 10 graphics.drawCircle(25, 25, 25); 11 graphics.endFill(); 7 graphics.drawEllipse(0, 0, width, height); 12 8 } 13 9 } as3/as3Query/src/com/nitoyon/as3query/$.as
r183 r196 1 package com.nitoyon.a query {2 public function $(... args):a Query {3 return a Query.create(args[0], args[1]);1 package com.nitoyon.as3query { 2 public function $(... args):as3Query { 3 return as3Query.create(args[0], args[1]); 4 4 } 5 5 } as3/as3Query/src/com/nitoyon/as3query/Dom.as
r186 r196 1 package com.nitoyon.a query {1 package com.nitoyon.as3query { 2 2 import flash.utils.getQualifiedClassName; 3 import flash.utils.Dictionary; 3 4 import flash.display.DisplayObject; 4 5 import flash.display.DisplayObjectContainer; … … 9 10 var c:DisplayObjectContainer = DisplayObjectContainer(node); 10 11 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; 11 21 } 12 22 … … 26 36 } 27 37 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 28 43 static public function nodeName( node:DisplayObject ):String { 29 44 return getQualifiedClassName( node ).replace(/.*::/, ""); … … 34 49 } 35 50 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 36 66 static public function getElementsByTagName( tagName:String, parent:DisplayObject = null, arr:Array = null ):Array { 37 parent = parent || a Query.stage;67 parent = parent || as3Query.stage; 38 68 arr = arr || []; 39 69 … … 43 73 var n:DisplayObject = p.getChildAt( i ); 44 74 45 if ( nodeNameCmp( n, tagName ) )75 if ( tagName == "*" || nodeNameCmp( n, tagName ) ) 46 76 arr.push( n ); 47 77 if ( n is DisplayObjectContainer) … … 52 82 return arr; 53 83 } 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 }59 84 } 60 85 } as3/as3Query/src/com/nitoyon/as3query/as3Query.as
r186 r196 1 package com.nitoyon.a query {1 package com.nitoyon.as3query { 2 2 import flash.utils.Proxy; 3 3 import flash.utils.flash_proxy; 4 4 import flash.utils.getDefinitionByName; 5 5 import flash.utils.getQualifiedClassName; 6 import flash.utils.ByteArray;7 6 import flash.utils.Dictionary; 8 7 import flash.events.Event; 9 8 import flash.net.registerClassAlias; 10 import flash.media.SoundTransform;11 import flash.geom.Transform;12 9 import flash.display.DisplayObject; 13 10 import flash.display.DisplayObjectContainer; 14 11 import flash.display.Stage; 15 import com.nitoyon.aquery.aQueryFx; 16 17 public class aQuery extends Proxy { 12 13 public class as3Query extends Proxy { 18 14 19 15 //-------------------------------------------------------------------------- … … 25 21 private static var quickExpr:RegExp = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; 26 22 27 public function a Query(array:Array) {23 public function as3Query(array:Array) { 28 24 setArray( array ); 29 25 } … … 41 37 } 42 38 43 static public function create(... args):a Query {39 static public function create(... args):as3Query { 44 40 var a:Object = args[0] || _stage; 45 41 var c:Object = args[1]; … … 50 46 // HANDLE $(html) -> $(array) 51 47 if( m[ 1 ] ) { 52 a = a Query.clean( [ m[1] ] );48 a = as3Query.clean( [ m[1] ] ); 53 49 // HANDLE: $("#id") 54 50 } 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 = []; 56 57 } 57 58 // HANDLE: $(expr) … … 61 62 // HANDLE: $(function) 62 63 // Shortcut for ??? 63 } else if( a Query.isFunction(a) ) {64 } else if( as3Query.isFunction(a) ) { 64 65 throw new Error(); 65 66 // HANDLE: $(XML) 66 67 } else if( a is XML || a is XMLList ) { 67 a = a Query.clean( [ a ]);68 a = as3Query.clean( [ a ]); 68 69 // HANDLE: $(Class) 69 70 } else if( a is Class ) { … … 72 73 73 74 if ( a is Stage && !_stage) 74 a Query.stage = a as Stage;75 76 return new a Query(75 as3Query.stage = a as Stage; 76 77 return new as3Query( 77 78 // HANDLE: $(array) 78 79 a is Array ? a as Array : 79 80 80 81 // HANDLE: $(arraylike) 81 a.hasOwnProperty("length") && a.hasOwnProperty(0) ? a Query.makeArray(a) :82 a.hasOwnProperty("length") && a.hasOwnProperty(0) ? as3Query.makeArray(a) : 82 83 83 84 // HANDLE: $(*) … … 100 101 101 102 public function toString():String { 102 return "[a Query " + _array.toString() + "]";103 return "[as3Query " + _array.toString() + "]"; 103 104 } 104 105 … … 126 127 public function getArray():Array { 127 128 // Return a 'clean' array 128 return a Query.makeArray( this );129 } 130 131 private var prevObject:a Query = null;132 private function pushStack( a:Object ):a Query {133 var ret:a Query = 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); 134 135 ret.prevObject = this; 135 136 return ret; 136 137 } 137 138 138 private function setArray(a:Array):a Query {139 private function setArray(a:Array):as3Query { 139 140 _array.push.apply(_array, a); 140 141 return this; 141 142 } 142 143 143 public function each(fn:Function, args:Object = null):a Query {144 return a Query.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; 145 146 } 146 147 … … 155 156 if ( key is String ) 156 157 if ( value == null ) 157 return length && a Query[type || "attr"](this[0], key) || undefined;158 return length && as3Query[type || "attr"](this[0], key) || undefined; 158 159 else { 159 160 obj = {}; … … 165 166 // Set all the styles 166 167 for ( var prop:String in obj ) 167 a Query.attr(168 as3Query.attr( 168 169 this, 169 prop, a Query.prop(this, obj[prop], type, index, prop)170 prop, as3Query.prop(this, obj[prop], type, index, prop) 170 171 ); 171 172 }); … … 186 187 187 188 var t:String = ""; 188 a Query.each( e || this, function(index:int, val:Object):void {189 as3Query.each( e || this, function(index:int, val:Object):void { 189 190 if( this.hasOwnProperty("text") ) { 190 191 t += this["text"].toString(); … … 194 195 } 195 196 196 public function wrapAll(html:String):a Query {197 public function wrapAll(html:String):as3Query { 197 198 if ( this[0] ) 198 199 // The elements to wrap the target around 199 a Query.create(html, this[0].stage)200 as3Query.create(html, this[0].stage) 200 201 .clone() 201 202 .insertBefore(this[0]) … … 211 212 } 212 213 213 public function wrapInner(html:String):a Query {214 public function wrapInner(html:String):as3Query { 214 215 return each(function(...args):void{ 215 a Query.create(this).contents().wrapAll(html);216 }); 217 } 218 219 public function wrap(html:String):a Query {216 as3Query.create(this).contents().wrapAll(html); 217 }); 218 } 219 220 public function wrap(html:String):as3Query { 220 221 return each(function(...args):void{ 221 a Query.create(this).wrapAll(html);222 as3Query.create(this).wrapAll(html); 222 223 }); 223 224 } … … 239 240 }; 240 241 241 public function parent( filter:String = null ):a Query {242 public function parent( filter:String = null ):as3Query { 242 243 return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 243 244 return a.parent; … … 245 246 } 246 247 247 public function parents( filter:String = null ):a Query {248 public function parents( filter:String = null ):as3Query { 248 249 return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 249 return a Query.dir(a, 'parent');250 }); 251 } 252 253 public function next( filter:String = null ):a Query {250 return as3Query.dir(a, 'parent'); 251 }); 252 } 253 254 public function next( filter:String = null ):as3Query { 254 255 return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 255 return a Query.nth(a, 2, 'nextSibling');256 }); 257 } 258 259 public function prev( filter:String = null ):a Query {256 return as3Query.nth(a, 2, 'nextSibling'); 257 }); 258 } 259 260 public function prev( filter:String = null ):as3Query { 260 261 return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 261 return a Query.nth(a, 2, 'previousSibling');262 }); 263 } 264 265 public function nextAll( filter:String = null ):a Query {262 return as3Query.nth(a, 2, 'previousSibling'); 263 }); 264 } 265 266 public function nextAll( filter:String = null ):as3Query { 266 267 return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 267 return a Query.dir(a, 'nextSibling');268 }); 269 } 270 271 public function prevAll( filter:String = null ):a Query {268 return as3Query.dir(a, 'nextSibling'); 269 }); 270 } 271 272 public function prevAll( filter:String = null ):as3Query { 272 273 return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 273 return a Query.dir(a, 'previousSibling');274 }); 275 } 276 277 public function siblings( filter:String = null ):a Query {274 return as3Query.dir(a, 'previousSibling'); 275 }); 276 } 277 278 public function siblings( filter:String = null ):as3Query { 278 279 return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 279 return a Query.sibling(a.parent.getChildAt(0), a);280 }); 281 } 282 283 public function children( filter:String = null ):a Query {280 return as3Query.sibling(a.parent.getChildAt(0), a); 281 }); 282 } 283 284 public function children( filter:String = null ):as3Query { 284 285 return mapAndPush(filter, function(a:DisplayObject, ...args):Array { 285 return a Query.sibling(Dom.firstChild(a));286 }); 287 } 288 289 public function contents( filter:String = null ):a Query {286 return as3Query.sibling(Dom.firstChild(a)); 287 }); 288 } 289 290 public function contents( filter:String = null ):as3Query { 290 291 return mapAndPush(filter, function(a:DisplayObject, ...args):DisplayObject { 291 292 return a.root; … … 293 294 } 294 295 295 private function mapAndPush( a:String, fn:Function ):a Query {296 var ret:Array = a Query.map( this, fn );296 private function mapAndPush( a:String, fn:Function ):as3Query { 297 var ret:Array = as3Query.map( this, fn ); 297 298 if ( a ) 298 ret = a Query.multiFilter(a, ret.getArray());299 return pushStack(a Query.unique(ret));300 } 301 302 public function append(... args):a Query {299 ret = as3Query.multiFilter(a, ret.getArray()); 300 return pushStack(as3Query.unique(ret)); 301 } 302 303 public function append(... args):as3Query { 303 304 return domManip(args, true, 1, function(a:DisplayObject):void{ 304 305 this.addChild( a ); … … 306 307 } 307 308 308 public function prepend(... args):a Query {309 public function prepend(... args):as3Query { 309 310 return domManip(args, true, -1, function(a:DisplayObject):void{ 310 311 this.addChildAt( a, 0 ); … … 312 313 } 313 314 314 public function before(... args):a Query {315 public function before(... args):as3Query { 315 316 return this.domManip(args, false, 1, function(a:DisplayObject):void{ 316 317 this.parent.addChildAt( a, this.parent.getChildIndex( this ) ); … … 318 319 } 319 320 320 public function after(... args):a Query {321 public function after(... args):as3Query { 321 322 return this.domManip(args, false, -1, function(a:DisplayObject):void{ 322 323 this.parent.addChildAt( a, this.parent.getChildIndex( this ) + 1 ); … … 324 325 } 325 326 326 public function end():a Query {327 return prevObject || a Query.create([]);328 } 329 330 public function find(t:*):a Query {331 var data:Array = a Query.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); }); 332 333 return pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ? 333 a Query.unique( data ) : data );334 } 335 336 public function clone(events:Boolean = false):a Query {334 as3Query.unique( data ) : data ); 335 } 336 337 public function clone(events:Boolean = false):as3Query { 337 338 // Do the clone 338 var ret:a Query = map(function(...args):DisplayObject{339 return a Query.cloneObject(this) as DisplayObject;339 var ret:as3Query = map(function(...args):DisplayObject{ 340 return as3Query.cloneObject(this) as DisplayObject; 340 341 }); 341 342 342 343 if (events === true) { 343 var clone:a Query = ret.find("*").andSelf();344 var clone:as3Query = ret.find("*").andSelf(); 344 345 345 346 find("*").andSelf().each(function(i:int, ...args):void { 346 var events:Object = a Query.data(this, "events");347 var events:Object = as3Query.data(this, "events"); 347 348 for ( var type:String in events ) 348 349 for ( var handler:Object in events[type] ) 349 a QueryEvent.add(clone[i], type, events[type][handler], events[type][handler].data);350 as3QueryEvent.add(clone[i], type, events[type][handler], events[type][handler].data); 350 351 }); 351 352 } … … 355 356 } 356 357 357 public function filter(t:Object):a Query {358 public function filter(t:Object):as3Query { 358 359 return pushStack( 359 a Query.isFunction( t ) &&360 a Query.grep(this, function(el:Object, index:int):Object{360 as3Query.isFunction( t ) && 361 as3Query.grep(this, function(el:Object, index:int):Object{ 361 362 return t.apply(el, [index]); 362 363 }) || 363 364 364 a Query.multiFilter(t.toString(),_array) );365 } 366 367 public function not(t:Object):a Query {365 as3Query.multiFilter(t.toString(),_array) ); 366 } 367 368 public function not(t:Object):as3Query { 368 369 return pushStack( 369 370 t is String && 370 a Query.multiFilter(t as String, _array, true) ||371 372 a Query.grep(this, function(a:Object):Boolean {373 return ( t is Array ? a Query.inArray( a, t as Array ) < 0 :374 t is a Query ? 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); 375 376 }) 376 377 ); 377 378 } 378 379 379 public function add(t:Object):a Query {380 return pushStack( a Query.merge(380 public function add(t:Object):as3Query { 381 return pushStack( as3Query.merge( 381 382 get() as Array, 382 383 t is String ? 383 a Query(t).get() as Array :384 as3Query(t).get() as Array : 384 385 t is Array ? t as Array : 385 t is a Query ? t.get() as Array : [t] )386 t is as3Query ? t.get() as Array : [t] ) 386 387 ); 387 388 } 388 389 389 390 public function _is(expr:String):Boolean { 390 return expr ? a Query.multiFilter(expr, _array).length > 0 : false;391 return expr ? as3Query.multiFilter(expr, _array).length > 0 : false; 391 392 } 392 393 … … 399 400 if ( this.length ) { 400 401 var elem = this[0]; 401 402 402 403 // We need to handle select boxes special 403 if ( a Query.nodeName(elem, "select") ) {404 if ( as3Query.nodeName(elem, "select") ) { 404 405 var index = elem.selectedIndex, 405 406 a = [], … … 416 417 if ( option.selected ) { 417 418 // Get the specifc value for the option 418 var val = a Query.browser.msie && !option.attributes["value"].specified ? option.text : option.value;419 var val = as3Query.browser.msie && !option.attributes["value"].specified ? option.text : option.value; 419 420 420 421 // We don't need an array for one selects … … 436 437 return this.each(function(){ 437 438 if ( val.constructor == Array && /radio|checkbox/.test(this.type) ) 438 this.checked = (a Query.inArray(this.value, val) >= 0 ||439 a Query.inArray(this.name, val) >= 0);440 else if ( a Query.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") ) { 441 442 var tmp = val.constructor == Array ? val : [val]; 442 443 443 a Query("option", this).each(function(){444 this.selected = (a Query.inArray(this.value, tmp) >= 0 ||445 a Query.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); 446 447 }); 447 448 … … 463 464 } 464 465 465 public function replaceWith( val:Object ):a Query {466 public function replaceWith( val:Object ):as3Query { 466 467 return after( val ).remove(); 467 468 } 468 469 469 public function slice(...args):a Query {470 public function slice(...args):as3Query { 470 471 return pushStack( _array.slice.apply( this, args ) ); 471 472 } 472 473 473 public function map(fn:Function):a Query {474 return pushStack(a Query.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{ 475 476 return fn.call( elem, i, elem ); 476 477 })); 477 478 } 478 479 479 public function andSelf():a Query {480 public function andSelf():as3Query { 480 481 return add( prevObject ); 481 482 } 482 483 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 { 486 485 var clone:Boolean = length > 1, a:Array; 487 486 488 487 return each(function():void{ 489 488 if ( !a ) { 490 a = a Query.clean(args);489 a = as3Query.clean(args); 491 490 if ( dir < 0 ) 492 491 a.reverse(); 493 492 } 494 493 495 var obj:a Query = this;496 497 a Query.each( a, function():void{498 fn.apply( obj, [ clone ? a Query.cloneObject(this) : this ] );494 var obj:as3Query = this; 495 496 as3Query.each( a, function():void{ 497 fn.apply( obj, [ clone ? as3Query.cloneObject(this) : this ] ); 499 498 }); 500 }) as a Query;499 }) as as3Query; 501 500 } 502 501 … … 514 513 515 514 public function extend( ...args ):Object { 516 return a Query.extend.apply( null, args );515 return as3Query.extend.apply( null, args ); 517 516 } 518 517 … … 540 539 // Recurse if we're merging object values 541 540 if ( deep && prop[i] is Object && target[i] ) 542 a Query.extend( target[i], prop[i] );541 as3Query.extend( target[i], prop[i] ); 543 542 544 543 // Don't bring in undefined values … … 551 550 } 552 551 553 private static var expando:String = "a Query" + (new Date()).getTime();552 private static var expando:String = "as3Query" + (new Date()).getTime(); 554 553 555 554 static public function isFunction(fn:Object):Boolean … … 568 567 } 569 568 570 static private var cache:Dictionary = new Dictionary( );569 static private var cache:Dictionary = new Dictionary( false ); 571 570 572 571 static internal function data( elem:Object, name:String = "", data:Object = null ):Object { … … 578 577 // Prevent overriding the named cache with undefined values 579 578 if ( data != null ) 580 a Query.cache[ elem ][ name ] = data;579 as3Query.cache[ elem ][ name ] = data; 581 580 582 581 // Return the named cache data … … 587 586 // If we want to remove a specific section of the element's data 588 587 if ( name != "" ) { 589 if ( a Query.cache[ elem ] ) {588 if ( as3Query.cache[ elem ] ) { 590 589 // Remove the section of cache data 591 delete a Query.cache[ elem ][ name ];590 delete as3Query.cache[ elem ][ name ]; 592 591 593 592 // If we've removed all the data, remove the element's cache 594 593 name = ""; 595 for ( name in a Query.cache[ elem ] ) break;594 for ( name in as3Query.cache[ elem ] ) break; 596 595 if ( name != "" ) 597 a Query.removeData( elem );596 as3Query.removeData( elem ); 598 597 } 599 598 … … 601 600 } else { 602 601 // Clean up the element expando 603 delete a Query.cache[ elem ];602 delete as3Query.cache[ elem ]; 604 603 } 605 604 } … … 633 632 static public function prop(elem:Object, value:Object, type:Object, index:int, prop:Object):Object { 634 633 // Handle executable functions 635 if(a Query.isFunction(value))634 if(as3Query.isFunction(value)) 636 635 value = Function(value).call(elem, [index]); 637 636 … … 643 642 // internal only, use addClass("class") 644 643 add: function( elem, c ){ 645 a Query.each( (c || "").split(/\s+/), function(i, cur){646 if ( !a Query.className.has( elem.className, cur ) )644 as3Query.each( (c || "").split(/\s+/), function(i, cur){ 645 if ( !as3Query.className.has( elem.className, cur ) ) 647 646 elem.className += ( elem.className ? " " : "" ) + cur; 648 647 }); … … 652 651 remove: function( elem, c ){ 653 652 elem.className = c != undefined ? 654 a Query.grep( elem.className.split(/\s+/), function(cur){655 return !a Query.className.has( c, cur );653 as3Query.grep( elem.className.split(/\s+/), function(cur){ 654 return !as3Query.className.has( c, cur ); 656 655 }).join(" ") : ""; 657 656 }, … … 659 658 // internal only, use is(".class") 660 659 has: function( t, c ) { 661 return a Query.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;660 return as3Query.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1; 662 661 } 663 662 }, … … 677 676 var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"]; 678 677 679 a Query.each( d, function(){678 as3Query.each( d, function(){ 680 679 old["padding" + this] = 0; 681 680 old["border" + this + "Width"] = 0; 682 681 }); 683 682 684 a Query.swap( e, old, function() {685 if ( a Query(e).is(':visible') ) {683 as3Query.swap( e, old, function() { 684 if ( as3Query(e).is(':visible') ) { 686 685 oHeight = e.offsetHeight; 687 686 oWidth = e.offsetWidth; 688 687 } else { 689 e = a Query(e.cloneNode(true))688 e = as3Query(e.cloneNode(true)) 690 689 &nb