|
Home > Archive > Macromedia Flash Server > August 2006 > Set user color without the component
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Set user color without the component
|
|
| Andy Scott 2006-08-09, 7:11 am |
| I have a 2 way chat program, which uses the standard chat component.
I want to set the text color in the chat history so that, for example, User
1 is red and User 2 is blue. I don't want the users to be able to change the
color, so do not want the usercolor component. I looked in the 'Bible' but
that doesn't give any real clues, other than to use the component. I have
also examined the AS in the component and tried copying code out of it, but
to no avail. I have tried Googling but it seems that no-one else has tried
to do this.
Maybe I am missing something really obvious - can anyone help?!
Thanks
Andy
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
| |
|
| Scott,
One way to do this would be to create an algorithm which sends the user
color to the user from the server .
e.g
application.onConnect = function(nC, varObj)
{
var nC = {}
nC.txtColor = Your random colour;
this.acceptConnection(nC)
nC.call("setTxtColor",null,nC.txtColor)
}
That should call a function on the client that sets an individual colour for
each client. That should show up on an html enabled text field
[a /]
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Andy Scott
Sent: 09 August 2006 12:06
To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
Subject: [FlashComm] Set user color without the component
I have a 2 way chat program, which uses the standard chat component.
I want to set the text color in the chat history so that, for example, User
1 is red and User 2 is blue. I don't want the users to be able to change the
color, so do not want the usercolor component. I looked in the 'Bible' but
that doesn't give any real clues, other than to use the component. I have
also examined the AS in the component and tried copying code out of it, but
to no avail. I have tried Googling but it seems that no-one else has tried
to do this.
Maybe I am missing something really obvious - can anyone help?!
Thanks
Andy
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
| |
| Andy Scott 2006-08-10, 1:12 pm |
| The thing is I don't want a random colour. I want to define User 1 as red
and User 2 as blue.
I looked in the chat.asc on the server and saw this code:
FCChat.prototype.connect = function( client ) {
var cglobal = this.getClientGlobalStorage(client);
if (!cglobal.usercolor) {
cglobal.usercolor = "0x000000";
}
client.call( this.callPrefix + "receiveHistory", null,
this.history );
client.call( this.callPrefix + "setUsername", null,
cglobal.username);
}
If I can somehow call this to set the color, it should work. Question is -
how?!
Andy
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of [a /]
Sent: 09 August 2006 18:58
To: 'FlashComm Mailing List'
Subject: RE: [FlashComm] Set user color without the component
Scott,
One way to do this would be to create an algorithm which sends the user
color to the user from the server .
e.g
application.onConnect = function(nC, varObj) { var nC = {} nC.txtColor =
Your random colour;
this.acceptConnection(nC)
nC.call("setTxtColor",null,nC.txtColor)
}
That should call a function on the client that sets an individual colour for
each client. That should show up on an html enabled text field
[a /]
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Andy Scott
Sent: 09 August 2006 12:06
To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
Subject: [FlashComm] Set user color without the component
I have a 2 way chat program, which uses the standard chat component.
I want to set the text color in the chat history so that, for example, User
1 is red and User 2 is blue. I don't want the users to be able to change the
color, so do not want the usercolor component. I looked in the 'Bible' but
that doesn't give any real clues, other than to use the component. I have
also examined the AS in the component and tried copying code out of it, but
to no avail. I have tried Googling but it seems that no-one else has tried
to do this.
Maybe I am missing something really obvious - can anyone help?!
Thanks
Andy
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
| |
| Andy Scott 2006-08-16, 1:11 pm |
| Sorted it.
I did it server side. As I have separate functions to log in each of the two
users, I simply set the global called usercolor in the same way i set the
username.
Andy
----- Original Message -----
From: "Andy Scott" <andy-frkjiJ2oPnDk1uMJSBkQmQ@public.gmane.org>
To: "'FlashComm Mailing List'" <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Thursday, August 10, 2006 5:59 PM
Subject: RE: [FlashComm] Set user color without the component
> The thing is I don't want a random colour. I want to define User 1 as red
> and User 2 as blue.
>
> I looked in the chat.asc on the server and saw this code:
>
> FCChat.prototype.connect = function( client ) {
>
> var cglobal = this.getClientGlobalStorage(client);
>
> if (!cglobal.usercolor) {
> cglobal.usercolor = "0x000000";
> }
>
> client.call( this.callPrefix + "receiveHistory", null,
> this.history );
> client.call( this.callPrefix + "setUsername", null,
> cglobal.username);
> }
>
> If I can somehow call this to set the color, it should work. Question is -
> how?!
>
> Andy
>
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of [a /]
> Sent: 09 August 2006 18:58
> To: 'FlashComm Mailing List'
> Subject: RE: [FlashComm] Set user color without the component
>
> Scott,
> One way to do this would be to create an algorithm which sends the user
> color to the user from the server .
>
> e.g
>
> application.onConnect = function(nC, varObj) { var nC = {} nC.txtColor =
> Your random colour;
>
> this.acceptConnection(nC)
> nC.call("setTxtColor",null,nC.txtColor)
> }
>
> That should call a function on the client that sets an individual colour
> for
> each client. That should show up on an html enabled text field
>
> [a /]
>
>
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Andy Scott
> Sent: 09 August 2006 12:06
> To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> Subject: [FlashComm] Set user color without the component
>
> I have a 2 way chat program, which uses the standard chat component.
>
> I want to set the text color in the chat history so that, for example,
> User
> 1 is red and User 2 is blue. I don't want the users to be able to change
> the
> color, so do not want the usercolor component. I looked in the 'Bible' but
> that doesn't give any real clues, other than to use the component. I have
> also examined the AS in the component and tried copying code out of it,
> but
> to no avail. I have tried Googling but it seems that no-one else has tried
> to do this.
>
> Maybe I am missing something really obvious - can anyone help?!
>
> Thanks
> Andy
> ________________________________________
_______
> FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training http://www.figleaf.com
> http://training.figleaf.com
>
>
> ________________________________________
_______
> FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training http://www.figleaf.com
> http://training.figleaf.com
>
>
> ________________________________________
_______
> FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.10.9/417 - Release Date: 11/08/2006
>
>
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
|
|
|
|
|