|
Home > Archive > Macromedia Flash Server > August 2005 > Intro and questions
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 |
Intro and questions
|
|
|
| I'm new to this list, but not to Flash. Some of you may recognize me as
a regular contributor on the flashcoders list, among others. I recently took
a job that deals heavily with comm server, so hopefully I can get some info
from those of you who have spent more time with it than I have.
Now for the questions.
1. I'm working on a video chat, and I was wondering about connection
management with multi-room chats. The question is, do I use a single
netconnection and make a shared object for each room to pass messages, or do
I make a seperate connection for each room, and pass the messages through
the connection object. I guess I'm really asking for the common high-level
architecture for multi-room chat. How do you, or would you, go about it?
2. Load balancing. What are the best practices here? I'm assuming you would
want to use a broadcast tree, with a master server holding state and a
collection of connected clients, to use as an allocation table when the
slave servers ask for streams and such. How should I go about implementing
such a strategy?
3. Emoticons. ;-) I'm sure this has come up before. With text chat everyone
wants emoticons, which are notoriously difficult to do, since html text
fields don't let you put images inline with text. So, short of making a
million text fields around the emoticons and wrapping it all in a movie clip
to use in a scrollpane-type container, what have you guys done to implement
emoticons?
Well, that's it for now. Any input on the above is appreciated.
ryanm
=-----------------------------------------------------------
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
| |
| MHarris-vppm1TVqICB/8ZyCq/8wuYdd74u8MsAO@publi 2005-08-26, 2:45 am |
| Actually, as of flash player 7 you can embed jpeg images in text fields if
you are using html.
-----Original Message-----
From: ryanm [mailto:ryanm-7P97d3Wh0QeLZ21kGMrzwg@public.gmane.org]
Sent: Thursday, August 25, 2005 1:44 PM
To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
Subject: [FlashComm] Intro and questions
I'm new to this list, but not to Flash. Some of you may recognize me as
a regular contributor on the flashcoders list, among others. I recently took
a job that deals heavily with comm server, so hopefully I can get some info
from those of you who have spent more time with it than I have.
Now for the questions.
1. I'm working on a video chat, and I was wondering about connection
management with multi-room chats. The question is, do I use a single
netconnection and make a shared object for each room to pass messages, or do
I make a seperate connection for each room, and pass the messages through
the connection object. I guess I'm really asking for the common high-level
architecture for multi-room chat. How do you, or would you, go about it?
2. Load balancing. What are the best practices here? I'm assuming you would
want to use a broadcast tree, with a master server holding state and a
collection of connected clients, to use as an allocation table when the
slave servers ask for streams and such. How should I go about implementing
such a strategy?
3. Emoticons. ;-) I'm sure this has come up before. With text chat everyone
wants emoticons, which are notoriously difficult to do, since html text
fields don't let you put images inline with text. So, short of making a
million text fields around the emoticons and wrapping it all in a movie clip
to use in a scrollpane-type container, what have you guys done to implement
emoticons?
Well, that's it for now. Any input on the above is appreciated.
ryanm
=-----------------------------------------------------------
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
| |
| hank williams 2005-08-26, 2:45 am |
| On 8/25/05, ryanm <ryanm-7P97d3Wh0QeLZ21kGMrzwg@public.gmane.org> wrote:
> I'm new to this list, but not to Flash. Some of you may recognize me =
as
> a regular contributor on the flashcoders list, among others. I recently t=
ook
> a job that deals heavily with comm server, so hopefully I can get some in=
fo
> from those of you who have spent more time with it than I have.
>=20
> Now for the questions.
>=20
> 1. I'm working on a video chat, and I was wondering about connection
> management with multi-room chats. The question is, do I use a single
> netconnection and make a shared object for each room to pass messages, or=
do
> I make a seperate connection for each room, and pass the messages through
> the connection object. I guess I'm really asking for the common high-leve=
l
> architecture for multi-room chat. How do you, or would you, go about it?
>=20
When you say "multi-room" chat, do you mean that a given user could be
doing video chat in a number of rooms at one time? Thats what your
question sounds like, which doesnt make much sense to me... but I
doubt thats what you actually mean. I presume you mean that there are
a variety of rooms that a user can enter, and when they enter they can
see the other people in the room.
One shared object per room is certainly the simplest way to approach
this. Within the shared object model, you still need to decide how to
structure the data in the shared object. You probably dont want the
shared object to remember all the data forever, unless you plan on
archiving, in which case you probably want to interface, server side,
with a sql DB via remoting. In any case, the idea would be that
clients look for "new" postings to the shared object and then store
them locally to data structure such as an array, to handle scrolling
and such.
In any case though, the client and the server would typically open up
exactly one connection per client server pair, whether using a shared
object, or using "calls" or some other model.
> 2. Load balancing. What are the best practices here? I'm assuming you wou=
ld
> want to use a broadcast tree, with a master server holding state and a
> collection of connected clients, to use as an allocation table when the
> slave servers ask for streams and such. How should I go about implementin=
g
> such a strategy?
>=20
There are lots of load balancing models for different scenarios, but,
load balancing is relatively simple in the room model since no room is
likely to have zillions of people in it. This means you are unlikely
to have too many people for one server to handle. So typically, you
would have a central server that decides what rooms to assign to what
user. When the user logs in, the central server assigns them to the
server that handles the room they requested.
The broadcast tree would be inappropriate since the video chat
metaphor is not being consumed in an asymetrical fashion, meaning=20
there is little reason to "broadcast".
> 3. Emoticons. ;-) I'm sure this has come up before. With text chat everyo=
ne
> wants emoticons, which are notoriously difficult to do, since html text
> fields don't let you put images inline with text. So, short of making a
> million text fields around the emoticons and wrapping it all in a movie c=
lip
> to use in a scrollpane-type container, what have you guys done to impleme=
nt
> emoticons?
>=20
Dont know anything about this!
Regards
Hank
=-----------------------------------------------------------
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
| |
|
| > Actually, as of flash player 7 you can embed jpeg images in text fields if
> you are using html.
>
Yes, but they can only be aligned left or right, and the text always
wraps around it. You can't do images *inline* with text.
ryanm
=-----------------------------------------------------------
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
| |
| Naicu Octavian 2005-08-26, 2:45 am |
| 1) The best way to do it is to keep each room separate
(as in a different instance). This is the most
scaleable way to do it!=20
You can also try and do a super instance that keeps
track of the other rooms and to which the user can
connect to first to see the status of the other rooms!
I've tried doing a multi room chat with just 1 app
instance and keeping rooms info in a shared object but
there were never more than 100 users in it at the same
time! From what I know app instances are like
bottlenecks!
3) I'm going to help you with this! I've been working
on this for the past months and It's the best you will
ever see .
Also if you are new try reading this:
book:http://www.amazon.com/exec/obidos/t...40/qid=3D11250=
01356/sr=3D8-1/ref=3Dpd_bbs_1/102-1896373-9130512?v=3Dglance&s=3Dbooks&n=3D=
507846
It's a good book and most of the FCS developers I know
will reccomend it as "the one to read" !=20
--- ryanm <ryanm-7P97d3Wh0QeLZ21kGMrzwg@public.gmane.org> wrote:
> I'm new to this list, but not to Flash. Some of
> you may recognize me as=20
> a regular contributor on the flashcoders list, among
> others. I recently took=20
> a job that deals heavily with comm server, so
> hopefully I can get some info=20
> from those of you who have spent more time with it
> than I have.
>=20
> Now for the questions.
>=20
> 1. I'm working on a video chat, and I was wondering
> about connection=20
> management with multi-room chats. The question is,
> do I use a single=20
> netconnection and make a shared object for each room
> to pass messages, or do=20
> I make a seperate connection for each room, and pass
> the messages through=20
> the connection object. I guess I'm really asking for
> the common high-level=20
> architecture for multi-room chat. How do you, or
> would you, go about it?
>=20
> 2. Load balancing. What are the best practices here?
> I'm assuming you would=20
> want to use a broadcast tree, with a master server
> holding state and a=20
> collection of connected clients, to use as an
> allocation table when the=20
> slave servers ask for streams and such. How should I
> go about implementing=20
> such a strategy?
>=20
> 3. Emoticons. ;-) I'm sure this has come up before.
> With text chat everyone=20
> wants emoticons, which are notoriously difficult to
> do, since html text=20
> fields don't let you put images inline with text.
> So, short of making a=20
> million text fields around the emoticons and
> wrapping it all in a movie clip=20
> to use in a scrollpane-type container, what have you
> guys done to implement=20
> emoticons?
>=20
> Well, that's it for now. Any input on the above
> is appreciated.
>=20
> ryanm=20
>=20
>=20
>
=3D-----------------------------------------------------------
> Supported by Fig Leaf Software -
> http://www.figleaf.com
>
=3D-----------------------------------------------------------
>=20
> To change your subscription options or search the
> archive:
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20
________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=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
| |
| hank williams 2005-08-26, 2:45 am |
| Without having any real experience with this problem, I suspect that
you need to write your own line drawing code. This should be fairly
simple since you dont need to edit the chat lines - they are just for
display. So what would happen is the emoticon is only rendered by the
recieving user, in the your custom text line drawing code.
Regards
Hank
On 8/25/05, ryanm <ryanm-7P97d3Wh0QeLZ21kGMrzwg@public.gmane.org> wrote:
if[vbcol=seagreen]
> Yes, but they can only be aligned left or right, and the text always
> wraps around it. You can't do images *inline* with text.
>=20
> ryanm
>=20
>=20
> =3D-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D-----------------------------------------------------------
>=20
> 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
| |
|
| > When you say "multi-room" chat, do you mean that a given
> user could be doing video chat in a number of rooms at one time?
>
That's exactly what I mean. Like IRC chat, they want to be able to be in
more than one room at a time, with any user in any room that you are in able
to watch your video stream. I basically took over a chat that a previous
developer built (poorly, I must say), and I'm essentially rewriting it, and
I wanted to ask around about this before I started writing code. The way it
works now is a single NetConn, connected to an instance of the chat app
named after the room, so for example, if you wanted to enter room 1, you
would connect to rtmp://server.com/chat/room_1, where "chat" is the app and
room_1 is the instance (this allows me to make new rooms just by changing
the instance name in the url). The room_1 instance makes a temporary SO
called UserList that is essentially a collection of the client objects that
are connected to it. All the clients sync on UserList, so they are updated
as the user list changes, and messages are passed over the NetConn to the
clients. The catch is, it is all based around a single NetConn, which makes
being connected to multiple, unrelated rooms difficult.
> One shared object per room is certainly the simplest way to approach
> this. Within the shared object model, you still need to decide how to
> structure the data in the shared object. You probably dont want the
> shared object to remember all the data forever, unless you plan on
> archiving, in which case you probably want to interface, server side,
> with a sql DB via remoting. In any case, the idea would be that
> clients look for "new" postings to the shared object and then store
> them locally to data structure such as an array, to handle scrolling
> and such.
>
Yeah, what I had in mind was a temp SO for each room that is created
when someone goes into the room, and it has a property that I could update
with message text, which would go out to all of the clients onSync. I
wouldn't keep the history in the SO, just the most recent post. I'm just not
sure if there would be problems with simultaneous posts, or what other
problems may come with it. If I need to do logging, I'll do that seperately,
writing it out to a text file or something.
> There are lots of load balancing models for different scenarios, but,
> load balancing is relatively simple in the room model since no room is
> likely to have zillions of people in it. This means you are unlikely
> to have too many people for one server to handle. So typically, you
> would have a central server that decides what rooms to assign to what
> user. When the user logs in, the central server assigns them to the
> server that handles the room they requested.
>
So you're thinking a room must always be on one server, and the master
just hands new clients off to the appropriate server for that room? The
problem I see with that model is that some rooms will be extremely busy,
while others will be almost empty, so the server with the busy rooms on them
will get bogged down, and the servers with the unused rooms will be sitting
idle most of the time, which kind of defeats the purpose of load balancing.
What I'd like to do is allow users to connect to a room on any of the
servers, and have them synch to the master so that client objects can be
passed between servers through the master.
> The broadcast tree would be inappropriate since the video chat
> metaphor is not being consumed in an asymetrical fashion, meaning
> there is little reason to "broadcast".
>
I was thinking of a broadcast tree so that users could log in through
any server, and the master would have a NAT of users and rooms, and that way
when I want a video stream for a specific user I can just ask the master
server for it, and it can point me to the right app instance on the right
server to get it. That way rooms aren't an actual object anywhere, but
instead are just a collection of users on (potentially) each slave server,
which is synched with the list for that room on the master server. Then,
when someone joins that room from any server, they are added to the list on
the master, which synchs all of the slaves. The hard part is figuring out
what server a user is on to get a video stream from them.
ryanm
=-----------------------------------------------------------
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
| |
| hank williams 2005-08-26, 2:45 am |
| On 8/25/05, ryanm <ryanm-7P97d3Wh0QeLZ21kGMrzwg@public.gmane.org> wrote:
> That's exactly what I mean. Like IRC chat, they want to be able to be=
in
> more than one room at a time, with any user in any room that you are in a=
ble
> to watch your video stream. I basically took over a chat that a previous
> developer built (poorly, I must say), and I'm essentially rewriting it, a=
nd
> I wanted to ask around about this before I started writing code. The way =
it
> works now is a single NetConn, connected to an instance of the chat app
> named after the room, so for example, if you wanted to enter room 1, you
> would connect to rtmp://server.com/chat/room_1, where "chat" is the app a=
nd
> room_1 is the instance (this allows me to make new rooms just by changing
> the instance name in the url). The room_1 instance makes a temporary SO
> called UserList that is essentially a collection of the client objects th=
at
> are connected to it. All the clients sync on UserList, so they are update=
d
> as the user list changes, and messages are passed over the NetConn to the
> clients. The catch is, it is all based around a single NetConn, which mak=
es
> being connected to multiple, unrelated rooms difficult.
>=20
> Yeah, what I had in mind was a temp SO for each room that is created
> when someone goes into the room, and it has a property that I could updat=
e
> with message text, which would go out to all of the clients onSync. I
> wouldn't keep the history in the SO, just the most recent post. I'm just =
not
> sure if there would be problems with simultaneous posts, or what other
> problems may come with it. If I need to do logging, I'll do that seperate=
ly,
> writing it out to a text file or something.
>=20
> So you're thinking a room must always be on one server, and the maste=
r
> just hands new clients off to the appropriate server for that room? The
> problem I see with that model is that some rooms will be extremely busy,
> while others will be almost empty, so the server with the busy rooms on t=
hem
> will get bogged down, and the servers with the unused rooms will be sitti=
ng
> idle most of the time, which kind of defeats the purpose of load balancin=
g.
> What I'd like to do is allow users to connect to a room on any of the
> servers, and have them synch to the master so that client objects can be
> passed between servers through the master.
>=20
This, it seems to me is overly complicated, and likely to create bugs
that will be difficult to trace. One must always be mindful of making
things as complex as they need to be and no more. I think the answer
here is to do the load balancing when you are creating rooms.
Presuming that there is some fluidity to this rooms will come and go.
In any case, one server can likely handle **ALL** of the shared object
activity, regardless of how many users are using it. It is unlikely
that you really need to do much scaling here unless your client is
AOL. Shared objects are really light, and the text traffic is really
minimal.
Regarding the video, now that I understand your app a little more, it
does sound like you may want to implement a proxying model for the
video. This would allow people connected to different servers to share
their video with people on different servers. In this model there is a
central server, or "switch" that knows what server each user is
sending his video stream to. The central server tells the "edge"
servers to connect with each other and for the servers to route the
video stream appropriately.
This is the most efficient way of scaling the video. It does have the
weakness of the fact that if the central server goes down then the
system is down. This, of course can be elimiated by implementing a
redundant central server, but then the question is, is that extra
level of complexity worth it.
> I was thinking of a broadcast tree so that users could log in through
> any server, and the master would have a NAT of users and rooms, and that =
way
> when I want a video stream for a specific user I can just ask the master
> server for it, and it can point me to the right app instance on the right
> server to get it. That way rooms aren't an actual object anywhere, but
> instead are just a collection of users on (potentially) each slave server=
,
> which is synched with the list for that room on the master server. Then,
> when someone joins that room from any server, they are added to the list =
on
> the master, which synchs all of the slaves. The hard part is figuring out
> what server a user is on to get a video stream from them.
>=20
Ahh... this is similar to what I wrote in my answer above. The only
thing is that rooms are still object in that they are shared objects.
People subscribe to the shared object associated with the room in
order to get data from and send data to the room.
Figuring out what server a user is on isnt hard. They key is that
**everyone** logs into the central server or "lobby" machine and then
is sent to the computer which they send their video too. The central
server keeps track of what rooms the user is in and what physical
machine they are sending their video too. So the central machine is
really a switch. This is ok because all of these transactions, aside
from the video send/recieve are really light weight, and generally
only happen when the user logs in or changes state in a major way like
leaving or entering a room.
Regards
Hank
> ryanm
>=20
>=20
> =3D-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D-----------------------------------------------------------
>=20
> 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
| |
| Stefan Richter 2005-08-26, 7:45 am |
| On the topic of emoticons, I have yet to see a stable implementation that is
bug free on Player 7.
Simon's special font came very close and we would have probably cracked it
completely had we not found out about some potential Player 8 features. I
believe support for proper image alignment inside textfields will be much
improved in Player 8 and I will try and find some time to test this.
For the time being, I really wouldn't waste any time on this feature to make
it work in Player 7.
Stefan
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of
> hank williams
> Sent: Thursday, August 25, 2005 9:26 PM
> To: FlashComm Mailing List
> Subject: Re: [FlashComm] Intro and questions
>
> Without having any real experience with this problem, I
> suspect that you need to write your own line drawing code.
> This should be fairly simple since you dont need to edit the
> chat lines - they are just for display. So what would happen
> is the emoticon is only rendered by the recieving user, in
> the your custom text line drawing code.
>
> Regards
> Hank
>
> On 8/25/05, ryanm <ryanm-7P97d3Wh0QeLZ21kGMrzwg@public.gmane.org> wrote:
>
> =---------------------------------------------------------
> 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
| |
|
|
| Simon Lord 2005-08-26, 7:45 am |
| > "Simon's special font?" what is this? And what do you
> mean by bugs? Wrong positioning?
Naicu, I have my own smilie solution that uses a custom made font to
render the smilies in a chat text field. However I discovered a bug
with htmlText, when you append html to an htmlText field it will
remove the last 20 characters of the html. It's very hard to spot
unless you are doing something specific such as implementing my font
smilies.
I submitted a bug recently and I've been told it was fixed for F8.
You can see the bug here:
http://www.karbonized.com/htmlTextMess.swf
The workaround was to dump the chat field into a plain text field,
clear the chat field, append the incoming htmlText to the plain text
field, then dump that field which now contains the original and new
html encoded text back into the htmlText = true field (or textField
component), and it all works well.
My smilie test file is here:
http://www.karbonized.com/smilies/
You can download it here:
http://www.karbonized.com/smilies/Archive.zip
Mac and PC font plus a sample file is included. You need to be
comfortable with tinkering to get it to work. The htmlText bug
turned this easy drag and drop solution for Flash 5,6,7,8 and beyond
into a pain in the XXX implementation.
>
>
> --- Stefan Richter <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org> wrote:
>
>
> =-----------------------------------------------------------
>
> =-----------------------------------------------------------
>
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> =---------------------------------------------------------
>
> =---------------------------------------------------------
>
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> =-----------------------------------------------------------
>
> =-----------------------------------------------------------
>
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
>
>
>
> __________________________________
> Yahoo! Mail
> Stay connected, organized, and protected. Take the tour:
> http://tour.mail.yahoo.com/mailtour.html
>
>
> =-----------------------------------------------------------
> 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
| |
| Naicu Octavian 2005-08-26, 5:45 pm |
| Ok, this is an approach I never have seen. So the
special font is used just for the smilies right? The
rest of the text can be any language!
I woul never tought of that!
The aproach I used finally is rather basic. I go
trough the string character by character and looks for
instances of <font <p> <a <b> etc... and instances of
emoteicons... etc.... and isnatnces of
< ....
If it is a font,b,i tag it saves the text data (bold
italic, size, etc..)if it is a character/word it
calculates the width and height of the word using the
previous font data, if it is a emoteicon it positions
it using the previous width height data.
I am using it in several projects and tweaking each
and there! But soon I will reach to a state where it
will really eat up everything you throw at it!Right
now, the stand alone will not really eat up every html
tag you throw at it. Then I will post the sources for
everyone to have and drop&drag! 
Also a bug I've noticed is that if you have only one
link in a html text field the HAND cursor is displayed
when you are hovering over all the text field not just
the actual link!
--- Simon Lord <slord-1+jUDDTtyItWk0Htik3J/w@public.gmane.org> wrote:
> you
>=20
> Naicu, I have my own smilie solution that uses a
> custom made font to =20
> render the smilies in a chat text field. However I
> discovered a bug =20
> with htmlText, when you append html to an htmlText
> field it will =20
> remove the last 20 characters of the html. It's
> very hard to spot =20
> unless you are doing something specific such as
> implementing my font =20
> smilies.
>=20
> I submitted a bug recently and I've been told it was
> fixed for F8.
>=20
> You can see the bug here:
>=20
> http://www.karbonized.com/htmlTextMess.swf
>=20
> The workaround was to dump the chat field into a
> plain text field, =20
> clear the chat field, append the incoming htmlText
> to the plain text =20
> field, then dump that field which now contains the
> original and new =20
> html encoded text back into the htmlText =3D true
> field (or textField =20
> component), and it all works well.
>=20
> My smilie test file is here:
>=20
> http://www.karbonized.com/smilies/
>=20
> You can download it here:
>=20
> http://www.karbonized.com/smilies/Archive.zip
>=20
> Mac and PC font plus a sample file is included. You
> need to be =20
> comfortable with tinkering to get it to work. The
> htmlText bug =20
> turned this easy drag and drop solution for Flash
> 5,6,7,8 and beyond =20
> into a pain in the XXX implementation.
>=20
> wrote:
> potential
> time
> recieving
>
=3D-----------------------------------------------------------
>
=3D-----------------------------------------------------------
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
=3D---------------------------------------------------------
>
=3D---------------------------------------------------------
> the
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20
=3D=3D=3D message truncated =3D=3D=3D
________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=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
| |
| Simon Lord 2005-08-26, 5:45 pm |
| > Ok, this is an approach I never have seen. So the
> special font is used just for the smilies right? The
> rest of the text can be any language!
Correct. The key combinations for calling up a smilie are fully
customizable as well, this means you can support BB style smilies
[smile], standard email smiles and so on (or both).
> I woul never tought of that!
That's because you're probably a better coder than I am and can think
through a problem via code, since I'm not comfortable tackling many
issues with code, I'm left with having to think along the lines of my
personal experience and training background which is graphics and
illustration.
Different strokes for different folks...
Sincerely,
Simon
=-----------------------------------------------------------
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
| |
| Tom Bray 2005-08-26, 5:45 pm |
| On 8/26/05, Stefan Richter <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org> wrote:
>=20
> On the topic of emoticons, I have yet to see a stable implementation that=
=20
> is
> bug free on Player 7.=20
It can be done. It's a real pain, but we have an implementation that works=
=20
in FP6 and above. You can check it out at http://www.userplane.com/webchat/=
..
For the time being, I really wouldn't waste any time on this feature to mak=
e
> it work in Player 7.
>=20
Given the amount of work it took to get all the bugs out of our version, I'=
d=20
probably agree, but I'll believe that they fixed image alignment and font=
=20
metrics when I see it (if it supports in-line images, I'll never curse MM's=
=20
name again). Simon's font is a much more straightforward approach and reall=
y=20
clever, but we had to be able to let our customers upload custom smileys so=
=20
a font-based solution wouldn't work for us.
I'd post sample code, but there's so much of it that I'd have to write a=20
book about it instead All I can say is, good luck!
-Tom
www.userplane.com <http://www.userplane.com>
=-----------------------------------------------------------
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
| |
|
| > I submitted a bug recently and I've been told it was fixed for F8.
>
> You can see the bug here:
>
> http://www.karbonized.com/htmlTextMess.swf
>
The thing is, I hit "append" like a million times and don't see the bug,
but I do see it in the chat on FlashComGuru.
The problem with using that proposed fix, and in fact, with using html
text fields for a chat history window, is that the window full of text has
to be rerendered every time new text is appended, which causes the whole app
to get laggy after the first few hundred lines.
Remember, an append is not really an append. Doing this:
FieldName.htmlText += htmlString;
Is actually an intrinsic call to the htmlText getter and then another
call to the setter. It is the same, from an execution standpoint, as this:
(setter) (getter)
FieldName.htmlText = FieldName.htmlText + htmlString;
And the setter dirties theTextField, causing it to rerender. I've found
that after about 150-200 lines, there is a noticable lage between hitting
"send" and seeing the text field update. Clear the text field and it's
instantaneous again, at least until you get a couple hundred lines in there.
My solution, obviously, is to put a "clear" button at the top of the window
and let the user clear the history when it starts to lag, but that seems
more like a band-aid than an actual solution.
I have built a second chat history class to do a side-by-side
comparison, and this one makes each added message a movie clip, inside a
container clip that gets scrolled behind a mask. Even in Flash 7 it can
handle more text than an html text field before starting to get laggy, so
with Flash 8 and cacheAsBitmap it should perform even better. The downside,
of course, is that you can't select the text of the chat, but I figure if I
dump all chat messages to a log on the server-side, I don't need to be able
to select the text on the client.
So, if I'm looking at a movie clip based solution anyway, it seems much
easier to just figure out where to position the emoticon images than to deal
with extra fonts and whatnot. Although I'll download Simon's fla today and
play around with it, because if it works, I just may use it.
ryanm
=-----------------------------------------------------------
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
| |
| Stefan Richter 2005-08-26, 5:45 pm |
| Could you use something like a maxlength property for the textfield? I can't
remember if that exists right now though...
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of ryanm
> Sent: Friday, August 26, 2005 7:33 PM
> To: FlashComm Mailing List
> Subject: Re: [FlashComm] Intro and questions
>
> The thing is, I hit "append" like a million times and
> don't see the bug, but I do see it in the chat on FlashComGuru.
>
> The problem with using that proposed fix, and in fact,
> with using html text fields for a chat history window, is
> that the window full of text has to be rerendered every time
> new text is appended, which causes the whole app to get laggy
> after the first few hundred lines.
>
> Remember, an append is not really an append. Doing this:
>
> FieldName.htmlText += htmlString;
>
> Is actually an intrinsic call to the htmlText getter and
> then another call to the setter. It is the same, from an
> execution standpoint, as this:
>
> (setter) (getter)
> FieldName.htmlText = FieldName.htmlText + htmlString;
>
> And the setter dirties theTextField, causing it to
> rerender. I've found that after about 150-200 lines, there is
> a noticable lage between hitting "send" and seeing the text
> field update. Clear the text field and it's instantaneous
> again, at least until you get a couple hundred lines in there.
> My solution, obviously, is to put a "clear" button at the top
> of the window and let the user clear the history when it
> starts to lag, but that seems more like a band-aid than an
> actual solution.
>
> I have built a second chat history class to do a
> side-by-side comparison, and this one makes each added
> message a movie clip, inside a container clip that gets
> scrolled behind a mask. Even in Flash 7 it can handle more
> text than an html text field before starting to get laggy, so
> with Flash 8 and cacheAsBitmap it should perform even better.
> The downside, of course, is that you can't select the text of
> the chat, but I figure if I dump all chat messages to a log
> on the server-side, I don't need to be able to select the
> text on the client.
>
> So, if I'm looking at a movie clip based solution anyway,
> it seems much easier to just figure out where to position the
> emoticon images than to deal with extra fonts and whatnot.
> Although I'll download Simon's fla today and play around with
> it, because if it works, I just may use it.
>
> ryanm
>
>
> =-----------------------------------------------------------
> 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
| |
| Simon Lord 2005-08-26, 5:45 pm |
| > The thing is, I hit "append" like a million times and don't see
> the bug, but I do see it in the chat on FlashComGuru.
Here's a swf movie I just made to illustrate the effect you *should*
see:
http://www.karbonized.com/appendBug.swf
.... each time I hit the Append button causing Flash to do a += it
REMOVES the last 20 *html* characters used to render the text field.
I'm not clever enough to write a function to display the dropped
characters, but if you were to dump the text back into a plain text
field and read the html you would see that there were exactly 20
missing characters between what *was* there and the newly +='d data.
So what's happening in the above demo is that each time I hit append,
closing </font> tags, </size> tags etc are being obliterated causing
the rendered html to corrupt itself and display crap. The effect is
much worse with the smilies which is how I found this bug.
Sincerely,
Simon
=-----------------------------------------------------------
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
| |
|
| > So what's happening in the above demo is that each time I hit append,
> closing </font> tags, </size> tags etc are being obliterated causing the
> rendered html to corrupt itself and display crap. The effect is much
> worse with the smilies which is how I found this bug.
>
So append 5 html-encoded spaces at the end of the string every time? As
in:
Field.htmlText += htmlString+" "
Wouldn't that pretty much fix the problem, since the spaces wouldn't be
visible anyway?
ryanm
=-----------------------------------------------------------
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
| |
| Simon Lord 2005-08-26, 5:45 pm |
| I'll have to give that a try actually, but you'll probably get to it
sooner than I will.
If you need custom smilies let me know, I can crank out a set for a
few bucks... ;)
On Aug 26, 2005, at 3:58 PM, ryanm wrote:
> So append 5 html-encoded spaces at the end of the string every
> time? As in:
>
> Field.htmlText += htmlString+" "
>
> Wouldn't that pretty much fix the problem, since the spaces
> wouldn't be visible anyway?
>
> ryanm
>
> =-----------------------------------------------------------
> 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
| |
| Jerry Chabolla 2005-08-30, 5:46 pm |
| Hey Tom,
> I'd post sample code, but there's so much of it that I'd have to write a
book about it instead All I can say is, good luck!<
Let me know when your book comes out ;).
Jerry
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Tom Bray
Sent: Friday, August 26, 2005 10:30 AM
To: FlashComm Mailing List
Subject: Re: [FlashComm] Intro and questions
On 8/26/05, Stefan Richter <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org> wrote:
>
> On the topic of emoticons, I have yet to see a stable implementation that
> is
> bug free on Player 7.
It can be done. It's a real pain, but we have an implementation that works
in FP6 and above. You can check it out at http://www.userplane.com/webchat/.
For the time being, I really wouldn't waste any time on this feature to make
> it work in Player 7.
>
Given the amount of work it took to get all the bugs out of our version, I'd
probably agree, but I'll believe that they fixed image alignment and font
metrics when I see it (if it supports in-line images, I'll never curse MM's
name again). Simon's font is a much more straightforward approach and really
clever, but we had to be able to let our customers upload custom smileys so
a font-based solution wouldn't work for us.
I'd post sample code, but there's so much of it that I'd have to write a
book about it instead All I can say is, good luck!
-Tom
www.userplane.com <http://www.userplane.com>
=---------------------------------------------------------
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
|
|
|
|
|