actionscript 2, hash objects

I have a custom class to represent a real world object. I want to be able to compare two of these classes to see if one has changed but i cant find how to make a hash of an class in as2

how should i do this, ideally i wanted something like

if obj1.getHash() !=  obj2.getHash()

then blah
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In AS2.0 there seems to be no such direct APIs for comparing 2 objects.
I have notes here a snippet for AS2.0. Let me know if it helps you.

Warm Regards
Deepanjan Das
var obj1:Object = {}; = "Jim";
obj1.age = 32;

var obj2:Object = {}; = "Jim";
obj2.age = 32;

function compare( o1, o2 ){
	var same = true;
	for ( var prop1 in o1 ){
		if( o1[prop1] != o2[prop1] ){
			same = false;
	for ( var prop2 in o2 ){
		if( o2[prop2] != o1[prop2] ){
			same = false;
	return same

if( compare(obj1, obj2) ){
    trace("Objects are same");
    trace("Objects are different");

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jockmahon01Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.