<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>devl.net &#187; OpenLaszlo</title>
	<atom:link href="http://devl.net/category/programming/openlaszlo/feed/" rel="self" type="application/rss+xml" />
	<link>http://devl.net</link>
	<description>/home/devl/</description>
	<lastBuildDate>Wed, 20 Jan 2010 14:49:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenLaszlo and symlinks</title>
		<link>http://devl.net/2010/01/openlaszlo-and-symlinks/</link>
		<comments>http://devl.net/2010/01/openlaszlo-and-symlinks/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 14:48:47 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>

		<guid isPermaLink="false">http://devl.net/?p=296</guid>
		<description><![CDATA[I develop OpenLaszlo apps on different OL versions. But as I usually need the code to be the same, I use symlinks (symbolic links / soft links) to my apps within the tomcat server of OpenLaszlo. This leads to problems with non-lzx-files. Tomcat just doesn&#8217;t recognize other files.
There are some Sites out there, that point [...]]]></description>
			<content:encoded><![CDATA[<p>I develop OpenLaszlo apps on different OL versions. But as I usually need the code to be the same, I use symlinks (symbolic links / soft links) to my apps within the tomcat server of OpenLaszlo. This leads to problems with non-lzx-files. Tomcat just doesn&#8217;t recognize other files.<br />
There are some Sites out there, that point out a solution to this. But every time I install a new version of OpenLaszlo, I search for a minimum of 30 minutes until I found it. I think I&#8217;ve already bookmarked it, but it&#8217;s lost in thousands of OL bookmarks.<br />
However, I thought to blog this solution. So I won&#8217;t need to search anymore in the future <img src='http://devl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So if you&#8217;re facing problems with symlinks using OpenLaszlo, just edit this file:<br />
<strong>/path/to/openlaszlo/Server/tomcat-5.0.24/conf/LPS/localhost/lps.xml</strong></p>
<pre>&lt;?xml version='1.0' encoding='utf-8'?&gt;
&lt;Context docBase="../../lps-x.x.x" path="/lps-x.x.x"&gt;
...
&lt;/Context&gt;</pre>
<p>And apply the following changes:</p>
<pre>&lt;?xml version='1.0' encoding='utf-8'?&gt;
&lt;Context docBase="../../lps-x.x.x" path="/lps-x.x.x" <strong>allowLinking="true"</strong>&gt;
...
&lt;/Context&gt;</pre>
<p>That&#8217;s it.<br />
Thanks again to the <a href="http://forum.openlaszlo.org/showthread.php?p=38114">OL Forums (source)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2010/01/openlaszlo-and-symlinks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenLaszlo 4.4 Released</title>
		<link>http://devl.net/2009/07/openlaszlo-4-4-released/</link>
		<comments>http://devl.net/2009/07/openlaszlo-4-4-released/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 16:34:41 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Laszlo Systems]]></category>

		<guid isPermaLink="false">http://devl.net/?p=30</guid>
		<description><![CDATA[I think I&#8217;m a little bit late with blogging about it, but I thought to share the latest news from Laszlo Systems with you. They just released OpenLaszlo 4.4 with a lot of improvements. This is a short quote:
We are pleased to announce that OpenLaszlo 4.4 is available now. You can download it from the OpenLaszlo [...]]]></description>
			<content:encoded><![CDATA[<p>I think I&#8217;m a little bit late with blogging about it, but I thought to share the latest news from Laszlo Systems with you. They just <a href="http://weblog.openlaszlo.org/archives/2009/06/openlaszlo-44-released/">released OpenLaszlo 4.4</a> with a lot of improvements. This is a short quote:</p>
<blockquote><p>We are pleased to announce that OpenLaszlo 4.4 is available now. You can download it from the <a style="text-decoration: none; color: #005596;" href="http://www.openlaszlo.org/download">OpenLaszlo Download</a> page. It is the recommended platform for all application development for the SWF8, SWF9, and DHTML runtimes. OpenLaszlo 4.4 is another major release, with almost 180 bugs fixed since OpenLaszlo 4.3. The majority of bug fixes in this release are specific to the DHTML runtime; however, general improvements to all runtimes have also been added and we strongly recommend that you take advantage of them by upgrading.</p></blockquote>
<p>(http://weblog.openlaszlo.org/archives/2009/06/openlaszlo-44-released/)</p>
<p>I&#8217;m really looking forward to trying it. To be honest I still use OL 4.1.1 cause I&#8217;ve had no time yet to migrate to 4.2.0. However, I should do it before I have to migrate my applications to another higher version.</p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2009/07/openlaszlo-4-4-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visualslider in productive usage</title>
		<link>http://devl.net/2009/06/visualslider-in-productive-usage/</link>
		<comments>http://devl.net/2009/06/visualslider-in-productive-usage/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 16:13:53 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[Slideshow]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=140</guid>
		<description><![CDATA[While watching for some referer statistics on synie.net, I stumbled across a thread in the OL forums. Here it is:
http://forum.openlaszlo.org/showthread.php?t=13698
LaSlow writes about using my visualslider for a product show case. Just visit this site to see it in action:
http://www.smartcard24.com/
It&#8217;s hot, isn&#8217;t it? 
I had to reload the website multiple times in order to see it, [...]]]></description>
			<content:encoded><![CDATA[<p>While watching for some referer statistics on synie.net, I stumbled across a thread in the OL forums. Here it is:<br />
<a class="linkification-ext" title="Linkification: http://forum.openlaszlo.org/showthread.php?t=13698" href="http://forum.openlaszlo.org/showthread.php?t=13698">http://forum.openlaszlo.org/showthread.php?t=13698</a></p>
<p>LaSlow writes about using my visualslider for a product show case. Just visit this site to see it in action:<br />
<a class="linkification-ext" title="Linkification: http://www.smartcard24.com/" href="http://www.smartcard24.com/">http://www.smartcard24.com/</a><br />
It&#8217;s hot, isn&#8217;t it? <img src='http://devl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
I had to reload the website multiple times in order to see it, instead of an advertisement. But it looks great. It&#8217;s nice to see what people do with my code snippets. Just recently I got an e-mail from LaSlow with the extended code. It was you, wasn&#8217;t it? I&#8217;ll try to prepare it for upload during the next 2 weeks.</p>
<p>So, in any case &#8211; if you did some improvements to some of my code snippets, feel free to send them to me. I&#8217;ll publish them here.</p>
<p>Thanks to LaSlow for sharing the link.</p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2009/06/visualslider-in-productive-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sockets/IRC using Flash/Openlaszlo without server side proxy</title>
		<link>http://devl.net/2009/01/socketsirc-using-flashopenlaszlo-without-server-side-proxy/</link>
		<comments>http://devl.net/2009/01/socketsirc-using-flashopenlaszlo-without-server-side-proxy/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 01:15:58 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[IRC]]></category>
		<category><![CDATA[sockets]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=96</guid>
		<description><![CDATA[some weeks ago I&#8217;ve been playing around with the possibility of flash of using sockets. I tried to connect to various services, but unless there is any crossdomain.xml on the server it is just impossible. Well, there is a way to use a server side proxy to create such connections, as it&#8217;s allowed to open [...]]]></description>
			<content:encoded><![CDATA[<p>some weeks ago I&#8217;ve been playing around with the possibility of flash of using sockets. I tried to connect to various services, but unless there is any crossdomain.xml on the server it is just impossible. Well, there is a way to use a server side proxy to create such connections, as it&#8217;s allowed to open sockets from the flash client to the same domain, but this isn&#8217;t always the best solution. For example if you want to connect to an IRC server, you will be limited to a few connections. Besides that, not everybody has the possibility to run a proxy server for such services.<br />
After some hours of experiments, I got a solution. It&#8217;s not very nice and it&#8217;s questionable whether this could ever be used in productive environments &#8211; but it&#8217;s pretty nice to play with <img src='http://devl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In this example I used OpenLaszlo to do the flash part &#8211; but it can be easily reproduced with actionscript. Furthermore I decided to explain it with an IRC network and as for that (to keep it simple) I used a library to do the protocol stuff. But you can extend this to any service, that uses network connections.<br />
It&#8217;s pretty simple:</p>
<ul>
<li>First we create a Java Applet, which does all the socket stuff</li>
<li>This Applet will be signed to be able to open connections outside of its sandbox</li>
<li>Then the Flash Client will be designed</li>
<li>And after all that, a small set of Javascript Functions are needed to make them communicate</li>
</ul>
<p><a href="http://www.synie.net/irc/bin">This is the example</a>. It&#8217;s quick&#8217;n'dirty, but it works. You have to accept the Certificate. If you don&#8217;t the network connections won&#8217;t work.</p>
<p>Keep on reading for examples &#8230;<br />
<span id="more-96"></span></p>
<p>Lets start with the Java Applet. I&#8217;m not a Java guru and I bet my code is a little bit messy. So I advice to use it for learning purpose only <img src='http://devl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
There are two classes. The first one is the main class:</p>
<p><strong>1.1 The Applet: </strong><a href="http://devl.net/downloads/file/1" title="Downloaded 117 times">Proxy.java (2009-07-03)</a><br />
It creates the instace for the sockets and offers some methods, which are used by the Javascript to communicate with the Flacs Client.</p>
<blockquote><p><code>package irc.proxy;</code></p>
<p>import java.applet.Applet;<br />
import java.awt.*;<br />
import java.security.*;</p>
<p>public class Proxy extends Applet {<br />
IRC bot;<br />
public String bufIn;<br />
public String bufIn2;<br />
String chan;<br />
String nick;</p>
<p>public void init()<br />
{<br />
bufIn = &#8220;&#8221;;<br />
setBackground( Color.white );<br />
}</p>
<p>public void connect(final String srv, final String port, String chn, String nck)<br />
{<br />
chan = chn;<br />
nick = nck;<br />
try {<br />
bot = new IRC();<br />
bot.setMain(this);<br />
bot.setNick(nck);<br />
bufIn = (String) AccessController.doPrivileged(new PrivilegedAction() {<br />
public Object run() {<br />
String str = &#8220;&#8221;;<br />
try {<br />
bot.connect(srv, Integer.parseInt(port));<br />
} catch(Exception e) {str = &#8220;system#&#8221;+e.toString()+&#8221;\n&#8221;;}<br />
return str;<br />
}<br />
});<br />
bot.joinChannel(chn);<br />
} catch(Exception e) {bufIn += &#8220;system#&#8221;+e.toString()+&#8221;\n&#8221;;}<br />
}</p>
<p>public String getMessages()<br />
{<br />
String ret = bufIn;<br />
bufIn = &#8220;&#8221;;<br />
return ret;<br />
}</p>
<p>public void sendMessage(String str)<br />
{<br />
bot.sendMessage(chan, str);<br />
}</p>
<p>public boolean inited()<br />
{<br />
return true;<br />
}</p>
<p>public boolean connected()<br />
{<br />
return bot.isConnected();<br />
}</p>
<p>public void paint( Graphics g ) {<br />
g.setColor( Color.black );<br />
g.drawString(&#8221;IRC Proxy, Buffer: &#8220;+bufIn, 5, 15);<br />
}<br />
}</p></blockquote>
<p><strong>IRC bot</strong> is the object for network connections. This could be any class for any connections. But in this particular case, I&#8217;ve used <a href="http://www.jibble.org/pircbot.php">PircBot</a> to connect to an IRC network.<br />
<strong>bufIn</strong> is a buffer for the incoming messages. I&#8217;ll explain this one a little bit later.<br />
<strong>chan</strong> and <strong>nick</strong> are just specific variables for IRC.</p>
<p><strong>int()</strong> and <strong>paint()</strong> can be ignored, as I used them just for some debugging outputs.</p>
<p><strong>connect()</strong> is the most complicated method about this pretty simple class. It will be called by the Flash Client using the Javascript funktions and is used to make our IRC object connect to the network. setMain, setNick and joinChannel are self-explaining. But there is one tricky part:</p>
<blockquote><p><code> bufIn = (String) AccessController.doPrivileged(new PrivilegedAction() {<br />
public Object run() {<br />
String str = "";<br />
try {<br />
bot.connect(srv, Integer.parseInt(port));<br />
} catch(Exception e) {str = "system#"+e.toString()+"\n";}<br />
return str;<br />
}<br />
});</code></p></blockquote>
<p>When the sockets are created, we have to make sure, that there are enough rights to do so. To achieve that, <strong>AccessController.doPrivileged</strong> is used to run the thread containing the socket generation with enough privileges. Besides that, I check for any errors and write them back to bufIn. I&#8217;ll have a closer look at that privilege stuff, soon.</p>
<p><strong>getMessages()</strong> is called by the Flash using Javascript to get the incoming messages from the IRC server. Unfortunately there is no clean way to invoke Javascript functions within the Applet. So there has to be a JS service, which checks the buffer (bufIn) every n milliseconds.</p>
<p><strong>sendMessage()</strong> is incoked to send a message to the IRC server.</p>
<p><strong>inited()</strong> just returns true and is used by JS to check whether the Applet is already loaded. (If inited() doesn&#8217;t exist, it&#8217;s not yet loaded <img src='http://devl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p><strong>connected()</strong> is also used by JS to check whether the network object is already connected. (Flash needs to know that)</p>
<p><strong>1.2 The Applet: </strong><a href="http://devl.net/downloads/file/2" title="Downloaded 110 times">IRC.java (2009-07-03)</a><br />
This class contains the sockets and connection related stuff. In this case, it&#8217;s very very thin, because I use <a href="http://www.jibble.org/pircbot.php">PircBot</a> for the IRC logic.</p>
<blockquote><p><code>package irc.proxy;</code></p>
<p>import org.jibble.pircbot.*;</p>
<p>public class IRC extends PircBot {<br />
Proxy main;<br />
public IRC() {<br />
}</p>
<p>public void setMain(Proxy p) {<br />
main = p;<br />
}</p>
<p>public void setNick(String n) {<br />
this.setName(n);<br />
}</p>
<p>public void onMessage(String channel, String sender, String login, String hostname, String message) {<br />
main.bufIn += channel+&#8221;#&#8221;+sender+&#8221;#&#8221;+message+&#8221;\n&#8221;;<br />
}<br />
}</p></blockquote>
<p>The only thing that&#8217;s worth to mention is the method <strong>onMessage()</strong>. It&#8217;s inherited by PircBot class and fires as soon as there are Messages to be sent to the client. In this case, they&#8217;re brought into a quick&#8217;n'dirty format (channel#sender#message) and written into the bufIn of the Proxy class.</p>
<p><strong>1.3 The Applet: Compiling fun with <a href="http://devl.net/downloads/file/3" title="Downloaded 104 times">build.xml (2009-07-03)</a></strong><br />
It&#8217;s time to compile the proxy Applet. I used Ant to do so. If you want to do the same, I recommend the following steps:<br />
First create a folder for our application and some subdirs where everything takes place (don&#8217;t rename the subdirs):</p>
<blockquote><p><code>#mkdir irc<br />
#cd irc<br />
#mkdir build<br />
#mkdir -p src/irc/proxy<br />
#mkdir -p dest/lib<br />
#mkdir lib</code></p></blockquote>
<p>Place both, <a href="http://devl.net/downloads/file/1" title="Downloaded 117 times">Proxy.java (2009-07-03)</a> and <a href="http://devl.net/downloads/file/2" title="Downloaded 110 times">IRC.java (2009-07-03)</a> in ./src/irc/proxy. Place the <a href="http://devl.net/downloads/file/3" title="Downloaded 104 times">build.xml (2009-07-03)</a> in the main directory ./ &#8211; or use your own build.xml. Download <a href="http://www.jibble.org/pircbot.php">PircBot</a> and place the pircbot.jar into ./lib and ./dest/lib.<br />
Now everything is prepared and you&#8217;re ready to build. Make sure, you&#8217;re in the &#8220;root&#8221; directory of our little application and enter</p>
<blockquote><p><code>#ant</code></p></blockquote>
<p>You should be thanked with something like</p>
<blockquote><p><code>BUILD SUCCESSFUL<br />
Total time: 0 seconds</code></p></blockquote>
<p>There will be a Proxy.jar within the ./dest folder. It includes irc/proxy/IRC.class and irc/proxy/Proxy.class. Those paths are very important for the embed tags.</p>
<p><strong>1.4 The Applet: Signing it</strong><br />
Now the magic takes place. To make the Applet be able to establish connections outside of its sandbox, it has to be signed. Thanks to <a href="http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html">www-personal.umich.edu</a> where everything is described in a very easy way.<br />
Just launch</p>
<blockquote><p><code>#keytool -genkey</code></p></blockquote>
<p>to generate the key pair and use</p>
<blockquote><p><code>#jarsigner dest/Proxy.jar <em>key</em><br />
#jarsigner dest/lib/pircbot.jar <em>key</em></code></p></blockquote>
<p>to sign both &#8211; the Applet and the used library.</p>
<p>Now, since the Applet is signed and we&#8217;re using the AccessController, the Applet can establish any connection to any service. Nice!</p>
<p><strong>2.1 Flash Client: A short look at <a href="http://devl.net/downloads/file/4" title="Downloaded 117 times">irc.lzx (2009-07-03)</a></strong><br />
This is a very very short review of the Flash Client I&#8217;ve written. Some OpenLaszlo developers might be pleased, but I think the most of you will use Flex or Flash or whatever. It just shows, how the data is used and how you can access the Applet.</p>
<blockquote><p><code>&lt;canvas width="400" height="300"&gt;<br />
&lt;attribute name="nick" type="string" value="sYtest" /&gt;<br />
&lt;attribute name="server" type="string" value="<a class="linkification-ext" title="Linkification: irc://irc.quakenet.org" href="irc://irc.quakenet.org">irc.quakenet.org</a>" /&gt;<br />
&lt;attribute name="port" type="string" value="6667" /&gt;<br />
&lt;attribute name="channel" type="string" value="#greatboard" /&gt;<br />
&lt;script&gt;<br />
flash.external.ExternalInterface.addCallback("onMessage", this, onMessage);<br />
flash.external.ExternalInterface.addCallback("isLoaded", this, isLoaded);<br />
flash.external.ExternalInterface.addCallback("isConnected", this, isConnected);<br />
flash.external.ExternalInterface.addCallback("inited", this, inited);<br />
function onMessage() {<br />
LzBrowser.callJS("getBufIn", canvas.receiveMessage, null);<br />
}<br />
function isLoaded() {<br />
//canvas.sendConnect();<br />
}<br />
function isConnected() {<br />
canvas.msgs.setAttribute("text", "Connected!");<br />
}<br />
function inited() {<br />
return true;<br />
}<br />
&lt;/script&gt;<br />
&lt;method name="receiveMessage" args="str"&gt;<br />
if (!str)<br />
return;<br />
var msg;<br />
while (str)<br />
{<br />
if (str.indexOf("\n") &amp;lt;= 0)<br />
break;<br />
msg = str.substring(0, str.indexOf("\n"));<br />
str = str.substring(str.indexOf("\n")+1);<br />
if (msg.indexOf("#") == 0)<br />
var type = msg.substring(0, msg.indexOf("#", 1));<br />
else<br />
var type = msg.substring(0, msg.indexOf("#"));<br />
if (type == "system")<br />
{<br />
var txt = msg.substring(msg.indexOf("#")+1);<br />
canvas.msgs.setAttribute("text", canvas.msgs.text+"&amp;lt;br /&amp;gt;"+"&amp;lt;b&amp;gt;System:&amp;lt;/b&amp;gt; "+txt);<br />
}<br />
else if(type.substring(0,1) == "#")<br />
{<br />
var who = msg.substring(msg.indexOf("#", 1)+1, msg.indexOf("#", msg.indexOf("#", 1)+1));<br />
var txt = msg.substring(msg.indexOf("#", msg.indexOf("#", 1)+1)+1);<br />
canvas.msgs.setAttribute("text", canvas.msgs.text+"&amp;lt;br /&amp;gt;"+who+": "+txt);<br />
}<br />
else<br />
{<br />
canvas.msgs.setAttribute("text", canvas.msgs.text+"&amp;lt;br /&amp;gt;"+msg);<br />
}<br />
canvas.msgs.sb.page(1);<br />
}<br />
&lt;/method&gt;<br />
&lt;method name="sendMessage" args="str"&gt;<br />
LzBrowser.callJS("sendMessage",  null, str);<br />
&lt;/method&gt;<br />
&lt;method name="sendConnect"&gt;<br />
LzBrowser.callJS("sendConnect",  null, canvas.server, canvas.port, canvas.channel, canvas.nick);<br />
&lt;/method&gt;<br />
&lt;view width="380" height="250" x="10" y="10" bgcolor="0x000000" /&gt;<br />
&lt;view name="msgs" width="378" height="248" x="11" y="11" bgcolor="0xffffff"&gt;<br />
&lt;attribute name="text" type="string" value="Connecting ..." /&gt;<br />
&lt;handler name="ontext"&gt;<br />
this.sb.page(1);<br />
&lt;/handler&gt;<br />
&lt;text width="360" multiline="true" text="${parent.text}" /&gt;<br />
&lt;scrollbar name="sb" /&gt;<br />
&lt;/view&gt;<br />
&lt;edittext name="msg" x="10" y="270" height="20" width="380" doesenter="true"&gt;<br />
&lt;method name="doEnterDown"&gt;<br />
if (this.text != "")<br />
{<br />
parent.sendMessage(this.text);<br />
parent.receiveMessage(canvas.channel+"#"+canvas.nick+"#"+this.text+"\n");<br />
this.setAttribute("text", "");<br />
}<br />
&lt;/method&gt;<br />
&lt;/edittext&gt;<br />
&lt;view width="100%" height="100%" bgcolor="0xffffff"&gt;<br />
&lt;/view&gt;&lt;view x="${<a class="linkification-ext" title="Linkification: http://parent.width/2-this.width/2" href="http://parent.width/2-this.width/2">parent.width/2-this.width/2</a>}" y="${<a class="linkification-ext" title="Linkification: http://parent.height/2-this.height/2" href="http://parent.height/2-this.height/2">parent.height/2-this.height/2</a>}"&gt;<br />
&lt;edittext name="srv" text="<a class="linkification-ext" title="Linkification: irc://irc.quakenet.org" href="irc://irc.quakenet.org">irc.quakenet.org</a>" width="100" height="20" /&gt;<br />
&lt;edittext name="prt" text="6667" width="100" height="20" /&gt;<br />
&lt;edittext name="chn" text="#greatboard" width="100" height="20" /&gt;<br />
&lt;edittext name="nck" text="Nickname" width="100" height="20" /&gt;<br />
&lt;button width="100" text="login" height="20"&gt;<br />
&lt;handler name="onclick"&gt;<br />
canvas.setAttribute("server", parent.srv.text);<br />
canvas.setAttribute("port", parent.prt.text);<br />
canvas.setAttribute("channel", parent.chn.text);<br />
canvas.setAttribute("nick", parent.nck.text);<br />
canvas.sendConnect();<br />
parent.parent.destroy();<br />
&lt;/handler&gt;<br />
&lt;/button&gt;<br />
&lt;simplelayout spacing="10" /&gt;<br />
&lt;/view&gt;<br />
&lt;/canvas&gt;</code></p></blockquote>
<p>The most important task takes place within the &lt;script&gt; tag.</p>
<blockquote><p><code>flash.external.ExternalInterface.addCallback(name, this, method)</code></p></blockquote>
<p>is used to register a Method do be accessed by Javascript. The first parameter is the public name of the method, the second one the object &#8216;this&#8217; references to and the last one is the reference to the Method within the Flash. I think this is quite the same as in Actionscript.<br />
So with this statement, you can register as much public methods as needed. This is very helpful.</p>
<p><strong>onMessage()</strong> is called by the Javascript, when bufIn has messages. Here we have to do a short detour. I could pass the bufIn to onMessages(), but then Safari would crash (no one knows why). So onMessages is just used to make the Flash know, there are new messages. Within that, callJS is fired (it&#8217;s a OpenLaszlo function, that invokes a Javascript function and returns the value) that&#8217;ll make JS return bufIn to the method receiveMessage (see below).</p>
<p><strong>isLoaded()</strong> is fired, when the Applet (yes, the Applet, not the flash) is loaded.</p>
<p><strong>isConnected()</strong> is fired when the Applet has connected to a server.</p>
<p><strong>inited()</strong> is used by the Javascript to check whether the flash is loaded.</p>
<p><strong>receiveMessage</strong> (see onMessage()) is the method, that receives the bufIn of the Applet. Everything I do is to parse it (remember the chan#sender#msg thing?) and display it within &lt;msgs&gt;.</p>
<p><strong>sendMessage</strong> is used to send a message to the Applet and <strong>sendConnect</strong> is used to make the Applet connect to a IRC server.</p>
<p>Everything else are some elements, which display the content.</p>
<p><strong>2.2 Flash Client: Compile it</strong><br />
You can use this example to write your own flash client. The OpenLaszlo Users can compile it easily by putting the <a href="http://www.synie.net/irc/src/irc.lzx.txt">irc.lzx</a> into the OpenLaszlo server, run it via the Browser and deploy it as a swf8 SOLO application. Don&#8217;t use the HTML code provided by the server. In the next step, we&#8217;ll create our own. Just rename the generated <a class="linkification-ext" title="Linkification: irc://irc.lzx.swf8.swf" href="irc://irc.lzx.swf8.swf">irc.lzx.swf8.swf</a> to irc.swf and place it into the under 1.3 created ./dest/ folder.</p>
<p><strong>3.1 HTML/Javascript: The <a href="http://devl.net/downloads/file/5" title="Downloaded 106 times">index.html (2009-07-03)</a></strong><br />
This is the most tricky part about our Client. We&#8217;ll make the Applet and the Flash Client communicate with each other.</p>
<blockquote><p><code>&lt;!DOCTYPE html<br />
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a class="linkification-ext" title="Linkification: http://www.w3.org/TR/html4/loose.dtd" href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>"&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;sYject&lt;/title&gt;<br />
&lt;script type="text/javascript"&gt;<br />
var bufIn;<br />
function getMessages() {<br />
setTimeout("getMessages()", 1000);<br />
if (typeof thisMovie("externalInterfaceExample").inited != 'undefined' &amp;&amp; typeof document.applets["irc"].inited != 'undefined')<br />
{<br />
bufIn = document.applets["irc"].getMessages();<br />
if (bufIn &amp;&amp; bufIn != "")<br />
{<br />
thisMovie("externalInterfaceExample").onMessage();<br />
// Cant push args. Safari will crash ...<br />
}<br />
}<br />
}<br />
function sendMessage(str) {<br />
document.applets["irc"].sendMessage(str+"\n");<br />
}<br />
function sendConnect(srv, port, chan, nick) {<br />
document.applets["irc"].connect(srv, port, chan, nick);<br />
}<br />
var inited = false;<br />
function isLoaded() {<br />
if (inited)<br />
return;<br />
setTimeout("isLoaded()", 500);<br />
if (typeof thisMovie("externalInterfaceExample").inited != 'undefined' &amp;&amp; typeof document.applets["irc"].inited != 'undefined')<br />
{<br />
inited = true;<br />
thisMovie("externalInterfaceExample").isLoaded();<br />
isConnected();<br />
getMessages();<br />
}<br />
}<br />
var connected = false;<br />
function isConnected() {<br />
if (connected)<br />
return;<br />
setTimeout("isConnected()", 500);            if (typeof thisMovie("externalInterfaceExample").inited != 'undefined' &amp;&amp; typeof document.applets["irc"].inited != 'undefined')<br />
{<br />
if (document.applets["irc"].inited())<br />
{<br />
connected = true;<br />
thisMovie("externalInterfaceExample").isConnected();<br />
}<br />
}<br />
}<br />
function getBufIn() {<br />
var ret = bufIn;<br />
bufIn = "";<br />
return String(ret);<br />
}<br />
function thisMovie(movieName) {<br />
if (navigator.appName.indexOf("Microsoft") != -1) {<br />
return window[movieName];<br />
}<br />
else {<br />
return document[movieName];<br />
}<br />
}<br />
&lt;/script&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;<br />
&lt;meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"&gt;<br />
&lt;/head&gt;<br />
&lt;body onload="javascript:isLoaded();"&gt;<br />
&lt;applet name="irc" width="1" height="1" archive="Proxy.jar,lib/pircbot.jar" code="irc/proxy/Proxy.class"&gt;<br />
&lt;PARAM NAME="code" VALUE="irc/proxy/Proxy.class"&gt;<br />
&lt;PARAM NAME="archive" VALUE="Proxy.jar,lib/pircbot.jar"&gt;<br />
Java muss aktiviert sein.<br />
&lt;/applet&gt;<br />
&lt;object id="externalInterfaceExample" classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" border="0" style="padding: 0;" width="400" height="300" codebase="<a class="linkification-ext" title="Linkification: http://active.macromedia.com/flash2/cabs/swflash.cab#version=8,0,0,0" href="http://active.macromedia.com/flash2/cabs/swflash.cab#version=8,0,0,0">http://active.macromedia.com/flash2/cabs/swflash.cab#version=8,0,0,0</a>"&gt;<br />
&lt;param name="movie" value="irc.swf?lzproxied=false"&gt;<br />
&lt;param name="quality" value="high"&gt;<br />
&lt;param name="scale" value="exactfit"&gt;<br />
&lt;param name="menu" value="true"&gt;<br />
&lt;param name="bgcolor" value="#ffffff"&gt;<br />
&lt;param name="allowScriptAccess" value="always"&gt;         &lt;embed name="externalInterfaceExample" src="irc.swf?lzproxied=false" quality="high" scale="exactfit" menu="false" bgcolor="#ffffff" width="400" height="300" swLiveConnect="false" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://<br />
<a class="linkification-ext" title="Linkification: http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash</a>"&gt;&lt;/embed&gt;<br />
&lt;/object&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p></blockquote>
<p>Save this file into the under 1.3 created ./dest/ folder. After that you&#8217;re already able to run the whole application. Just notice, that some browsers don&#8217;t behave correctly if the applet is runned locally. So you first have to upload the dest/ folder to a webserver, to run it.</p>
<p>First have a look at the <strong>applet</strong> tag. I&#8217;ve used the code and archive params in both ways, to make sure every browser understands it. &#8220;archive&#8221; contains our created Proxy.jar and the library pircbot.jar. &#8220;code&#8221; points to the class Proxy.class in the codepath irc/proxy/.</p>
<p>The <strong>object</strong> tag is a bit tricky. Notice the id of object and the name of embed. Both have to be named &#8220;externalInterfaceExample&#8221;. Otherwise our public methods of the Flash Client won&#8217;t be accessible by Javascript. Furthermore some browsers really seem to need the allowScriptAccess param.</p>
<p>Have a look at the <strong>thisMovie()</strong> function. It is used to access the public methods of the flash. (e.g. thisMovie(&#8221;externalInterfaceExample&#8221;).isConnected())</p>
<p>First of all, after the document is loaded, the <strong>isLoaded()</strong> function will be called. It will recursively call itself untill both the Applet and the Flash are loaded.</p>
<p>When they are loaded, <strong>isConnected()</strong> will be called, that recursively calls itself untill the Applet has connected to a server.</p>
<p>After isLoaded() and isConnected() are done, the both methods with the same name at the flash will be invoked. So the flash knows, that everything is loaded and the Applet has already connected.<br />
Furthermore <strong>getMessages()</strong> will be invoked, which will recursively call itself during the whole session. It checks the Applet for new messages (document.applets["irc"].getMessages()) and invokes the Flash Client (thisMovie(&#8221;externalInterfaceExample&#8221;).onMessage()) to read the fetched messages.</p>
<p><strong>4.1 Done <img src='http://devl.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </strong><br />
That&#8217;s it.<br />
The Applet handles the connections and stores the messages in bufIn.<br />
The Javascript pushes bufIn from the Applet to the Flash Client and pushes messages the other direction.<br />
The Flash Client displays everything.</p>
<p>You can download the whole irc/ directory (<a href="http://devl.net/downloads/file/6" title="Downloaded 110 times">irc.tar (2009-07-03)</a>) to be able to compile it in an easier way.<br />
If you like it, leave me a comment.<br />
Feel free to use the codes under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. Use it on your own risk.</p>
<p>I think I will extend the Flash Client the next few weeks in order to show what&#8217;s possible with it.<br />
Thanks for reading.</p>
<p>[EDIT]<br />
I&#8217;ve tested it with FireFox, Safari and InternetExplorer.<br />
Opera is the only browser, that doesn&#8217;t work. I&#8217;m on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2009/01/socketsirc-using-flashopenlaszlo-without-server-side-proxy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenLaszlo and Full Screen / Kiosk Mode</title>
		<link>http://devl.net/2008/11/openlaszlo-and-full-screen-kiosk-mode/</link>
		<comments>http://devl.net/2008/11/openlaszlo-and-full-screen-kiosk-mode/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 16:34:54 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Full Screen]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=85</guid>
		<description><![CDATA[I read about OpenLaszlo and full screen mode at the Laszlo forums. So I thought to publish a very small demo of how to create a solo app, that uses this feature. Here is a demo:

It&#8217;s pretty easy, as you can access the AS objects directly with OpenLaszlo:
&#60;canvas&#62;
&#60;script&#62;
Stage.scaleMode = "noScale";
Stage.align = "TL";
function toggleFullScreen() {
if (Stage["displayState"] [...]]]></description>
			<content:encoded><![CDATA[<p>I read about OpenLaszlo and full screen mode at the <a href="http://forum.openlaszlo.org/showthread.php?t=11871">Laszlo forums</a>. So I thought to publish a very small demo of how to create a solo app, that uses this feature. Here is a demo:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="200" height="200" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="bgcolor" value="#cccccc" /><param name="src" value="http://www.synie.net/fullscreen.swf" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="200" height="200" src="http://www.synie.net/fullscreen.swf" bgcolor="#cccccc" allowfullscreen="true"></embed></object></p>
<p>It&#8217;s pretty easy, as you can access the AS objects directly with OpenLaszlo:</p>
<blockquote><p><code>&lt;canvas&gt;<br />
&lt;script&gt;<br />
Stage.scaleMode = "noScale";<br />
Stage.align = "TL";<br />
function toggleFullScreen() {<br />
if (Stage["displayState"] == "normal") {<br />
Stage["displayState"] = "fullScreen";<br />
} else {<br />
Stage["displayState"] = "normal";<br />
}<br />
}<br />
&lt;/script&gt;<br />
&lt;button text="Toggle Fullscreen" onclick="toggleFullScreen()" x="${<a class="linkification-ext" title="Linkification: http://parent.width/2-this.width/2" href="http://parent.width/2-this.width/2">parent.width/2-this.width/2</a>}" y="${<a class="linkification-ext" title="Linkification: http://parent.height/2-this.height/2" href="http://parent.height/2-this.height/2">parent.height/2-this.height/2</a>}"/&gt;<br />
&lt;/canvas&gt;</code></p></blockquote>
<p>Deploy it as a solo app and integrate it into your website like this:</p>
<blockquote><p><code>&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="<a class="linkification-ext" title="Linkification: http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0" href="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0">http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0</a>" width="200" height="200"&gt;<br />
&lt;param name="allowFullScreen" value="true" /&gt;<br />
&lt;param name="movie" value="fullscreen.swf" /&gt;<br />
&lt;embed src="fullscreen.swf" allowFullScreen="true" width="200" height="200" type="application/x-shockwave-flash" pluginspage="<a class="linkification-ext" title="Linkification: http://www.macromedia.com/go/getflashplayer" href="http://www.macromedia.com/go/getflashplayer">http://www.macromedia.com/go/getflashplayer</a>" /&gt;<br />
&lt;/object&gt;</code></p></blockquote>
<p>There it is. Your very own full screen app <img src='http://devl.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
There are some restrictions (like for keyboard input) and I haven&#8217;t tried to use it in a server deployment, yet. So feel free to experiment &#8230;</p>
<p><strong>This method is outdated. With 4.4 there’s a built-in method. Have a look at:</strong><br />
<a href="http://openfuture.rajubitter.com/2009/07/01/openlaszlo-44-released-video-components-improved-full-screen-support-for-swfx/">http://openfuture.rajubitter.com/2009/07/01/openlaszlo-44-released-video-components-improved-full-screen-support-for-swfx/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2008/11/openlaszlo-and-full-screen-kiosk-mode/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Slideshow with OpenLaszlo as a &#8220;Widget&#8221;</title>
		<link>http://devl.net/2008/10/slideshow-with-openlaszlo-as-a-widget/</link>
		<comments>http://devl.net/2008/10/slideshow-with-openlaszlo-as-a-widget/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 19:48:57 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[Slideshow]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=69</guid>
		<description><![CDATA[Hey,
I want to introduce you the previous posted Slideshow created with OpenLaszlo, but this time, you can use it without any knowledge of OpenLaszlo. Just download it and use a simple HTML-embed object, to tell the SWF, which pictures you want to use. This is an Example:

(enlarge)
You can also use your mouse to navigate between [...]]]></description>
			<content:encoded><![CDATA[<p>Hey,</p>
<p>I want to introduce you the previous posted Slideshow created with OpenLaszlo, but this time, you can use it without any knowledge of OpenLaszlo. Just download it and use a simple HTML-embed object, to tell the SWF, which pictures you want to use. This is an Example:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="552" height="302" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.synie.net/visualslider/visualslider.swf?vspic1=res/1.jpg&amp;vspic1w=300&amp;vspic1h=200&amp;vspic2=res/2.jpg&amp;vspic2w=300&amp;vspic2h=200&amp;vspic3=res/3.jpg&amp;vspic3w=300&amp;vspic3h=200&amp;vspic4=res/4.jpg&amp;vspic4w=300&amp;vspic4h=200&amp;vspic5=res/5.jpg&amp;vspic5w=300&amp;vspic5h=200&amp;vspic6=res/6.jpg&amp;vspic6w=300&amp;vspic6h=200&amp;vspic7=res/7.jpg&amp;vspic7w=300&amp;vspic7h=200" /><embed type="application/x-shockwave-flash" width="552" height="302" src="http://www.synie.net/visualslider/visualslider.swf?vspic1=res/1.jpg&amp;vspic1w=300&amp;vspic1h=200&amp;vspic2=res/2.jpg&amp;vspic2w=300&amp;vspic2h=200&amp;vspic3=res/3.jpg&amp;vspic3w=300&amp;vspic3h=200&amp;vspic4=res/4.jpg&amp;vspic4w=300&amp;vspic4h=200&amp;vspic5=res/5.jpg&amp;vspic5w=300&amp;vspic5h=200&amp;vspic6=res/6.jpg&amp;vspic6w=300&amp;vspic6h=200&amp;vspic7=res/7.jpg&amp;vspic7w=300&amp;vspic7h=200"></embed></object><br />
<a href="http://www.synie.net/visualslider/visualslider.swf?vspic1=res/1.jpg&amp;vspic1w=500&amp;vspic1h=332&amp;vspic2=res/2.jpg&amp;vspic2w=500&amp;vspic2h=332&amp;vspic3=res/3.jpg&amp;vspic3w=500&amp;vspic3h=332&amp;vspic4=res/4.jpg&amp;vspic4w=500&amp;vspic4h=332&amp;vspic5=res/5.jpg&amp;vspic5w=500&amp;vspic5h=332&amp;vspic6=res/6.jpg&amp;vspic6w=500&amp;vspic6h=332&amp;vspic7=res/7.jpg&amp;vspic7w=500&amp;vspic7h=332">(enlarge)</a></p>
<p>You can also use your mouse to navigate between the pictures and to start/stop the autmatical slide show.</p>
<p>The code which I used to embed it is:</p>
<blockquote><p><code>&lt;object width="400" height="300"&gt;<br />
&lt;param name="movie" value="visualslider/visualslider.swf"&gt;<br />
&lt;embed src="visualslider/visualslider.swf?vspic1=res/1.jpg&amp;vspic1w=300&amp;vspic1h=200&amp;vspic2=res/2.jpg&amp;vspic2w=300&amp;vspic2h=200&amp;vspic3=res/3.jpg&amp;vspic3w=300&amp;vspic3h=200&amp;vspic4=res/4.jpg&amp;vspic4w=300&amp;vspic4h=200&amp;vspic5=res/5.jpg&amp;vspic5w=300&amp;vspic5h=200&amp;vspic6=res/6.jpg&amp;vspic6w=300&amp;vspic6h=200&amp;vspic7=res/7.jpg&amp;vspic7w=300&amp;vspic7h=200" width="500" height="300"&gt;<br />
&lt;/embed&gt;<br />
&lt;/object&gt;</code></p></blockquote>
<p>It&#8217;s quite simple. You just have to include the SWF file into your HTML document and give it some parameters about which pictures you want to use in the slideshow.<br />
This is the URL to the SWF file I used:</p>
<blockquote><p><code>visualslider/visualslider.swf?vspic1=res/1.jpg&amp;vspic1w=300&amp;vspic1h=200&amp;vspic2=res/2.jpg&amp;vspic2w=300&amp;vspic2h=200&amp;vspic3=res/3.jpg&amp;vspic3w=300&amp;vspic3h=200&amp;vspic4=res/4.jpg&amp;vspic4w=300&amp;vspic4h=200&amp;vspic5=res/5.jpg&amp;vspic5w=300&amp;vspic5h=200&amp;vspic6=res/6.jpg&amp;vspic6w=300&amp;vspic6h=200&amp;vspic7=res/7.jpg&amp;vspic7w=300&amp;vspic7h=200</code></p></blockquote>
<ul>
<li>&#8220;visualslider/visualslider.swf&#8221; is the place, where visualslider.swf is located.</li>
<li>&#8220;?vspic1=&#8221; is the parameter to tell the SWF, which picture (&#8221;res/1.jpg&#8221;) to use.</li>
<li>&#8220;&amp;vspic1w=&#8221; to define the width (&#8221;300&#8243;).</li>
<li>&#8220;&amp;vspic1h=&#8221; to define the height (&#8221;200&#8243;).</li>
<li>After that, I pass the next parameter for the second picture (&#8221;&amp;vspic2=&#8221;), and so on.</li>
<li>You can also define &#8220;&amp;vsms=&#8221; to tell the SWF, how fast it should change the picture. Default is set to 5000.</li>
</ul>
<p>The SWF: <a href="http://devl.net/downloads/file/7" title="Downloaded 195 times">visualslider.tar (2009-07-06)</a><br />
The sourcecode: <a href="http://devl.net/downloads/file/8" title="Downloaded 244 times">main.lzx (2009-07-06)</a>, <a href="http://devl.net/downloads/file/9" title="Downloaded 233 times">visualslider.lzx (2009-07-06)</a> (GPL&#8217;ed)<br />
Click <a href="http://www.synie.net/2008/07/slideshow-for-openlaszlo/">here</a> to see the fully documented Visualslider component.<br />
I hope it&#8217;s useful for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2008/10/slideshow-with-openlaszlo-as-a-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slideshow for OpenLaszlo</title>
		<link>http://devl.net/2008/07/slideshow-for-openlaszlo/</link>
		<comments>http://devl.net/2008/07/slideshow-for-openlaszlo/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:34:59 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[Slideshow]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=42</guid>
		<description><![CDATA[I had to create a Presentation some days ago. As we needed a little slideshow of pictures, within that presentation, I decided to create a little Sliteshow with OpenLaszlo. Maybe it&#8217;s useful for you, so you can use it under the terms of the GPL.
Here is a little Example, created with &#8220;Visualslider&#8221;:
Visualslider.swf
And this one ist [...]]]></description>
			<content:encoded><![CDATA[<p>I had to create a Presentation some days ago. As we needed a little slideshow of pictures, within that presentation, I decided to create a little Sliteshow with OpenLaszlo. Maybe it&#8217;s useful for you, so you can use it under the terms of the GPL.</p>
<p>Here is a little Example, created with &#8220;Visualslider&#8221;:<br />
<a href="http://www.synie.net/visualslider.swf">Visualslider.swf</a></p>
<p>And this one ist quite the same, but with Slides sliding &#8220;circles&#8221;:<br />
<a href="http://www.synie.net/visualslider_c.swf">Visualslider_c.swf</a></p>
<p>You can click on the Slides, to navigate through them. Also you can use the cursor keys, to do the same. With the key &#8220;t&#8221; you can toggle between automatical sliding and manual sliding.</p>
<p>And here is the source code:<br />
<a href="http://devl.net/downloads/file/10" title="Downloaded 302 times">visualslider.lzx (2009-07-06)</a></p>
<p>A little Documentation:</p>
<blockquote><p><strong>&lt;visualslider&gt;</strong></p>
<ul>
<li><strong>Description:</strong><br />
The container view</li>
<li><strong>Attributes:</strong><br />
currentslide &#8211; (readonly) returns the selected slide<br />
slideduration &#8211; the time in ms for the slide-animation<br />
circular &#8211; boolean for circular-sliding<br />
timerms &#8211; the time in ms for automatical sliding<br />
istimerstarted &#8211; (readonly) returns a boolean whether automatical sliding is started or not</li>
<li><strong>Methods:</strong><br />
slideUp() &#8211; select next slide<br />
slideDown() &#8211; select previous slide<br />
slideTo(n) &#8211; select the <em>n</em>th slide<br />
startTimer() &#8211; start automatical sliding<br />
stopTimer() &#8211; stop automatical sliding</li>
</ul>
</blockquote>
<blockquote><p><strong>&lt;visualsliderview&gt;</strong></p>
<ul>
<li><strong>Description:</strong><br />
A slider-view. Must be placed in &lt;visualslider&gt;</li>
<li><strong>Attributes:</strong><br />
originalwidth &#8211; the 100%-width of the view<br />
originalheight &#8211; the 100%-height of the view<br />
currentslide &#8211; (readonly) returns a boolean whether this visualsliderview is selected or not<br />
shadow &#8211; boolean to display a shadow under the visualsliderview<br />
factor &#8211; (readonly) returns a scale-factor with reference to originalwidth and originalheight (useful to scale subviews)<br />
slidenumber &#8211; (readonly) returns the number of the slider</li>
<li><strong>Events:</strong><br />
onstop &#8211; Fires when the animation is finished<br />
onstart &#8211; Fires when the animation is started</li>
</ul>
</blockquote>
<p>Here you can find the zipped source code of the example. This may be helpful to create your own slideshow:<br />
<a href="http://devl.net/downloads/file/11" title="Downloaded 215 times">visualslider.tar (2009-07-06)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2008/07/slideshow-for-openlaszlo/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>OpenLaszlo + Red5 = Voice chat</title>
		<link>http://devl.net/2008/05/openlaszlo-red5-voice-chat/</link>
		<comments>http://devl.net/2008/05/openlaszlo-red5-voice-chat/#comments</comments>
		<pubDate>Fri, 09 May 2008 02:25:01 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[Red5]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=41</guid>
		<description><![CDATA[I have been working a long time with OpenLaszlo and Red5. As my commercial projects take months over moths to be developed, the last two days I just did something really basic. A small voice chat using OpenLaszlo and Red5. It&#8217;s for a freetime project and it&#8217;s planned to be integrated into Joomla. So maybe [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working a long time with OpenLaszlo and Red5. As my commercial projects take months over moths to be developed, the last two days I just did something really basic. A small voice chat using OpenLaszlo and Red5. It&#8217;s for a freetime project and it&#8217;s planned to be integrated into Joomla. So maybe I will release this little app as a Joomla extention, later.<br />
But now, I just want to show you, what you can do with OpenLaszlo and Red5 in a really short time:<br />
<a href="http://www.synie.net/eplsvoicechat.swf">Click here to visit the voice chat.</a></p>
<p>Features are so far:</p>
<ul>
<li> Voice chat</li>
<li> Text chat</li>
<li> User management</li>
<li> Hardware selection</li>
<li> Nice look and feel</li>
<li>And so on &#8230;</li>
</ul>
<p>Let me know, what you think about it. I hope I can show you the application integrated into Joomla as soon as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2008/05/openlaszlo-red5-voice-chat/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>AESCryptLz strikes back ;-)</title>
		<link>http://devl.net/2008/04/aescryptlz-strikes-back/</link>
		<comments>http://devl.net/2008/04/aescryptlz-strikes-back/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 12:21:52 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[AES]]></category>
		<category><![CDATA[Encryption]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=40</guid>
		<description><![CDATA[My last post about AESCryptLz got real good feedback. As I&#8217;m trying out a lot of different encryption algorithms, there is the next one. But this is only a pre-version of the upcoming pack of AESCryptLz. It doesn&#8217;t include an example for Java and it&#8217;s not really commented. But you can use it anyway, because [...]]]></description>
			<content:encoded><![CDATA[<p>My last post about AESCryptLz got real good feedback. As I&#8217;m trying out a lot of different encryption algorithms, there is the next one. But this is only a pre-version of the upcoming pack of AESCryptLz. It doesn&#8217;t include an example for Java and it&#8217;s not really commented. But you can use it anyway, because it&#8217;s doing its job.</p>
<p>To be done:</p>
<ul>
<li> Java backend example</li>
<li> Better documentation</li>
<li> Implementation of MD5 checksums to provide encoding via password</li>
<li> Bug fixes (?)</li>
</ul>
<p>The new Version of AESCryptLz is based on the set of JavaScript functions developed by <a href="http://www.movable-type.co.uk/scripts/aes.html">Chris Veness</a> and it&#8217;s released under the <a href="http://www.fsf.org/licensing/licenses/lgpl.html">LGPL</a>. Thanks a lot to him, for his great work.</p>
<p>In detail, it uses the AES/CTR algorithm without padding. The class generates encrypted byte-arrays and also needs byte-arrays to decrypt them. I&#8217;m not using HEX-Strings anymore, because it&#8217;s much faster, when I&#8217;m doing this calculations without any converting. As I&#8217;m using Red5 for the backend, it&#8217;s really easy to send and get byte-arrays. But I&#8217;ll explain how, next week.<br />
Also I&#8217;ve implemented a way to encrypt using LzIdle. So you can use it to en-/decrypt things in backgrund. The used vector is stored in the first 8 bytes of the generated byte-array. The following bytes are the encrypted text. So it also needs the used vector in the first 8 byte, if you want to decrypt a byte-array, generated by other algorythms.</p>
<p>Here are the files:</p>
<ul>
<li><a href="http://www.synie.net/aescryptlz2.swf">Example application</a></li>
<li>Sourcecode: <a href="http://devl.net/downloads/file/12" title="Downloaded 171 times">aes.lzx (2009-07-06)</a></li>
<li>Example application sourcecode: <a href="http://devl.net/downloads/file/13" title="Downloaded 167 times">aescryptlz2.lzx (2009-07-06)</a></li>
</ul>
<p>I think I am on a good way with this class. It&#8217;s faster and much smaller than the last one.<br />
So stay tuned for any updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2008/04/aescryptlz-strikes-back/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AESCryptLz: OpenLaszlo &amp; AES encryption</title>
		<link>http://devl.net/2008/03/aescryptlz-openlaszlo-aes-encryption/</link>
		<comments>http://devl.net/2008/03/aescryptlz-openlaszlo-aes-encryption/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 18:20:55 +0000</pubDate>
		<dc:creator>sYnie</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenLaszlo]]></category>
		<category><![CDATA[AES]]></category>
		<category><![CDATA[Encryption]]></category>

		<guid isPermaLink="false">http://www.synie.net/?p=39</guid>
		<description><![CDATA[Some days ago, I started to search for a usefull code-snipet to de- and encrypt files or strings in OpenLaszlo. Everything I found were some posts about hash creation. So I started to search for JavaScript solutions to port them to OpenLaszlo. Mixing this with some hash creation algorithms and an own class to handle [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago, I started to search for a usefull code-snipet to de- and encrypt files or strings in OpenLaszlo. Everything I found were some posts about hash creation. So I started to search for JavaScript solutions to port them to OpenLaszlo. Mixing this with some hash creation algorithms and an own class to handle all those functions is compiled together to &#8220;AESCryptLz&#8221;. It can be used to de- and encrypt everything you want.<br />
The used algorithm de-/encrypts via AES/ECB without Padding. You can de-/encrypt with a 128 bit key only. To do so, you can either use a 128 bit hex string or an ASCII string as &#8220;password&#8221;. If you use the ASCII key, then AESCryptLz will generate a MD5 hash out of it, to use it as a 128 bit hex key. All the encrypted data will be returned as a hex string. Also the data you, want to encrypt, needs to be a hex string.<br />
Sounds a bit confusing, but it&#8217;s explained at the top of the source code.</p>
<p>To create this little set of classes, I ported a JavaScript library created by <a href="http://people.eku.edu/styere/">Eugene Styer</a>. He allowed me to use his source code under the GPL. Thanks a lot!<br />
I also used an OpenLaszlo class, ported by <a href="http://forum.openlaszlo.org/showthread.php?t=2630&amp;highlight=md5">Userfriendly</a> and former developed by <a href="http://pajhome.org.uk/crypt/md5">Paul Johnston</a>, released under the BSD licence. Thanks a lot, you too.</p>
<p>I created an own class, modified the mentioned classes and linked them all together. So you can use it under the <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>. <a href="http://www.synie.net/aescryptlz.swf">Here</a> you can find a little example that makes use of AESCryptLz.</p>
<p>The Sourcecode:</p>
<ul>
<li>AESCryptLz source code: <a href="http://devl.net/downloads/file/14" title="Downloaded 164 times">aescryptlz.lzx (2009-07-06)</a></li>
<li> AESCryptLz example source code: <a href="http://devl.net/downloads/file/15" title="Downloaded 160 times">crypttest.lzx (2009-07-06)</a></li>
<li>A Java backend example class: <a href="http://devl.net/downloads/file/16" title="Downloaded 174 times">aesCrypt.java (2009-07-06)</a></li>
<li>The Example: <a href="http://www.synie.net/aescryptlz.swf">Here</a></li>
</ul>
<p>The first one is the AESCryptLz source code. The second one is the code of the shown example. And the third one is a little, quick and dirty Java source code, that shows, how to handle AESCryptLz-encrypted data. This may be usefull for a Java backend.</p>
<p>I&#8217;m looking forward to your feedback.</p>
<p>Kind regards,<br />
Mario</p>
<p>Ps.: To see if it works, try to decode the following message, using the example application with the ASCII key &#8220;synie&#8221;:</p>
<blockquote><p>1e af f3 90 83 02 50 90 a4 9c bc bc 7e 05 d3 78 50 79 ac aa 0f 0d ad 28 98 a7 46 13 b1 49 d7 e2 b9 d1 d9 c7 7a f0 01 0e 88 0d 95 a3 7f b2 52 92 2f 9e 5b 61 e7 67 8a 93 19 d0 5c c0 0c 78 64 e3 e0 f2 4c 4f b5 64 e9 d8 43 89 9d 8e fb 07 d8 e7 b8 ea 07 49 69 fd a7 b3 8d c3 8b 04 19 92 7a be</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://devl.net/2008/03/aescryptlz-openlaszlo-aes-encryption/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
