<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1.3" -->
<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/"
	>

<channel>
	<title>... FlashDersi.com Blog V.1 - Flash - Flex - Apollo - Actionscript 3 - AS3 ...</title>
	<link>http://www.flashdersi.com/flash/blog</link>
	<description>ActionScript 3 by Hakan KIRIK</description>
	<pubDate>Fri, 20 May 2011 12:47:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>
	<language>en</language>
			<item>
		<title>Array düzenlemesi</title>
		<link>http://www.flashdersi.com/flash/blog/?p=66</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=66#comments</comments>
		<pubDate>Fri, 20 May 2011 12:37:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Flash CS5]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=66</guid>
		<description><![CDATA[isim ve skordan oluşan verileri turan array düşünelim. Aynı kişinin en yüksek puanını gösteren yeni bir array oluşturulım buradan. Örnek:
var arr1:Array=new Array();
arr1.push({name:&#8221;hakan&#8221;,points:50});
arr1.push({name:&#8221;hakan&#8221;,points:85});
arr1.push({name:&#8221;hakan&#8221;,points:55});
arr1.push({name:&#8221;martin&#8221;,points:90});
arr1.push({name:&#8221;martin&#8221;,points:55});
arr1.push({name:&#8221;martin&#8221;,points:90});
arr1.push({name:&#8221;kaan&#8221;,points:30});
arr1.push({name:&#8221;kaan&#8221;,points:45});
var namesAndPoints:Array=new Array();
for (var i:uint=0; i&#60;arr1.length; i++)
{
var namecheck:String = arr1[i];
var kontrol:Boolean = false;
for (var ii:uint=0; ii&#60;namesAndPoints.length; ii++)
{
if (namesAndPoints[ii].name == arr1[i].name)
{
if (arr1[i].points &#62; namesAndPoints[ii].points)
{
namesAndPoints[ii].points = arr1[i].points;
}
kontrol=true;
}
}
if (kontrol==false)
{
namesAndPoints.push({name:arr1[i].name,points:arr1[i].points});
}
}
namesAndPoints.sortOn(&#8221;points&#8221;);
namesAndPoints.reverse();
// üstteki iki satır yerine : namesAndPoints.sortOn(&#8221;points&#8221;,Array.DESCENDING);
trace(namesAndPoints[0].name,namesAndPoints[0].points);
trace(namesAndPoints[1].name,namesAndPoints[1].points);
trace(namesAndPoints[2].name,namesAndPoints[2].points);
]]></description>
			<content:encoded><![CDATA[<p>isim ve skordan oluşan verileri turan array düşünelim. Aynı kişinin en yüksek puanını gösteren yeni bir array oluşturulım buradan. Örnek:</p>
<p>var arr1:Array=new Array();<br />
arr1.push({name:&#8221;hakan&#8221;,points:50});<br />
arr1.push({name:&#8221;hakan&#8221;,points:85});<br />
arr1.push({name:&#8221;hakan&#8221;,points:55});<br />
arr1.push({name:&#8221;martin&#8221;,points:90});<br />
arr1.push({name:&#8221;martin&#8221;,points:55});<br />
arr1.push({name:&#8221;martin&#8221;,points:90});<br />
arr1.push({name:&#8221;kaan&#8221;,points:30});<br />
arr1.push({name:&#8221;kaan&#8221;,points:45});</p>
<p>var namesAndPoints:Array=new Array();</p>
<p>for (var i:uint=0; i&lt;arr1.length; i++)<br />
{<br />
var namecheck:String = arr1[i];<br />
var kontrol:Boolean = false;<br />
for (var ii:uint=0; ii&lt;namesAndPoints.length; ii++)<br />
{</p>
<p>if (namesAndPoints[ii].name == arr1[i].name)<br />
{<br />
if (arr1[i].points &gt; namesAndPoints[ii].points)<br />
{<br />
namesAndPoints[ii].points = arr1[i].points;<br />
}<br />
kontrol=true;<br />
}<br />
}<br />
if (kontrol==false)<br />
{<br />
namesAndPoints.push({name:arr1[i].name,points:arr1[i].points});<br />
}<br />
}<br />
namesAndPoints.sortOn(&#8221;points&#8221;);<br />
namesAndPoints.reverse();<br />
// üstteki iki satır yerine : namesAndPoints.sortOn(&#8221;points&#8221;,Array.DESCENDING);</p>
<p>trace(namesAndPoints[0].name,namesAndPoints[0].points);<br />
trace(namesAndPoints[1].name,namesAndPoints[1].points);<br />
trace(namesAndPoints[2].name,namesAndPoints[2].points);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=66</wfw:commentRss>
		</item>
		<item>
		<title>String&#8217;de boşlukları yok etmek (Trim)</title>
		<link>http://www.flashdersi.com/flash/blog/?p=65</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=65#comments</comments>
		<pubDate>Thu, 16 Dec 2010 14:38:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash CS3]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Flash CS4]]></category>

		<category><![CDATA[Flash CS5]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=65</guid>
		<description><![CDATA[&#8221; jj  kjk  &#8220;.replace( /^([\s&#124;\t&#124;\n]+)?(.*)([\s&#124;\t&#124;\n]+)?$/gm, &#8220;$2&#8243; );
&#8221; jj  kjk  &#8220;.replace(/^\s+&#124;\s+$/gs, &#8221;);
]]></description>
			<content:encoded><![CDATA[<p><span style="color: #004993">&#8221; jj  kjk  &#8220;.replace</span><span style="color: #363636">(</span> /^<span style="color: #363636">(</span><span style="color: #363636">[</span>\s|\t|\n<span style="color: #363636">]</span>+<span style="color: #363636">)</span>?<span style="color: #363636">(</span>.*<span style="color: #363636">)</span><span style="color: #363636">(</span><span style="color: #363636">[</span>\s|\t|\n<span style="color: #363636">]</span>+<span style="color: #363636">)</span>?$/gm, <span style="color: #990000">&#8220;$2&#8243;</span> <span style="color: #363636">)</span>;</p>
<p class="CommentFulltext"><span style="color: #004993">&#8221; jj  kjk  &#8220;.</span><font color="#004993">replace<span style="color: #363636"></span></font>(/^\s+|\s+$/gs, &#8221;);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=65</wfw:commentRss>
		</item>
		<item>
		<title>tek bir String ifadeyi objelerden oluşan Array&#8217;e dönüştürmek</title>
		<link>http://www.flashdersi.com/flash/blog/?p=64</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=64#comments</comments>
		<pubDate>Thu, 16 Dec 2010 13:33:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Flash CS5]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=64</guid>
		<description><![CDATA[var str:String = &#8220;{Month:Jan,Profit:2000,Expenses:1500},{Month:Feb,Profit:1000,Expenses:200},{Month:Mar,Profit:1500,Expenses:500}&#8221;;
var expenses:Array = str.split(&#8221;},{&#8221;);
expenses[0] = expenses[0].split(&#8221;{&#8221;)[1];
expenses[expenses.length - 1] = expenses[expenses.length - 1].split(&#8221;{&#8221;)[0];
var arrSon:Array = [];
for (var i:uint=0; i&#60;expenses.length; i++)
{
var obj:Object = {};
for (var ii:uint=0; ii&#60;3; ii++)
{
obj[expenses[i].split(&#8221;,&#8221;)[ii].split(&#8221;:&#8221;)[0]] = expenses[i].split(&#8221;,&#8221;)[ii].split(&#8221;:&#8221;)[1];
}
arrSon.push(obj);
}
trace(arrSon[1].Month);
]]></description>
			<content:encoded><![CDATA[<p>var str:String = &#8220;{Month:Jan,Profit:2000,Expenses:1500},{Month:Feb,Profit:1000,Expenses:200},{Month:Mar,Profit:1500,Expenses:500}&#8221;;<br />
var expenses:Array = str.split(&#8221;},{&#8221;);<br />
expenses[0] = expenses[0].split(&#8221;{&#8221;)[1];<br />
expenses[expenses.length - 1] = expenses[expenses.length - 1].split(&#8221;{&#8221;)[0];</p>
<p>var arrSon:Array = [];<br />
for (var i:uint=0; i&lt;expenses.length; i++)<br />
{<br />
var obj:Object = {};<br />
for (var ii:uint=0; ii&lt;3; ii++)<br />
{<br />
obj[expenses[i].split(&#8221;,&#8221;)[ii].split(&#8221;:&#8221;)[0]] = expenses[i].split(&#8221;,&#8221;)[ii].split(&#8221;:&#8221;)[1];<br />
}<br />
arrSon.push(obj);<br />
}</p>
<p>trace(arrSon[1].Month);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=64</wfw:commentRss>
		</item>
		<item>
		<title>Lokal olarak dosya yazmak</title>
		<link>http://www.flashdersi.com/flash/blog/?p=63</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=63#comments</comments>
		<pubDate>Tue, 19 Oct 2010 08:13:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=63</guid>
		<description><![CDATA[var _xml:XML;
stage.addEventListener(MouseEvent.MOUSE_DOWN, _onMouseDown);
_xml= &#60;xml&#62;
&#60;test&#62;veri&#60;/test&#62;
&#60;/xml&#62;;        ;
function _onMouseDown(e:MouseEvent):void
{
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes(_xml);
var fr:FileReference = new FileReference();
fr.save(ba, &#8220;file.xml&#8221;);
}
]]></description>
			<content:encoded><![CDATA[<p>var _xml:XML;<br />
stage.addEventListener(MouseEvent.MOUSE_DOWN, _onMouseDown);<br />
_xml= &lt;xml&gt;<br />
&lt;test&gt;veri&lt;/test&gt;<br />
&lt;/xml&gt;;        ;</p>
<p>function _onMouseDown(e:MouseEvent):void<br />
{<br />
var ba:ByteArray = new ByteArray();<br />
ba.writeUTFBytes(_xml);<br />
var fr:FileReference = new FileReference();<br />
fr.save(ba, &#8220;file.xml&#8221;);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=63</wfw:commentRss>
		</item>
		<item>
		<title>Basit bir çizim (kalem) uygulaması</title>
		<link>http://www.flashdersi.com/flash/blog/?p=62</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=62#comments</comments>
		<pubDate>Mon, 18 Oct 2010 12:50:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash CS3]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Flash CS4]]></category>

		<category><![CDATA[Flash CS5]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=62</guid>
		<description><![CDATA[boş bir frame&#8217;e bu kodları yazıp deneyiniz:
var kagit:Sprite = new Sprite();
addChild(kagit);
kagit.x = kagit.y = 20;
var g:Graphics = kagit.graphics;
g.beginFill(0xcccccc);
g.drawRect(0, 0, stage.stageWidth - 40, stage.stageHeight - 40);
g.endFill();
kagit.addEventListener(MouseEvent.MOUSE_DOWN, baslaCizim);
function ciz(e:MouseEvent):void
{
g.lineTo(kagit.mouseX, kagit.mouseY);
}
function baslaCizim(e:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_UP, bitirCizim);
addEventListener(MouseEvent.MOUSE_MOVE, ciz);
g.lineStyle(1, Math.random() * 0xffffff);
g.moveTo(kagit.mouseX, kagit.mouseY);
}
function bitirCizim(e:MouseEvent):void
{
removeEventListener(MouseEvent.MOUSE_MOVE, ciz);
stage.removeEventListener(MouseEvent.MOUSE_UP, bitirCizim);
}
]]></description>
			<content:encoded><![CDATA[<p>boş bir frame&#8217;e bu kodları yazıp deneyiniz:</p>
<p>var kagit:Sprite = new Sprite();<br />
addChild(kagit);<br />
kagit.x = kagit.y = 20;<br />
var g:Graphics = kagit.graphics;<br />
g.beginFill(0xcccccc);<br />
g.drawRect(0, 0, stage.stageWidth - 40, stage.stageHeight - 40);<br />
g.endFill();<br />
kagit.addEventListener(MouseEvent.MOUSE_DOWN, baslaCizim);<br />
function ciz(e:MouseEvent):void<br />
{<br />
g.lineTo(kagit.mouseX, kagit.mouseY);<br />
}<br />
function baslaCizim(e:MouseEvent):void<br />
{<br />
stage.addEventListener(MouseEvent.MOUSE_UP, bitirCizim);<br />
addEventListener(MouseEvent.MOUSE_MOVE, ciz);<br />
g.lineStyle(1, Math.random() * 0xffffff);<br />
g.moveTo(kagit.mouseX, kagit.mouseY);<br />
}<br />
function bitirCizim(e:MouseEvent):void<br />
{<br />
removeEventListener(MouseEvent.MOUSE_MOVE, ciz);<br />
stage.removeEventListener(MouseEvent.MOUSE_UP, bitirCizim);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=62</wfw:commentRss>
		</item>
		<item>
		<title>textField ve StyleSheet örneği</title>
		<link>http://www.flashdersi.com/flash/blog/?p=61</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=61#comments</comments>
		<pubDate>Thu, 16 Sep 2010 10:00:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Flash CS4]]></category>

		<category><![CDATA[Flash CS5]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=61</guid>
		<description><![CDATA[var style:StyleSheet = new StyleSheet();
style.setStyle("p", { color: '#FF8000' } );
style.setStyle("a", { color: '#FF0000', textDecoration: 'underline'} );
style.setStyle("a:link", { color: '#FF00FF', textDecoration: 'underline' } );
style.setStyle("a:hover", { color: '#4242FF', textDecoration: 'underline' } );
style.setStyle(".span1", { color: '#000000', fontSize: 20 });
style.setStyle(".span2", { color: '#FF0000', fontSize: 8 }); 

var textField:TextField = new TextField();
textField.autoSize = TextFieldAutoSize.LEFT; 

textField.styleSheet = style;
textField.htmlText = &#8220;&#60;p&#62;if you [...]]]></description>
			<content:encoded><![CDATA[<pre class="jive_text_macro jive_macro_code">var style:StyleSheet = new StyleSheet();
style.setStyle("p", { color: '#FF8000' } );
style.setStyle("a", { color: '#FF0000', textDecoration: 'underline'} );
style.setStyle("a:link", { color: '#FF00FF', textDecoration: 'underline' } );
style.setStyle("a:hover", { color: '#4242FF', textDecoration: 'underline' } );
style.setStyle(".span1", { color: '#000000', fontSize: 20 });
style.setStyle(".span2", { color: '#FF0000', fontSize: 8 }); 

var textField:TextField = new TextField();
textField.autoSize = TextFieldAutoSize.LEFT; 

textField.styleSheet = style;
<span>textField.htmlText = &#8220;&lt;p&gt;if you want,
&lt;span class=&#8217;span1&#8242;&gt;click&lt;/span&gt;
&lt;a href=&#8217;</span><a href="http://www.flashdersi.com/" class="jive-link-external-small">http://www.FlashDersi.com</a><span>&#8216;&gt;FlashDersi&lt;/a&gt;,
&lt;span class=&#8217;span2&#8242;&gt;diger&lt;/span&gt; falan filan&lt;/p&gt;&#8221;;</span></pre>
<p><!-- [DocumentBodyEnd:fe1e7088-a674-4804-8147-071440314fc0] --><!-- BEGIN attachments --><!-- END attachments --><!-- BEGIN helpful &#038; correct buttons --><!-- END helpful &#038; correct buttons --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=61</wfw:commentRss>
		</item>
		<item>
		<title>Input Text&#8217;i geçici olarak devre dışı bırakmak</title>
		<link>http://www.flashdersi.com/flash/blog/?p=60</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=60#comments</comments>
		<pubDate>Tue, 27 Jul 2010 10:18:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=60</guid>
		<description><![CDATA[textKutusu.type=&#8221;dynamic&#8221;;
 yaparak giriş izni iptal edilir.
textKutusu.type=&#8221;input&#8221;;
yaparak tekrar giriş izni verilir.
]]></description>
			<content:encoded><![CDATA[<p><strong>textKutusu.type=&#8221;dynamic&#8221;;</strong></p>
<p> yaparak giriş izni iptal edilir.</p>
<p><strong>textKutusu.type=&#8221;input&#8221;;</strong></p>
<p>yaparak tekrar giriş izni verilir.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=60</wfw:commentRss>
		</item>
		<item>
		<title>Virgül sonrası hassasiyet</title>
		<link>http://www.flashdersi.com/flash/blog/?p=59</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=59#comments</comments>
		<pubDate>Fri, 09 Jul 2010 11:10:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=59</guid>
		<description><![CDATA[Math.round(20/7); // 3
int((20/7)*10)/10; // 2.8
int((20/7)*100)/100; // 2.85
int((20/7)*1000)/1000; // 2.857
]]></description>
			<content:encoded><![CDATA[<p>Math.round(20/7); // 3<br />
int((20/7)*10)/10; // 2.8<br />
int((20/7)*100)/100; // 2.85<br />
int((20/7)*1000)/1000; // 2.857</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=59</wfw:commentRss>
		</item>
		<item>
		<title>MovieClip içindeki tüm nesnelere erişmek</title>
		<link>http://www.flashdersi.com/flash/blog/?p=58</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=58#comments</comments>
		<pubDate>Mon, 28 Jun 2010 14:33:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash CS3]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[AS]]></category>

		<category><![CDATA[Flash CS4]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=58</guid>
		<description><![CDATA[mc adlı movieclip olsun. mc içindekileri silmek istiyorsunuz:
var i:uint = mc.numChildren;
   while(i- -)
  {
   mc.removeChild(mc.getChildAt(i));
  }
]]></description>
			<content:encoded><![CDATA[<p>mc adlı movieclip olsun. mc içindekileri silmek istiyorsunuz:</p>
<p>var i:uint = mc.numChildren;<br />
   while(i- -)<br />
  {<br />
   mc.removeChild(mc.getChildAt(i));<br />
  }</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=58</wfw:commentRss>
		</item>
		<item>
		<title>using your microphone and FMS and save it on to the FMS server as an .flv file</title>
		<link>http://www.flashdersi.com/flash/blog/?p=57</link>
		<comments>http://www.flashdersi.com/flash/blog/?p=57#comments</comments>
		<pubDate>Thu, 10 Jun 2010 07:25:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Flash CS4]]></category>

		<category><![CDATA[FMS]]></category>

		<guid isPermaLink="false">http://www.flashdersi.com/flash/blog/?p=57</guid>
		<description><![CDATA[import flash.net.NetConnection;
import flash.events.NetStatusEvent;
import flash.media.Microphone;
import flash.net.NetStream;
var nc:NetConnection=new NetConnection();
var mic:Microphone=Microphone.getMicrophone();
nc.addEventListener(NetStatusEvent.NET_STATUS,fStatus);
function fStatus(evt:NetStatusEvent)
{
 if(evt.info.code==&#8221;NetConnection.Connect.Success&#8221;)
 {
  var ns:NetStream=new NetStream(nc);
  ns.attachAudio(mic);
  ns.publish(&#8221;FlashDersi&#8221;,&#8221;record&#8221;);
 }
}
nc.connect(&#8221;rtmp://fms_hosting.com/applicationName&#8221;);
]]></description>
			<content:encoded><![CDATA[<p>import flash.net.NetConnection;<br />
import flash.events.NetStatusEvent;<br />
import flash.media.Microphone;<br />
import flash.net.NetStream;</p>
<p>var nc:NetConnection=new NetConnection();<br />
var mic:Microphone=Microphone.getMicrophone();<br />
nc.addEventListener(NetStatusEvent.NET_STATUS,fStatus);<br />
function fStatus(evt:NetStatusEvent)<br />
{<br />
 if(evt.info.code==&#8221;NetConnection.Connect.Success&#8221;)<br />
 {<br />
  var ns:NetStream=new NetStream(nc);<br />
  ns.attachAudio(mic);<br />
  ns.publish(&#8221;FlashDersi&#8221;,&#8221;record&#8221;);<br />
 }<br />
}<br />
nc.connect(&#8221;rtmp://fms_hosting.com/applicationName&#8221;);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashdersi.com/flash/blog/?feed=rss2&amp;p=57</wfw:commentRss>
		</item>
	</channel>
</rss>

