<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-9858241-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<?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>Flex, Flash, AS3, PHP: From Newby to Newby!</title>
	<atom:link href="http://newbycodecorner.000space.com/feed" rel="self" type="application/rss+xml" />
	<link>http://newbycodecorner.000space.com</link>
	<description></description>
	<lastBuildDate>Mon, 14 Sep 2009 17:04:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Axiis ColumnChart for Beginners (Spanish)</title>
		<link>http://newbycodecorner.000space.com/archives/149</link>
		<comments>http://newbycodecorner.000space.com/archives/149#comments</comments>
		<pubDate>Mon, 14 Sep 2009 11:26:21 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Axiis]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Videotutorial]]></category>
		<category><![CDATA[columnchart]]></category>
		<category><![CDATA[spanish]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://newbycodecorner.000space.com/?p=149</guid>
		<description><![CDATA[Hi there,
I just uploaded my first videotutorial on how to creat columncharts with axiis. I hope you like it. 
The code will be uploaded in the next days.
  
Cheers,
Christian
]]></description>
			<content:encoded><![CDATA[<p>Hi there,</p>
<p>I just uploaded my first videotutorial on how to creat columncharts with <a href="http://www.axiis.org">axiis</a>. I hope you like it. </p>
<p>The code will be uploaded in the next days.</p>
<p><object width="400" height="300"><param name="movie" value="http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/flvplayer.swf"></param><param name="quality" value="high"></param><param name="bgcolor" value="#FFFFFF"></param><param name="flashVars" value="thumb=http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/FirstFrame.jpg&#038;containerwidth=1280&#038;containerheight=818&#038;content=http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/ll.mp4"></param><param name="allowFullScreen" value="true"></param><param name="scale" value="showall"></param><param name="allowScriptAccess" value="always"></param><param name="base" value="http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/"></param>  <embed src="http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="400" height="300" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/FirstFrame.jpg&#038;containerwidth=1280&#038;containerheight=818&#038;content=http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/ll.mp4" allowFullScreen="true" base="http://content.screencast.com/users/cwaidelich/folders/Tutoriales/media/82d40a12-8de3-43a1-90c6-71cb41786ec8/" scale="showall"></embed></object></p>
<p>Cheers,</p>
<p>Christian</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/149/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Artwork updated</title>
		<link>http://newbycodecorner.000space.com/archives/140</link>
		<comments>http://newbycodecorner.000space.com/archives/140#comments</comments>
		<pubDate>Mon, 10 Aug 2009 14:51:40 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://newbycodecorner.000space.com/?p=140</guid>
		<description><![CDATA[I just updated some of a kind of artwork of mine. This is more a personal thing, because I always liked to draw the first thing that comes into my mind. This was created end of 2008 when I was taking my first clases of Administration. Feel free to comment.
This images are also in Flickr.
Christian
]]></description>
			<content:encoded><![CDATA[<p>I just updated some of a <a href="http://newbycodecorner.000space.com/artwork">kind of artwork of mine</a>. This is more a personal thing, because I always liked to draw the first thing that comes into my mind. This was created end of 2008 when I was taking my first clases of Administration. Feel free to comment.</p>
<p>This images are also in <a href="http://www.flickr.com/photos/40010099@N05/sets/72157621999398534/">Flickr</a>.</p>
<p>Christian</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/140/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Classes must not be nested / An internal build error has occurred. Right-click for more information.</title>
		<link>http://newbycodecorner.000space.com/archives/123</link>
		<comments>http://newbycodecorner.000space.com/archives/123#comments</comments>
		<pubDate>Mon, 27 Jul 2009 17:12:08 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[An internal build error has occurred. Right-click for more information]]></category>
		<category><![CDATA[Classes must not be nested]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Solved]]></category>

		<guid isPermaLink="false">http://newbycodecorner.000space.com/?p=123</guid>
		<description><![CDATA[I have been getting in the past weeks this error everytime I use Flex Builder 4 alpha in Linux. It happens randomly. 
My solution is to change the compiler in FlexBuilder. Just rightclick on the project Folder -> -> Propeties -> Flex Compiler -> Flex SDK Version . Change to another version. And then change [...]]]></description>
			<content:encoded><![CDATA[<p>I have been getting in the past weeks this error everytime I use Flex Builder 4 alpha in Linux. It happens randomly. <img src="http://newbycodecorner.000space.com/wp-content/uploads/2009/07/post1.jpg" alt="Error" title="Error" width="539" height="124" class="aligncenter size-full wp-image-125" /></p>
<p>My solution is to change the compiler in FlexBuilder. Just rightclick on the project Folder -> -> Propeties -> Flex Compiler -> Flex SDK Version . Change to another version. And then change it back.</p>
<p><img src="http://newbycodecorner.000space.com/wp-content/uploads/2009/07/post3.jpg" alt="post3" title="post3" width="765" height="591" class="aligncenter size-full wp-image-127" /></p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/123/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DataBinding and Model for Newby&#8217;s</title>
		<link>http://newbycodecorner.000space.com/archives/113</link>
		<comments>http://newbycodecorner.000space.com/archives/113#comments</comments>
		<pubDate>Tue, 21 Jul 2009 20:53:01 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[databinding]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://newbycodecorner.000space.com/?p=113</guid>
		<description><![CDATA[After learning how to create a custom Event, I decided to try to make a DataBinding Model. Finally I did it. 
Again, I decided to create the same application but with a Model as in my previous post.
This time I needed to show/hide a button in the main application when the user clicked on a [...]]]></description>
			<content:encoded><![CDATA[<p>After learning how to create a custom Event, I decided to try to make a DataBinding Model. Finally I did it. </p>
<p>Again, I decided to create the same application but with a Model as in <a href="http://newbycodecorner.000space.com/?p=78">my previous post</a>.</p>
<p>This time I needed to show/hide a button in the main application when the user clicked on a button in the component. I extended the code, by trying to manipulate a second component.</p>
<p>This is the final file:</p>
<p style="text-align: center;"><span class='flash'><span id='flash-databinding-and-model-for-newbys5.01500486818E+39'></span></span>
<script type='text/javascript'>
var params = {
allowfullscreen: 'true'
};var flashvars = null
swfobject.embedSWF('http://newbycodecorner.000space.com/wp-content/uploads/2009/07/DataBindingExample.swf', 'flash-databinding-and-model-for-newbys5.01500486818E+39', '300', '150', '9.0.0', '', flashvars, params, '');
</script></p>
<h1><span style="color: #339966;"><em>1. Step</em></span></h1>
<p>First you have to create a Actioncript Class. In my case I created it in a Model Folder. I used a Singleton Template I found on the web. It basically creates an instance and checks that the instance is not repeated. First the template:</p>
<div class="codecolorer-container actionscript3 dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span> model<br />
<span style="color: #000000;">&#123;</span><br />
<br />
&nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ButtonModel<br />
&nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// HERE YOU SHOULD CREATE THE GLOBAL VARIABLES</span><br />
<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> instance<span style="color: #000066; font-weight: bold;">:</span>ButtonModel<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ButtonModel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp;<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> instance <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span> <span style="color: #000000;">&#41;</span><br />
&nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">throw</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;there can be only one instance of ChatModel&quot;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp;<span style="color: #000000;">&#125;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>ButtonModel<br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp;<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> instance == <span style="color: #0033ff; font-weight: bold;">null</span> <span style="color: #000000;">&#41;</span><br />
&nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; instance = <span style="color: #0033ff; font-weight: bold;">new</span> ButtonModel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #0033ff; font-weight: bold;">return</span> instance<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Now you can define new Variables. In this case I needed a Boolean, which I call ButtonVisible</p>
<div class="codecolorer-container actionscript3 dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> ButtonVisible<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=boolean%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:boolean.html"><span style="color: #004993;">Boolean</span></a> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<h1><span style="color: #339966;"><em>2. Step</em></span></h1>
<p>Now that I defined a new Bindable Variable, I can access it everywhere I want, lets say the main application:</p>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> </span><br />
<span style="color: #009900;"> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">&quot;absolute&quot;</span> <span style="color: #000066;">xmlns:components</span>=<span style="color: #ff0000;">&quot;components.*&quot;</span> <span style="color: #000066;">viewSourceURL</span>=<span style="color: #ff0000;">&quot;srcview/index.html&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp;<br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #339933;">&lt;![CDATA[</span><br />
<span style="color: #339933;"> &nbsp; &lt;b&gt;import model.ButtonModel;&lt;/b&gt;</span><br />
<span style="color: #339933;"> &nbsp;]]&gt;</span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:VBox<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;components:Component1</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Button</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;AppButton&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;AppButton&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; <span style="color: #000066;">visible</span>=<span style="color: #ff0000;">&quot;&lt;b&gt;</span></span>{model.ButtonModel.getInstance().ButtonVisible}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/b<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>&quot; /&gt;<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;components:component2</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; <br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:VBox<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<br />
&nbsp;<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<h1><span style="color: #339966;"><em>3. Step</em></span></h1>
<p>Lastly I can manipulate it in a component.</p>
<div class="codecolorer-container actionscript3 dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000066; font-weight: bold;">?&gt;</span><br />
<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Canvas xmlns<span style="color: #000066; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> <span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp;<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span><br />
&nbsp; <br />
&nbsp; &nbsp;<span style="color: #0033ff; font-weight: bold;">import</span> model<span style="color: #000066; font-weight: bold;">.</span>ButtonModel<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp;<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> clickHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>model<span style="color: #000066; font-weight: bold;">.</span>ButtonModel<span style="color: #000066; font-weight: bold;">.</span>getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>ButtonVisible == <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;model<span style="color: #000066; font-weight: bold;">.</span>ButtonModel<span style="color: #000066; font-weight: bold;">.</span>getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>ButtonVisible = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;model<span style="color: #000066; font-weight: bold;">.</span>ButtonModel<span style="color: #000066; font-weight: bold;">.</span>getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>ButtonVisible = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp;<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp;<br />
&nbsp;<span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Button id=<span style="color: #990000;">&quot;compButton&quot;</span> label=<span style="color: #990000;">&quot;ComponentButton&quot;</span> <span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;true&quot;</span> <br />
&nbsp; <span style="color: #004993;">click</span>=<span style="color: #990000;">&quot;clickHandler(event)&quot;</span><span style="color: #000066; font-weight: bold;">/&gt;</span><br />
<br />
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Canvas<span style="color: #000066; font-weight: bold;">&gt;</span></div></div>
<p>Hope it helps.</p>
<p>ChristianDataBindingExample</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/113/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What if phps mail() doesn&#039;t work: Yet another workaround.</title>
		<link>http://newbycodecorner.000space.com/archives/30</link>
		<comments>http://newbycodecorner.000space.com/archives/30#comments</comments>
		<pubDate>Tue, 21 Jul 2009 15:30:53 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[mail() workaround]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://newbycodecorner.wordpress.com/?p=30</guid>
		<description><![CDATA[A client needed a basic contact form, but the webhost didn&#8217;t allow mail() in their scripts. This is what I did:
1. Step
I created a form that sends the required info to this file: createxml.php.
function writeXML&#40;$name, $email, $text, $newsletter=&#34;true&#34;&#41;
&#123;
&#160; &#160; if &#40;getenv&#40;HTTP_X_FORWARDED_FOR&#41;&#41; &#123;
&#160;$ip_address = getenv&#40;HTTP_X_FORWARDED_FOR&#41;;
&#160; &#160; &#125; else &#123;
&#160;$ip_address = getenv&#40;REMOTE_ADDR&#41;;
&#160; &#160; &#125;

&#160; &#160; $myFile = [...]]]></description>
			<content:encoded><![CDATA[<p>A client needed a basic contact form, but the webhost didn&#8217;t allow mail() in their scripts. This is what I did:</p>
<h1><span style="color: #339966;"><em>1. Step</em></span></h1>
<p>I created a form that sends the required info to this file: createxml.php.</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> writeXML<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$email</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #000088;">$newsletter</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/getenv"><span style="color: #990000;">getenv</span></a><span style="color: #009900;">&#40;</span>HTTP_X_FORWARDED_FOR<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp;<span style="color: #000088;">$ip_address</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/getenv"><span style="color: #990000;">getenv</span></a><span style="color: #009900;">&#40;</span>HTTP_X_FORWARDED_FOR<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp;<span style="color: #000088;">$ip_address</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/getenv"><span style="color: #990000;">getenv</span></a><span style="color: #009900;">&#40;</span>REMOTE_ADDR<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$myFile</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;form.xml&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$fh</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$myFile</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp;<span style="color: #000088;">$rvar</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp;<span style="color: #000088;">$rvar</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$today</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;F j, Y, g:i a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$stringData</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&amp;lt;form&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span> &amp;lt;name&amp;gt;<span style="color: #006699; font-weight: bold;">$name</span>&amp;lt;/name&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span> &amp;lt;email&amp;gt;<span style="color: #006699; font-weight: bold;">$email</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&amp;lt;/email&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span> &amp;lt;ttexto&amp;gt;<span style="color: #006699; font-weight: bold;">$text</span>&amp;lt;/ttexto&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span> &amp;lt;newsletter &amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #006699; font-weight: bold;">$newsletter</span>&amp;lt;/newsletter&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span> &amp;lt;ip&amp;gt;<span style="color: #006699; font-weight: bold;">$ip_address</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;&amp;lt;/ip&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span> &amp;lt;date&amp;gt;<span style="color: #006699; font-weight: bold;">$today</span>&amp;lt;/date&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span>&amp;lt;/form&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #339933;">,</span> <span style="color: #000088;">$stringData</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$rvar</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
<p>What the function does is to create a xml file (form.xml) with the following structure:</p>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;form<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>$name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;email<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>$email<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/email<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ttexto<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>$text<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ttexto<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;newsletter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>$newsletter<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/newsletter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>$ip_address<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;date<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>$today<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/date<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<h1><span style="color: #339966;"><em>2. Step</em></span></h1>
<p>In my Linux machine I created a script calling the form.xml file every 30 min. If there was a diference in the file he downloads with the file he downloaded 30 min ago, he would send an email to the person who needs to know if a new email arrived.</p>
<p>Here the script (checkmail.sh):</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#!/bin/sh<br />
cd ~/pr/<br />
wget http://www.somedomain.com/form.xml<br />
diff form.xml form.xml.old<br />
if [ $? = 1 ];then<br />
/usr/local/bin/email -s &quot;New Web Mail&quot; cwaidelich@emailme.com &amp;lt; &nbsp;mailtext.txt<br />
fi<br />
rm form.xml.old<br />
mv form.xml form.xml.old</div></div>
<h1><span style="color: #339966;"><em>3. Step</em></span></h1>
<p>and finally my Air App that reads the xml file from the web (this I created in FlexBuilder Alpha4 in Linux):</p>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:WindowedApplication</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">&quot;absolute&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;565&quot;</span> </span><br />
<span style="color: #009900;"> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">applicationComplete</span>=<span style="color: #ff0000;">&quot;httpRSS.send()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp;<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Style</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;Mail.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp;<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:HTTPService</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;httpRSS&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://www.somewebpagecom/form.xml&quot;</span> <span style="color: #000066;">resultFormat</span>=<span style="color: #ff0000;">&quot;object&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Panel</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;reader&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Mail Reader&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;550&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp;<br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGrid</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;entries&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;{reader.width-25}&quot;</span> <span style="color: #000066;">dataProvider</span>=<span style="color: #ff0000;">&quot;{httpRSS.lastResult.form}&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">itemClick</span>=<span style="color: #ff0000;">&quot;{body.text=httpRSS.lastResult.form[entries.selectedIndex].ttexto}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;name&quot;</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;Nombre&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;E-Mail&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span> <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;date&quot;</span> <span style="color: #000066;">headerText</span>=<span style="color: #ff0000;">&quot;Fecha&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:DataGrid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:TextArea</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;body&quot;</span> <span style="color: #000066;">editable</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;{reader.width-25}&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;250&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Panel<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:WindowedApplication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Hope it helps!</p>
<p>Christian</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/30/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comunication between Components &#8211; How to (without DataBinding)</title>
		<link>http://newbycodecorner.000space.com/archives/78</link>
		<comments>http://newbycodecorner.000space.com/archives/78#comments</comments>
		<pubDate>Tue, 21 Jul 2009 11:16:06 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[comunication]]></category>
		<category><![CDATA[Custom Event]]></category>

		<guid isPermaLink="false">http://newbycodecorner.wordpress.com/?p=78</guid>
		<description><![CDATA[I spend the last few days trying to create a comunication between a Component and the main Application. My goal is to create for every State a individual component. Something like this:

I needed to tell the main application to change the State when the user clicked on the button on the component.
This is the final [...]]]></description>
			<content:encoded><![CDATA[<p>I spend the last few days trying to create a comunication between a Component and the main Application. My goal is to create for every State a individual component. Something like this:</p>
<p><img class="aligncenter size-full wp-image-82" title="Comunication between components" src="http://newbycodecorner.000space.com/wp-content/uploads/2009/07/idea1.png" alt="Comunication between components" width="412" height="217" /></p>
<p>I needed to tell the main application to change the State when the user clicked on the button on the component.</p>
<p>This is the final file:</p>
<p style="text-align: center;"><span class='flash'><span id='flash-comunication-between-components-how-to-without-databinding5.01500486818E+39'></span></span>
<script type='text/javascript'>
var params = {
allowfullscreen: 'true'
};var flashvars = null
swfobject.embedSWF('http://newbycodecorner.000space.com/wp-content/uploads/2009/07/ComponentConectionExample.swf', 'flash-comunication-between-components-how-to-without-databinding5.01500486818E+39', '257', '167', '9.0.0', '', flashvars, params, '');
</script></p>
<h1><span style="color: #339966;"><em>1. Step</em></span></h1>
<p>So I started with this as my main Application file:</p>
<pre>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">&quot;absolute&quot;</span> </span><br />
<span style="color: #009900;"> <span style="color: #000066;">initialize</span>=<span style="color: #ff0000;">&quot;currentState='State1'&quot;</span> <span style="color: #000066;">xmlns:components</span>=<span style="color: #ff0000;">&quot;components.*&quot;</span> </span><br />
<span style="color: #009900;"> <span style="color: #000066;">viewSourceURL</span>=<span style="color: #ff0000;">&quot;srcview/index.html&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;257&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;167&quot;</span> <span style="color: #000066;">borderStyle</span>=<span style="color: #ff0000;">&quot;solid&quot;</span> </span><br />
<span style="color: #009900;"> <span style="color: #000066;">borderColor</span>=<span style="color: #ff0000;">&quot;#192C35&quot;</span> <span style="color: #000066;">borderThickness</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">themeColor</span>=<span style="color: #ff0000;">&quot;#1800FF&quot;</span> </span><br />
<span style="color: #009900;"> <span style="color: #000066;">backgroundGradientAlphas</span>=<span style="color: #ff0000;">&quot;[1.0, 1.0]&quot;</span> <span style="color: #000066;">backgroundGradientColors</span>=<span style="color: #ff0000;">&quot;[#FFFFFF, #FFFFFF]&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp;<br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:states<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:State</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;State1&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;state1&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:AddChild<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:VBox</span> <span style="color: #000066;">horizontalCenter</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Label</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;This is the State 1&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;label1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;components:myComponent</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;componentID&quot;</span> &nbsp;</span><br />
<span style="color: #009900;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;224&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;94&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:VBox<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:AddChild<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:State<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:State</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;State2&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;state2&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:AddChild<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:VBox</span> <span style="color: #000066;">horizontalCenter</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Label</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;This is the State 2&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Button</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;Return&quot;</span> <span style="color: #000066;">click</span>=<span style="color: #ff0000;">&quot;currentState='State1'&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:VBox<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:AddChild<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:State<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:states<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
</pre>
<p>And here my component based on a TitleWindow:</p>
<pre>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:TitleWindow</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;400&quot;</span> </span><br />
<span style="color: #009900;"> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;300&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;This is a Component&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
<br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Label</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Click on the button to switch state&quot;</span> &nbsp;<span style="color: #000066;">x</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">&quot;36&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Button</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;This is a Button Component&quot;</span> <span style="color: #000066;">x</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">&quot;62&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:TitleWindow<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
</pre>
<h1><span style="color: #339966;"><em>2. Step</em></span></h1>
<p>Now you have to create a custom Event <strong>in the Component</strong> within a Metatag like this:</p>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Metadata<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;[Event(name=&quot;switchState&quot;, type=&quot;flash.events.Event&quot;)]<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Metadata<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #808080; font-style: italic;">&lt;!--</span><br />
<span style="color: #808080; font-style: italic;">switchState is the global name of the Event</span><br />
<span style="color: #808080; font-style: italic;"> --&gt;</span></div></div>
<h1><span style="color: #339966;"><em>3. Step</em></span></h1>
<p>We create a ClickEvent in the Button in the Component. The Button ends up looking like this:</p>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Button</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;This is a Button Component&quot;</span> <span style="color: #000066;">click</span>=<span style="color: #ff0000;">&quot;clickEvent(event)&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; <span style="color: #000066;">x</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">&quot;62&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
<p>And the ClickHandler which dispaches the Event in the same component like this.</p>
<div class="codecolorer-container actionscript3 dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> clickEvent<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clickEventObject<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;switchState&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span>clickEventObject<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp;<span style="color: #000000;">&#125;</span></div></div>
<h1><span style="color: #339966;"><em>4. Step</em></span></h1>
<p>Finally the only thing left to do is to call the event in our main application in the component tag, like this:</p>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;components:myComponent</span> <span style="color: #000066;">switchState</span>=<span style="color: #ff0000;">&quot;currentState='State2'&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;componentID&quot;</span> &nbsp;<span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;224&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;94&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
<p>To resume: I create an Event which is inserted in the component tag in the application (in this case, the Event is called switchState) to connect this event with the click Event on the Button, you create a EventHandler in the component that dispaches the Event. Thats all.</p>
<p><a href="http://newbycodecorner.000space.com/wp-content/uploads/2009/07/src.rar">Download the sourcecode in RAR Format</a></p>
<p>Christian</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/78/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to control when your kids should go to sleep</title>
		<link>http://newbycodecorner.000space.com/archives/55</link>
		<comments>http://newbycodecorner.000space.com/archives/55#comments</comments>
		<pubDate>Fri, 10 Jul 2009 20:19:45 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Parentalcontrol]]></category>
		<category><![CDATA[Shutdown]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://newbycodecorner.wordpress.com/?p=55</guid>
		<description><![CDATA[This is weird and I normally don&#8217;t do this, but some person came to me and told me that her son stayed up until 4am in the morning, sitting in front of this damn computer and she couldn&#8217;t do anything about it. She asked me to help her, and this is what I did:
Please note: [...]]]></description>
			<content:encoded><![CDATA[<p>This is weird and I normally don&#8217;t do this, but some person came to me and told me that her son stayed up until 4am in the morning, sitting in front of this damn computer and she couldn&#8217;t do anything about it. She asked me to help her, and this is what I did:</p>
<p><em>Please note: I try to make this as open source as posible and as least user-friendly as I can, because I don&#8217;t want this to become an Virus Inspiration or something of a kind. This has one propuse: Help my friend and hopefully some other parent. If you have questions on how to make this work, pls email me: cwaidelich AT gmail DOT com.</em></p>
<p>System OS: <span style="color:grey;">WIN XP // havn&#8217;t tried it in other OS, would be nice to know if it works.</span></p>
<p>Two files:</p>
<p>main.bat</p>
<pre>[code lang="dos"]
@ECHO OFF

CLS <span style="color:grey;">// clears screen</span>
AT 3:15PM "C:\WINDOWS\cw_shutd.bat" <span style="color:grey;">// creates a Task to execute
at a specific time (this case: 3:15pm)</span>
ATTRIB +H %WINDIR%\TASKS\* <span style="color:grey;">// hides all Tasks, so the Users cannot detect
them and deletes them</span>

IF %TIME% GTR 15 GOTO SDWN <span style="color:grey;">// checks if time is &gt; than 15:00 hourse, if
so, go to SDWN (remember goto?)</span>
GOTO END <span style="color:grey;">// if not, goto END</span>

:SDWN <span style="color:grey;">// start SDWN function</span>
SHUTDOWN -S -C ";)" <span style="color:grey;">// Shutsdown</span>
GOTO END

:END
[/code]</pre>
<p>and shutd.bat:</p>
<pre><span style="color:red;">
@ECHO OFF
SHUTDOWN -S -C "TIME TO SLEEP"
</span></pre>
<p>I saved them in C:\WINDOWS\ and hide them.<br />
Then make main.bat run as StartUp Script, following this <a href="http://techsupt.winbatch.com/ts/T000001048F90.html">link</a>.</p>
<p>Hope it works!</p>
<p>Christian</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/55/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Adobe Air on Linux</title>
		<link>http://newbycodecorner.000space.com/archives/19</link>
		<comments>http://newbycodecorner.000space.com/archives/19#comments</comments>
		<pubDate>Tue, 07 Jul 2009 19:15:01 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[how to]]></category>

		<guid isPermaLink="false">http://newbycodecorner.wordpress.com/?p=19</guid>
		<description><![CDATA[1. Download the latest Air Version for Linux here. Im using Adobe AIR 1.5.1 Linux , Español &#124; 13.0 MB on Ubuntu 8.04.2
2. I like to have my applications in the /opt/ folder so my next step was:
sudo mv AbodeAIRInstaler.bin /opt/
3.
cd /opt/
4.
sudo chmod 777 AdobeAIRInstaler.bin
5.
./AdobeAIRInstaller.bin
6.

7. You will have to insert your root password.
8.

9.

10.

]]></description>
			<content:encoded><![CDATA[<p>1. Download the latest Air Version for Linux <a href="http://get.adobe.com/es/air/">here</a>. Im using <em>Adobe AIR 1.5.1 Linux , Español | 13.0 MB</em> on Ubuntu 8.04.2</p>
<p>2. I like to have my applications in the /opt/ folder so my next step was:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo mv AbodeAIRInstaler.bin /opt/</div></div>
<p>3.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /opt/</div></div>
<p>4.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo chmod 777 AdobeAIRInstaler.bin</div></div>
<p>5.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">./AdobeAIRInstaller.bin</div></div>
<p>6.<br />
<img src="http://newbycodecorner.files.wordpress.com/2009/07/air1.png" alt="" /></p>
<p>7. You will have to insert your root password.</p>
<p>8.<br />
<img src="http://newbycodecorner.files.wordpress.com/2009/07/air2.png" alt="" /></p>
<p>9.<br />
<img src="http://newbycodecorner.files.wordpress.com/2009/07/air3.png" alt="" /></p>
<p>10.<br />
<img src="http://newbycodecorner.files.wordpress.com/2009/07/air4.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/19/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Need a program for your social life?</title>
		<link>http://newbycodecorner.000space.com/archives/17</link>
		<comments>http://newbycodecorner.000space.com/archives/17#comments</comments>
		<pubDate>Sat, 04 Jul 2009 00:27:41 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[all in one]]></category>
		<category><![CDATA[aplication]]></category>
		<category><![CDATA[crossplatform]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[msn]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://newbycodecorner.wordpress.com/?p=17</guid>
		<description><![CDATA[Seriosly, need a program that handels Twitter, Facebook, Gmail, ICQ, Hotmail, Yahoo and others?
Here you go:Digsby
Just try it out.
Christian
]]></description>
			<content:encoded><![CDATA[<p>Seriosly, need a program that handels Twitter, Facebook, Gmail, ICQ, Hotmail, Yahoo and others?</p>
<p>Here you go:<a href="http://www.digsby.com/">Digsby</a></p>
<p>Just try it out.</p>
<p>Christian</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/17/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excelent email program in linux to send from command line</title>
		<link>http://newbycodecorner.000space.com/archives/10</link>
		<comments>http://newbycodecorner.000space.com/archives/10#comments</comments>
		<pubDate>Fri, 03 Jul 2009 22:08:47 +0000</pubDate>
		<dc:creator>cw</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://newbycodecorner.wordpress.com/?p=10</guid>
		<description><![CDATA[Looking for a program that sends emails with attachments and as html from commandline?
You have to have a look at this: http://www.cleancode.org/projects/email 
Usage:
email -s &#34;Subject&#34; --html destiny@domain.com &#38;lt; mail1.txt
mail1.txt looks like this:
just some text
I just created a little script to send to a lot of people. It consisted of two files:

sendmails.sh
mailreci.txt

mailreci.txt just lists in each [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for a program that sends emails with attachments and as html from commandline?</p>
<p>You have to have a look at this: <a href="http://www.cleancode.org/projects/email">http://www.cleancode.org/projects/email </a></p>
<p>Usage:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">email -s &quot;Subject&quot; --html destiny@domain.com &amp;lt; mail1.txt</div></div>
<p>mail1.txt looks like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">just some text</div></div>
<p>I just created a little script to send to a lot of people. It consisted of two files:</p>
<ul>
<li>sendmails.sh</li>
<li>mailreci.txt</li>
</ul>
<p>mailreci.txt just lists in each line a destination mail adress like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">foo@faa.com<br />
fee@fuu.com<br />
du@da.com</div></div>
<p>and</p>
<p>sendmails.sh looks like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#!/bin/bash<br />
clear<br />
# Set the field seperator to a newline<br />
IFS=&quot;<br />
&quot;<br />
# Loop through the file<br />
for line in `cat mailreci.txt`;do<br />
email -s &quot;NUEVA VENTA DE BODEGA - BETTINA SPITZ&quot; --html $line &amp;lt; mail1.txt<br />
if [ $? = 0 ]; then<br />
echo &quot;$line sent.&quot;<br />
else<br />
echo &quot;$line not sent. ------------- OJO&quot;<br />
fi<br />
<br />
done</div></div>
<p>Everything in one folder of course.</p>
<p>If you have any questions please feel free to comment.</p>
<p>Christian</p>
]]></content:encoded>
			<wfw:commentRss>http://newbycodecorner.000space.com/archives/10/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
