- eBay Auction Shopping Alt
- Credit Cards
- Best deals, discount prices
- Rencontre
- Casual Fashion from Uniqlo
- Jobs
- Run your car on only tap water
- Annonce auto gratuite
- Cell Phones
ReferenceLocator
A class to store and retrieve string references to any object. Good for storing references to the functions returned from Delegate.create(), or tweens, or anything at all.
http://www.visible-form.com/blog/referencelocator-store-a-reference-to-anything-as-a-string/
Actionscript:
-
// new reference object needs two props: referenceName:String, referenceTo:Object
-
// new reference object can also specify property 'overwrite', set to true will overwrite existing reference with the same name
-
ReferenceLocator.getInstance().addReference({referenceName:'someStringReference', referenceTo:anyExisitingObject})
-
-
//returns the object the given string refers to
-
ReferenceLocator.getInstance().getReference('someStringReference');
-
-
//deletes a reference to an object. if the second parameter is set to true,
-
//it will delete both the string reference to the object, and the object itself.
-
//if object is a movieclip, it will swap itself to the nextHighestDepth() of its parent and remove itself
-
ReferenceLocator.getInstance().deleteReference('someStringReference', true);
No Comments »
RSS feed for comments on this post.
| TrackBack URI
You can also bookmark
this on del.icio.us or check the cosmos