Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-01-2007, 08:33 PM   #1
praufet
Registered User
 
praufet's Avatar
 
Join Date: May 2004
Posts: 291
Default The bastard child of array and object---hash

I wrote a new class called hash. It basically brings the functionality of an array to an object so you can used name indexes. Kinda like the dictionary class but better. Check the sample code.

Code:
import com.infinity.lib.Hash;

var test = new Hash({name: 'test', selectable: false, visible: false, scaleX: 1, scaleY: 1});
test.merge({x: 100, y: 100, width: 400, height: 400, visible: true, name: 'poopie'})
var result = test.reject(function(key,value){
	return value > 10;							 
})
trace(result.toS)
Attached Files
File Type: zip Hash.zip (761 Bytes, 83 views)
praufet is offline   Reply With Quote
Old 08-02-2007, 11:13 AM   #2
panel
AS3
 
panel's Avatar
 
Join Date: Mar 2007
Location: Warsaw
Posts: 1,991
Send a message via Skype™ to panel
Default

you can already use name indexes in array

ActionScript Code:
var array = new Array(); array["myIndexname"] = 12; trace(array["myIndexname"])
panel is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Service param is an object inside and array which is an object Babyminion ActionScript 2.0 0 12-07-2006 07:45 AM
Array into shared object? Bushfire ActionScript 2.0 2 06-26-2006 09:31 PM
problem creating mc instance names inside a function jasonyen ActionScript 2.0 10 12-08-2004 12:01 AM
Database simulated with arrays on a cd-rom lecasn5 Components 61 09-07-2004 11:40 AM
enterframe and load and objects, oh my! dice ActionScript 1.0 (and below) 13 07-18-2003 11:07 AM


All times are GMT. The time now is 09:30 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.