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 &quot;not-too-distant future.&quot;</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">&nbsp; &nbsp; &nbsp; &nbsp; // setup tunnel</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; var tunnelUrl = &quot;/who/anonymous/s/&quot; + Math.random().toString().substring(2,9) + &quot;/kn_journal&quot;;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; var tunnel = new pubSubSocket (&quot;yourhost&quot;, 8080);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; var message = new pubSubData(&quot;flash&quot;);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; message.setFromPath(tunnelUrl);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; message.setMethod(&quot;route&quot;);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; tunnel.onData = function (msg) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // handle message ...</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace(&quot;[&quot; + msg.split(&quot;\r\n&quot;) + &quot;]&quot;); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; tunnel.send(message);</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; // send subscription</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; var subscribeRequest = new LoadVars();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; var subscribeReceiver = new LoadVars();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; subscribeRequest.kn_from = &quot;/what/imagepublish&quot;;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; subscribeRequest.kn_to = tunnelUrl;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; subscribeRequest.do_method = &quot;route&quot;;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; subscribeRequest.kn_response_format = &quot;flash&quot;;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; subscribeRequest.sendAndLoad(&quot;http://yourhost:8080/kn&quot;, 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">&gt; Hi Danda,<br>
&gt; &nbsp;<br>
&gt; Funny you should mention that! &nbsp;Someone is actively working on it now. <br>
&gt; Patrick, would you like to reply? &nbsp;JP<br>
&gt; <br>
&gt; <br>
&gt; --- mod-pubsub-developer-admin@li... wrote:<br>
&gt;</font>
<br><font size=2 face="Courier New">&gt;&gt; Hi,<br>
&gt;&gt; <br>
&gt;&gt; I&quot;m about to attempt to create a flash client for subscribing (no <br>
&gt;&gt; publishing necessary) to a pubsub server.<br>
&gt;&gt; <br>
&gt;&gt; I found the &quot;0.1&quot; code release of flash_pubsub in the mod_pubsub <br>
&gt;&gt; distro. &nbsp;I was wondering if any more work has been done on this since <br>
&gt;&gt; the library was released.<br>
&gt;&gt; <br>
&gt;&gt; regards,<br>
&gt;&gt; <br>
&gt;&gt; Dan Libby<br>
</font></table>
<br></table>
<br>
<br><font size=2 face="Verdana">&nbsp;</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/