<?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>Flash/Flex Developer &#187; as3</title>
	<atom:link href="http://blog.ismailsimsek.com/tag/as3/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.ismailsimsek.com</link>
	<description></description>
	<lastBuildDate>Thu, 22 Dec 2011 14:58:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Php – AS3 veri iletişimi [Actionscript PhpData Class]</title>
		<link>http://blog.ismailsimsek.com/php/php-%e2%80%93-as3-veri-iletisimi-actionscript-phpdata-class.html</link>
		<comments>http://blog.ismailsimsek.com/php/php-%e2%80%93-as3-veri-iletisimi-actionscript-phpdata-class.html#comments</comments>
		<pubDate>Mon, 30 May 2011 07:33:24 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[actionscript php iletişimi]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[php data class]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=547</guid>
		<description><![CDATA[Daha önce şu yazımda anlattığım olayı birazcık basitleştiren bir sınıf yazdım. Daha doğrusu ben bu işte çok çok yeniyken Tuncay arkadaşım bana bu sınıfı test etmem için göndermişti. Ben hiç kullanmamıştım bu sınıfı. Üzerinde biraz değişiklik yaparak sınıfı güncelledim. En basit halinde şuan. İstediğiniz gibi geliştirebilirsiniz. Gelelim ne yapacağımıza. Öncelikle basit düzeyde php ile veri alışverişini gerçekleştireceğiz. Öncelikle php dosyamızı hazırlayalım. İlk olarak sadece veri çekeceğiz. Bu yüzden sadece alttaki satır bizim için yeterli. PLAIN [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Daha önce <a title="Actionscript 3.0 – Php – MySql veri alışverişi" href="http://blog.ismailsimsek.com/php/actionscript-3-0-php-mysql-veri-alisverisi.html" target="_blank">şu yazımda</a> anlattığım olayı birazcık basitleştiren bir sınıf yazdım. Daha doğrusu ben bu işte çok çok yeniyken Tuncay arkadaşım bana bu sınıfı test etmem için göndermişti. Ben hiç kullanmamıştım bu sınıfı. Üzerinde biraz değişiklik yaparak sınıfı güncelledim. En basit halinde şuan. İstediğiniz gibi geliştirebilirsiniz.</p>
<p class="MsoNormal">Gelelim ne yapacağımıza. Öncelikle basit düzeyde php ile veri alışverişini gerçekleştireceğiz. Öncelikle php dosyamızı hazırlayalım. İlk olarak sadece veri çekeceğiz. Bu yüzden sadece alttaki satır bizim için yeterli.</p>
<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-5">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'email=biremailadresi@gmail.com&amp;isim=ismail&amp;soyisim=simsek'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p class="MsoNormal">Burada verileri özellikle bu şekilde yazdım. Birden fazla<br />
veriyi as3’e post etmek için şuanki sistemimizde en basit ve kullanışlı yöntem.</p>
<p class="MsoNormal">Şimdi bir flash dökümanı açalım ve DocumentClass olarak<br />
Main.as dosyası oluşturalım.</p>
<p class="MsoNormal"><a href="http://blog.ismailsimsek.com/wp-content/uploads/2011/05/docclass.jpg"><img class="alignleft size-medium wp-image-550" title="docclass" src="http://blog.ismailsimsek.com/wp-content/uploads/2011/05/docclass.jpg" alt="" /></a></p>
<p><a title="Php Data Class" href="http://www.ismailsimsek.com/ie/as3php/phpdataclass.7z" target="_blank">Php Data Class</a>’ı buradan indirip import edelim.</p>
<p>Öncelikle sınıfı biraz açıklayalım. Php.as dosyasını herhangi bir text editörü ile açın. “getData” fonksiyonu ile bir php dosyasından veri çekiyoruz. (ilk olarak bu fonksiyonu kullanacağız.) Bu veri çekim işlemi tamamlandığında “DATA_LOADED” eventi dispatch ediliyor. Diğer donksiyonu yazının ilerleyen kısmında anlatacağım.</p>
<p>Şimdi aşağıdaki kodları yazalım.</p>
<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showPlainTxt('actionscript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-6">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ismail</span>.<span style="color: #006600;">net</span>.<span style="color: #006600;">php</span>.<span style="color: #006600;">PhpData</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ismail</span>.<span style="color: #006600;">net</span>.<span style="color: #006600;">php</span>.<span style="color: #006600;">PhpDataEvent</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLVariables</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> php:PhpData;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php = <span style="color: #000000; font-weight: bold;">new</span> PhpData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhpDataEvent.<span style="color: #006600;">DATA_LOADED</span>, dataGeldi<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="color: #006600;">getData</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://localhost/deneme/flPhpCl/phpfile.php"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> dataGeldi<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:PhpDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">item</span>.<span style="color: #006600;">email</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Burada bir Php isimli class’ımızdan bir referans oluşturduk. Daha sonra bir event listener ekledik. Çağırdığımız php dosyasından veri bize ulaştığında “dataGeldi” fonksiyonunun tetiklenmesini sağladık. Daha sonrada php dosyamızın tam yolunu verip çağırdık. Gelen verilere e.item ile ulaşıyoruz. Php dosyasından bize dönen veriler bu objenin içinde.</p>
<p>Şimdi bir veri gönderelim. Bu veriyi php tarafında işleyelim. Main fonksiyonunu şu şekilde değiştiriyoruz.</p>
<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showPlainTxt('actionscript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-7">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php = <span style="color: #000000; font-weight: bold;">new</span> PhpData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/*php.addEventListener(PhpDataEvent.DATA_LOADED, dataGeldi);</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">php.getData(&quot;http://localhost/deneme/flPhpCl/phpfile.php&quot;);*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhpDataEvent.<span style="color: #006600;">DATA_SENT</span>, onDataSent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhpDataEvent.<span style="color: #006600;">DATA_LOADED</span>, onDataLoaded<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> gonderilecekData:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"islem"</span>,<span style="color: #ff0000;">"topla"</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"a"</span>,<span style="color: #cc66cc;color:#800000;">47</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"b"</span>,<span style="color: #cc66cc;color:#800000;">17</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="color: #006600;">sendData</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://localhost/deneme/flPhpCl/phpfile.php"</span>, gonderilecekData<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onDataSent<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:PhpDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Veriler gönderildi."</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onDataLoaded<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:PhpDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"veriler geldi."</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"işlem sonucu: "</span> + <span style="color: #0066CC;">e</span>.<span style="color: #006600;">item</span>.<span style="color: #006600;">sonuc</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>“gonderilecekData” isimli arrayi biraz açalım. Örneğin ilk dataya bakalım. [“islem”,”topla”] verisi php tarafında $_POST[‘islem’] olarak çekilecek.<br />
Php kodlarımızda şu şekilde:</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$islemTipi</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'islem'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$a</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'a'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$b</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'b'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">switch</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$islemTipi</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">case</span> <span style="color:#FF0000;">"topla"</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> + <span style="color:#0000FF;">$b</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">break</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">case</span> <span style="color:#FF0000;">"cikar"</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> - <span style="color:#0000FF;">$b</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">break</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">case</span> <span style="color:#FF0000;">"carp"</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> * <span style="color:#0000FF;">$b</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">break</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">case</span> <span style="color:#FF0000;">"bol"</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> / <span style="color:#0000FF;">$b</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">break</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"sonuc="</span> . <span style="color:#0000FF;">$islemSonucu</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Burada islem tipine göre kodlar çalıştırılıp sonuc döndürülüyor. Bunu siz daha farklı şekillerde kullanabilirsiniz. Bu da veri alıp göndermeye örnekti.<br />
Konu ile ilgili sorunuz olduğunda sormaktan çekinmeyin.<br />
Bu uygulamanın <a title="Örnek Uygulama Source Files" href="http://www.ismailsimsek.com/ie/as3php/flPhpCl.7z" target="_blank">tüm dosyalarını şuradan</a> indirebilirsiniz.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/php-%e2%80%93-as3-veri-iletisimi-actionscript-phpdata-class.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AmfPHP – Flash – Error #2044 hatası ve çözümü</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/amfphp-flash-error-2044-hatasi-ve-cozumu.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/amfphp-flash-error-2044-hatasi-ve-cozumu.html#comments</comments>
		<pubDate>Wed, 29 Sep 2010 07:10:13 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[flash player]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=222</guid>
		<description><![CDATA[Merhabalar. Database bağlantılı tüm flash projelerimde amfphp kullanıyorum. Çokta memnunum. Çünkü hızlı çalışıyor, kolay yönetilebiliyor, alıştıkça bırakamıyorsunuz. Genelde hep flex projelerimde kullandım amfphp yi. Benim ısrarlarım sonucunda yeni başladığı projesinde amfphp kullanmaya başlayan arkadaşım her şeyi düzgünce yazmış olmasına rağmen flashın hata verdiğinden yakınıyordu. Kodlarını gönderdi bana: PLAIN TEXT Actionscript: var baglanti:NetConnection = new NetConnection&#40;&#41;; baglanti.connect&#40;"http://localhost/amfphp/gateway.php"&#41;; var responderFnk:Responder = new Responder&#40;responderFunction&#41;; baglanti.call&#40;"osman.osmanClass.denemeFunction", responderFnk, &#123;sayi:256&#125;&#41;; function responderFunction&#40;e:Object&#41;:void &#123; // &#125; Bu kısımda bir sorun yok göründüğü [...]]]></description>
			<content:encoded><![CDATA[<p>Merhabalar.</p>
<p>Database bağlantılı tüm flash projelerimde amfphp kullanıyorum. Çokta memnunum. Çünkü hızlı çalışıyor, kolay yönetilebiliyor, alıştıkça bırakamıyorsunuz. Genelde hep flex projelerimde kullandım amfphp yi. Benim ısrarlarım sonucunda yeni başladığı projesinde amfphp kullanmaya başlayan <a href="http://www.ardaogulcan.com/" target="_blank">arkadaşım</a> her şeyi düzgünce yazmış olmasına rağmen flashın hata verdiğinden yakınıyordu.</p>
<p>Kodlarını gönderdi bana:</p>
<div class="igBar"><span id="lactionscript-12"><a href="#" onclick="javascript:showPlainTxt('actionscript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-12">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> baglanti:<span style="color: #0066CC;">NetConnection</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">baglanti.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://localhost/amfphp/gateway.php"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> responderFnk:Responder = <span style="color: #000000; font-weight: bold;">new</span> Responder<span style="color: #66cc66;">&#40;</span>responderFunction<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">baglanti.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"osman.osmanClass.denemeFunction"</span>, responderFnk, <span style="color: #66cc66;">&#123;</span>sayi:<span style="color: #cc66cc;color:#800000;">256</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> responderFunction<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Bu kısımda bir sorun yok göründüğü kadarıyla. Bu defa php kodlarını istedim.</p>
<p>osman isimli klasör içinde osmanClass isimli php dosyasını gönderdi. İçeriğide aşağıdaki gibi.</p>
<div class="igBar"><span id="lphp-13"><a href="#" onclick="javascript:showPlainTxt('php-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-13">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;?php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">class</span> osmanClass</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> osmanClass <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> denemeFunction <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$gelenVeri</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$gelenVeri</span>*<span style="color:#CC66CC;color:#800000;">5</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Burada da bir sorun yok görüldüğü üzre. (?&gt; özellikle konmamıştır. Konulmaması daha hayırlıdır. Evet onu koyupta denedik gene aynı sonucu aldık)</p>
<p>İşin garibi hazırladığımız php dosyası amfphp nin browser ekranında süper bi şekilde çalışmaktaydı. Kafayı yememek elde değil.</p>
<p>Biz ayrı ayrı üzerinde çalışmaya devam ettik. 1 saat sonra Arda buldum diye yazdı msnden. Nasıl dedim anlatmaya başladı.</p>
<p>Kullandığı serverdan kaynaklanabileceğini düşünüp xampp'ı kaldırmış. Wamp kurmuş. Sonuç değişmemiş. Sonra nerden aklına geldiyse wampserver ın errorlog dosyasına bakmış. Orada gateway.php dosyasının güncellenmesinin gerektiğini söyleyen bir satır bulmuş. Daha sonra açmış gateway.php dosyasını kontrol etmeye başlamış ve görmüş.</p>
<p>gateway.php dosyası 106. satırdaki şu kodu:</p>
<div class="igBar"><span id="lphp-14"><a href="#" onclick="javascript:showPlainTxt('php-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//You can set this constant appropriately to disable traces and debugging headers</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//You will also have the constant available in your classes, for changing</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//the mysql server info for example</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"PRODUCTION_SERVER"</span>, <span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Buradaki true değerini false yapın sadece.</p>
<p>Böyle yapınca herşey güllük gülistanlık oldu. Bu amfphp nin bir güvenlik önlemiymiş. Direkt flash ide ile amfphpye erişilemiyor. Bir html içerisinden çalışması lazım illaki. Browser ekranının çalışmasıda bunu açıklıyor. Şimdi diyeceksiniz flexte nasıl çalışıyor peki? Ben projeyi run ettiğimde bana html sayfa açıp orada gösteriyor çünkü. Bu nedenle hiç sorun olmuyordu.</p>
<p>İyi çalışmalar herkese.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/amfphp-flash-error-2044-hatasi-ve-cozumu.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AS3 Coder</title>
		<link>http://blog.ismailsimsek.com/adobe-2/air/as3-coder.html</link>
		<comments>http://blog.ismailsimsek.com/adobe-2/air/as3-coder.html#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:30:10 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[air uygulama]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[coder]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[kod yardımcısı]]></category>

		<guid isPermaLink="false">http://www.webtimi.com/ismail/blog/?p=76</guid>
		<description><![CDATA[AS3 Coder Air tabanlı bir masaüstü uygulaması. Görevi belirlediğimiz parametrelere göre bize kod üretmesi.Uygulamanın basit bir yükleme bölümü var. Bu bölümü geçtikten sonra istediğiniz gibi kodlarınızı üretebilir, projelerinize hız katabilirsiniz. Kendini güncelleyebilme özelliği ile yeni versiyonlarından  anında haberdar olabileceksiniz. Özellikle tween sınıfına ait kodlamalarda bize sunduğu ön izleme bölümü gerçekten çok hoş. Uygulamayı bizlere ücretsiz olarak sunan geliştiricilerine teşekkür ederiz. Dikkat: As3 Coder’i indirip kurmadan önce bilgisayarınızda AIR Oynatıcı’nın kurulu olması gerekmekte. Eğer herhangi bir [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/as3coder"><img class="aligncenter" title="as3 coder" src="http://as3coder.com/wp-content/banner.jpg" alt="" width="502" height="80" /></a></p>
<p>AS3 Coder Air tabanlı bir masaüstü uygulaması. Görevi belirlediğimiz parametrelere göre bize kod üretmesi.<span id="more-76"></span>Uygulamanın basit bir yükleme bölümü var. Bu bölümü geçtikten sonra istediğiniz gibi kodlarınızı üretebilir, projelerinize hız katabilirsiniz. Kendini güncelleyebilme özelliği ile yeni versiyonlarından  anında haberdar olabileceksiniz. Özellikle tween sınıfına ait kodlamalarda bize sunduğu ön izleme bölümü gerçekten çok hoş.</p>
<p>Uygulamayı bizlere ücretsiz olarak sunan geliştiricilerine teşekkür ederiz.</p>
<p><strong>Dikkat: </strong>As3 Coder’i indirip kurmadan önce bilgisayarınızda AIR Oynatıcı’nın kurulu olması gerekmekte. Eğer herhangi bir Adobe CS4 yazılımı yüklediyseniz muhtemelen bu oynatıcıya zaten sahipsiniz. Eğer kurulum başlamazsa bu adresten son oynatıcıyı temin edebilirsiniz.</p>
<p><strong>Adobe AIR Oynatıcı:</strong> <a title="Adobe AIR Player" href="http://www.adobe.com/products/air/">http://www.adobe.com/products/air/</a></p>
<p><strong>As3 Coder Programı v.1 İndirme Linki:</strong> <a title="As3 Coder Google Code File" href="http://as3coder.googlecode.com/files/as3coder_1.0.air">http://as3coder.googlecode.com/files/as3coder_1.0.air</a></p>
<p><strong>Proje ve Geliştirici</strong> : <a title="Adobe AIR Player" href="http://www.as3coder.com/">http://www.as3coder.com</a></p>
<p><a href="http://as3coder.com/2009/04/08/ve-as3-coder-indirilmeye-hazir/" target="_blank"><strong>Daha fazla bilgi için...</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/adobe-2/air/as3-coder.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

