FCS Difference between objects
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Macromedia Flash Server > FCS Difference between objects




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    FCS Difference between objects  
Harper, Chris


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-05 10:49 PM

This isn't strictly a FCS question but I was wondering if anybody knew
how to tell if two objects are different in flash.  I've been trying to
do something like:

=20

If (oldData[curRoom].length !=3D newData[curRoom].length){

=20

syncData();      =20

=20

}

=20

But of course that doesn't work :-(

=20

Chris


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Re: FCS Difference between objects  
JesterXL


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-05 10:49 PM

You can compare objects:

if(a == b)

or:

if(a === b)

But, because objects have properties, your mileage may vary.

Typically, you can test for a specific property, but that naturally doesn't
ensure the rest are the same.  For example, you could test the obj.username
and if it matches your version it might be the same... unless your
application allows mutiple usernames, in which case, that's not true... make
sense?

----- Original Message -----
From: "Harper, Chris" <Chris.Harper-OaAI/70wYEY@public.gmane.org>
To: <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Wednesday, May 18, 2005 2:57 PM
Subject: [FlashComm] FCS Difference between objects


This isn't strictly a FCS question but I was wondering if anybody knew
how to tell if two objects are different in flash.  I've been trying to
do something like:



If (oldData[curRoom].length != newData[curRoom].length){



syncData();



}



But of course that doesn't work :-(



Chris


Supported by Fig Leaf Software - http://www.figleaf.com

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    RE: FCS Difference between objects  
Harper, Chris


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-05 10:49 PM

Duh, why didn't I think of that 

Sometimes I'm too "forrest for the trees".  Or maybe I'm just to
forrest... as in Gump!

Thanks Jesty, did the Trick!

-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.
org] On Behalf Of JesterXL
Sent: Wednesday, May 18, 2005 1:22 PM
To: FlashComm Mailing List
Subject: Re: [FlashComm] FCS Difference between objects

You can compare objects:

if(a =3D=3D b)

or:

if(a =3D=3D=3D b)

But, because objects have properties, your mileage may vary.

Typically, you can test for a specific property, but that naturally
doesn't=20
ensure the rest are the same.  For example, you could test the
obj.username=20
and if it matches your version it might be the same... unless your=20
application allows mutiple usernames, in which case, that's not true...
make=20
sense?

----- Original Message -----=20
From: "Harper, Chris" <Chris.Harper-OaAI/70wYEY@public.gmane.org>
To: <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Wednesday, May 18, 2005 2:57 PM
Subject: [FlashComm] FCS Difference between objects


This isn't strictly a FCS question but I was wondering if anybody knew
how to tell if two objects are different in flash.  I've been trying to
do something like:



If (oldData[curRoom].length !=3D newData[curRoom].length){



syncData();



}



But of course that doesn't work :-(



Chris


Supported by Fig Leaf Software - http://www.figleaf.com

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailma...fo/flashcomm=20


=3D-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    RE: FCS Difference between objects  
Harper, Chris


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-18-05 10:49 PM

Okay, I actually got around to making a test but it doesn't seem to
work.
Here is my code:


/////////////////////////////////////
obj1 =3D new Object();
obj1["test"] =3D new Object();
obj1["test"]["user1"] =3D new Object();
obj1["test"]["user1"].room =3D "room1";
obj1["test"]["user1"].id =3D 123;

obj2 =3D new Object();
obj2["test"] =3D new Object();
obj2["test"]["user1"] =3D new Object();
obj2["test"]["user1"].room =3D "room1";
obj2["test"]["user1"].id =3D 123;

obj3 =3D new Object();
obj3["test"] =3D new Object();
obj3["test"]["user1"] =3D new Object();
obj3["test"]["user1"].room =3D "room1";
obj3["test"]["user1"].id =3D 123
obj3["test"]["user2"] =3D new Object();
obj3["test"]["user2"].room =3D "room1";
obj3["test"]["user2"].id =3D 1234;


if (obj1 =3D=3D obj2){=09
trace ("obj1 is equal to obj2");=09
} else {=09
trace ("obj1 is not equal to obj2");=09
}

if (obj2 =3D=3D obj3){=09
trace ("obj2 is equal to obj3");=09
} else {=09
trace ("obj2 is not equal to obj3");=09
}
//////////////////////////////////////////

And it outputs:

obj1 is not equal to obj2
obj2 is not equal to obj3

//////////////////////////////////////////

Am I missing something?

-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.
org] On Behalf Of JesterXL
Sent: Wednesday, May 18, 2005 1:22 PM
To: FlashComm Mailing List
Subject: Re: [FlashComm] FCS Difference between objects

You can compare objects:

if(a =3D=3D b)

or:

if(a =3D=3D=3D b)

But, because objects have properties, your mileage may vary.

Typically, you can test for a specific property, but that naturally
doesn't=20
ensure the rest are the same.  For example, you could test the
obj.username=20
and if it matches your version it might be the same... unless your=20
application allows mutiple usernames, in which case, that's not true...
make=20
sense?

----- Original Message -----=20
From: "Harper, Chris" <Chris.Harper-OaAI/70wYEY@public.gmane.org>
To: <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Wednesday, May 18, 2005 2:57 PM
Subject: [FlashComm] FCS Difference between objects


This isn't strictly a FCS question but I was wondering if anybody knew
how to tell if two objects are different in flash.  I've been trying to
do something like:



If (oldData[curRoom].length !=3D newData[curRoom].length){



syncData();



}



But of course that doesn't work :-(



Chris


Supported by Fig Leaf Software - http://www.figleaf.com

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailma...fo/flashcomm=20


=3D-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:49 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register