Re: flash_pubsub
[email protected] Mon, 6 Dec 2004 09:38:28 -0800
| Newsgroups | gmane.comp.web.mod-pubsub.devel |
|---|---|
| Message-ID | <OFF4E747C7.2995C2DA-ON88256F62.0033ADF5-88256F62.0060E7CB@planar.com> |
This is a multipart message in MIME format.
--=_alternative 0060E7C588256F62_=
Content-Type: text/plain; charset="us-ascii"
Yes, I'm working on a Flash ActionScript 2 client library. I hope to have
it together in the "not-too-distant future."
In the meantime, if you would like to try using the existing flash_pubsub
code, do something like:
// setup tunnel
var tunnelUrl = "/who/anonymous/s/" +
Math.random().toString().substring(2,9) + "/kn_journal";
var tunnel = new pubSubSocket ("yourhost", 8080);
var message = new pubSubData("flash");
message.setFromPath(tunnelUrl);
message.setMethod("route");
tunnel.onData = function (msg) {
// handle message ...
trace("[" + msg.split("\r\n") + "]");
}
tunnel.send(message);
// send subscription
var subscribeRequest = new LoadVars();
var subscribeReceiver = new LoadVars();
subscribeRequest.kn_from = "/what/imagepublish";
subscribeRequest.kn_to = tunnelUrl;
subscribeRequest.do_method = "route";
subscribeRequest.kn_response_format = "flash";
subscribeRequest.sendAndLoad("http://yourhost:8080/kn",
subscribeReceiver);
-Patrick Thompson
> Hi Danda,
>
> Funny you should mention that! Someone is actively working on it now.
> Patrick, would you like to reply? JP
>
>
> --- mod-pubsub-developer-admin@li... wrote:
>
>> Hi,
>>
>> I"m about to attempt to create a flash client for subscribing (no
>> publishing necessary) to a pubsub server.
>>
>> I found the "0.1" code release of flash_pubsub in the mod_pubsub
>> distro. I was wondering if any more work has been done on this since
>> the library was released.
>>
>> regards,
>>
>> Dan Libby
--=_alternative 0060E7C588256F62_=
Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="sans-serif">Yes, I'm working on a Flash ActionScript 2 client library. I hope to have it together in the "not-too-distant future."</font>
<br>
<br><font size=2 face="sans-serif">In the meantime, if you would like to try using the existing flash_pubsub code, do something like:</font>
<br>
<br><font size=2 face="sans-serif"> // setup tunnel</font>
<br><font size=2 face="sans-serif"> var tunnelUrl = "/who/anonymous/s/" + Math.random().toString().substring(2,9) + "/kn_journal";</font>
<br><font size=2 face="sans-serif"> var tunnel = new pubSubSocket ("yourhost", 8080);</font>
<br><font size=2 face="sans-serif"> var message = new pubSubData("flash");</font>
<br><font size=2 face="sans-serif"> message.setFromPath(tunnelUrl);</font>
<br><font size=2 face="sans-serif"> message.setMethod("route");</font>
<br><font size=2 face="sans-serif"> tunnel.onData = function (msg) {</font>
<br><font size=2 face="sans-serif"> // handle message ...</font>
<br><font size=2 face="sans-serif"> trace("[" + msg.split("\r\n") + "]"); </font>
<br><font size=2 face="sans-serif"> }</font>
<br><font size=2 face="sans-serif"> tunnel.send(message);</font>
<br>
<br><font size=2 face="sans-serif"> // send subscription</font>
<br><font size=2 face="sans-serif"> var subscribeRequest = new LoadVars();</font>
<br><font size=2 face="sans-serif"> var subscribeReceiver = new LoadVars();</font>
<br><font size=2 face="sans-serif"> subscribeRequest.kn_from = "/what/imagepublish";</font>
<br><font size=2 face="sans-serif"> subscribeRequest.kn_to = tunnelUrl;</font>
<br><font size=2 face="sans-serif"> subscribeRequest.do_method = "route";</font>
<br><font size=2 face="sans-serif"> subscribeRequest.kn_response_format = "flash";</font>
<br><font size=2 face="sans-serif"> subscribeRequest.sendAndLoad("http://yourhost:8080/kn", subscribeReceiver);</font>
<br>
<br><font size=2 face="sans-serif">-Patrick Thompson</font>
<table width=100%>
<tr valign=top>
<td width=100%><font size=2 face="Times New Roman"><br>
</font>
<table width=100%>
<tr>
<td width=100%><font size=2 face="Courier New">> Hi Danda,<br>
> <br>
> Funny you should mention that! Someone is actively working on it now. <br>
> Patrick, would you like to reply? JP<br>
> <br>
> <br>
> --- mod-pubsub-developer-admin@li... wrote:<br>
></font>
<br><font size=2 face="Courier New">>> Hi,<br>
>> <br>
>> I"m about to attempt to create a flash client for subscribing (no <br>
>> publishing necessary) to a pubsub server.<br>
>> <br>
>> I found the "0.1" code release of flash_pubsub in the mod_pubsub <br>
>> distro. I was wondering if any more work has been done on this since <br>
>> the library was released.<br>
>> <br>
>> regards,<br>
>> <br>
>> Dan Libby<br>
</font></table>
<br></table>
<br>
<br><font size=2 face="Verdana"> </font>
--=_alternative 0060E7C588256F62_=--
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/