<?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>*drawlogic &#187; PYTHON</title>
	<atom:link href="http://drawlogic.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://drawlogic.com</link>
	<description>interactive and game development technologies for the web - flash, flex, unity3d, silverlight, javascript</description>
	<lastBuildDate>Thu, 22 Dec 2011 21:55:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>amfast Python Remoting and Services Library for Flash, Flex and other AMF</title>
		<link>http://drawlogic.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/</link>
		<comments>http://drawlogic.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/#comments</comments>
		<pubDate>Mon, 18 May 2009 07:18:12 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[LIBRARIES]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PYTHON]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[AMF0]]></category>
		<category><![CDATA[AMF3]]></category>
		<category><![CDATA[messaging]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=548</guid>
		<description><![CDATA[pyamf is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side. amfast is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out amfast now but [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://pyamf.org/" target="_blank">pyamf </a></strong>is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side.</p>
<p><strong><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a></strong>is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out <a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>now but the speed boost alone might be worth it.  For instance, working with real-time games, when you need static content you need to grab that quickly sometimes via a content service.  The faster that link the better. It also has <a href="http://twistedmatrix.com/trac/" target="_blank">Twisted</a> integration which is great for networking and <a href="http://www.sqlalchemy.org/" target="_blank">SQLAlchemy </a>integration which is in my opinion the best ORM for python (pyamf has twisted, django, pylons, sqlalchemy as well)</p>
<p><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>is well documented and has some great examples.  If you have the Python addiction, check it.</p>
<blockquote>
<h3>Description</h3>
<ul>
<li>AmFast is a Flash remoting framework for Python.</li>
<li>AmFast can use AMF to communicate between Python and Flash, Flex, and any other system that supports AMF.</li>
<li>AMF is a binary object serialization protocol used by Actionscript based applications.</li>
</ul>
<h3>Server Features</h3>
<ul>
<li>Support for NetConnection and RemoteObject RPC.</li>
<li><strong>Support for Producer/Consumer &#8216;push&#8217; messaging with HTTP polling, HTTP long-polling, and real-time HTTP streaming channels.</strong></li>
<li>Support for authentication with NetConnection and RemoteObject.</li>
<li>Flexible Target mapping system to map message destinations to invokable Target objects.</li>
<li>Support for ChannelSets with multiple Channels to expose resources in different ways.</li>
<li>Built in Channels for <a rel="nofollow" href="http://cherrypy.org/">CherryPy</a>, <a rel="nofollow" href="http://twistedmatrix.com/trac/">Twisted Web</a>, and plain WSGI.</li>
<li>Support for configurable Endpoints. Use AmFast&#8217;s built-in AMF encoder/decoder C-extension, or use an external AMF encoder/decoder, such as <a rel="nofollow" href="http://pyamf.org/">PyAmf</a> for a pure-Python implementation.</li>
</ul>
<h3>AMF Encoder/Decoder Features</h3>
<ul>
<li>AMF0/AMF3 encoder/decoder written in C as a Python extension for speed.</li>
<li><strong>More than 10x faster than the <a rel="nofollow" href="http://pyamf.org/">PyAmf</a> encoder/decoder (even when using <a rel="nofollow" href="http://pyamf.org/">PyAmf&#8217;s</a> optional C-extension).</strong></li>
<li>Map custom classes with ClassDef objects for <strong>complete control over serialization/de-serialization</strong>.</li>
<li>Full support for IExternalizable objects.</li>
<li>Data persistence with <a rel="nofollow" href="http://www.sqlalchemy.org/">SqlAlchemy</a> including remotely-loadable lazy-loaded attributes.</li>
<li><strong>Actionscript code generation from ClassDef objects.</strong></li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PyAMF 0.3 Released and Sample on Google App Engine</title>
		<link>http://drawlogic.com/2008/04/16/pyamf-03-released-and-sample-on-google-app-engine/</link>
		<comments>http://drawlogic.com/2008/04/16/pyamf-03-released-and-sample-on-google-app-engine/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 04:08:19 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DATA]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[MARKET]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[PYTHON]]></category>
		<category><![CDATA[RED5]]></category>
		<category><![CDATA[STANDARDS]]></category>
		<category><![CDATA[SYNDICATION]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[TOOLS]]></category>
		<category><![CDATA[AMF0]]></category>
		<category><![CDATA[AMF3]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[netconnection]]></category>
		<category><![CDATA[pyamf]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[result]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=189</guid>
		<description><![CDATA[A great Action Message Format (AMF) remoting kit for server side for the pythonistas is pyAMF, they recently released PyAMF 0.3 and have a sample running up on Google App Engine. There is also a tutorial for getting PyAMF running on Google App Engine. Aral Balkan got this running as well. Features of pyAMF currently: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pyamf.appspot.com/" target="_blank"><img class="alignright" style="float:right;margin:10px;" src="http://i81.photobucket.com/albums/j223/drawkbox/appengine_lowres.jpg" alt="" width="100" height="79" /></a>A great <a href="http://pyamf.org/" target="_blank">Action Message Format (AMF) remoting kit </a>for server side for the pythonistas is <a href="http://blog.pyamf.org/archives/pyamf-and-google-app-engine" target="_blank">pyAMF</a>, they recently released <a href="http://blog.pyamf.org/archives/pyamf-03-released" target="_blank">PyAMF 0.3</a> and have a <a href="http://pyamf.appspot.com/" target="_blank">sample running up on Google App Engine</a>.  There is also a <a href="http://pyamf.org/wiki/GoogleAppEngine" target="_blank">tutorial for getting PyAMF running on Google App Engine</a>. <a href="http://aralbalkan.com/1307" target="_blank">Aral Balkan got this running</a> as well.</p>
<p><strong>Features of pyAMF currently:</strong></p>
<ul>
<li><a href="http://pyamf.org/" target="_blank"><img class="alignright" style="float:right;margin:10px;" src="http://i81.photobucket.com/albums/j223/drawkbox/pyamf-logo-181x34.jpg" alt="" width="181" height="34" /></a><a class="ext-link" href="http://livedocs.adobe.com/flex/3/langref/flash/net/ObjectEncoding.html#AMF0"><span class="icon">AMF0</span></a> encoder/decoder for legacy Flash Players (version 6-8).</li>
<li><a class="ext-link" href="http://livedocs.adobe.com/flex/3/langref/flash/net/ObjectEncoding.html#AMF3"><span class="icon">AMF3</span></a> encoder/decoder for the new AMF format in Flash Player 9.</li>
<li>Support for <a class="wiki" href="http://pyamf.org/wiki/IExternalizable">IExternalizable</a>, <a class="wiki" href="http://pyamf.org/wiki/ArrayCollection">ArrayCollection</a>, <a class="wiki" href="http://pyamf.org/wiki/ObjectProxy">ObjectProxy</a>, <a class="wiki" href="http://pyamf.org/wiki/ByteArray">ByteArray</a> (with <tt>zlib</tt> support), <a class="wiki" href="http://pyamf.org/wiki/RecordSet">RecordSet</a> and <a class="wiki" href="http://pyamf.org/wiki/RemoteObject">RemoteObject</a></li>
<li>Remoting gateways for <a class="ext-link" href="http://twistedmatrix.com/"><span class="icon">Twisted</span></a>, <a class="ext-link" href="http://djangoproject.com/"><span class="icon">Django</span></a>, <a class="ext-link" href="http://turbogears.org/"><span class="icon">TurboGears2</span></a>, <a class="ext-link" href="http://mdp.cti.depaul.edu/"><span class="icon">Web2Py</span></a>, <a class="ext-link" href="http://pylonshq.com/"><span class="icon">Pylons</span></a> and any compatible <a class="ext-link" href="http://wsgi.org/"><span class="icon">WSGI</span></a> framework.</li>
<li>Authentication/setCredentials support</li>
<li>Remoting client using <tt>httplib</tt> with authentication support</li>
<li>Service Browser (<tt>DescribeService</tt> header) requests supported</li>
<li><a class="wiki" href="http://pyamf.org/wiki/LocalSharedObject">Local Shared Object</a> (<a class="ext-link" title="Local_Shared_Object in WikiPedia" href="http://en.wikipedia.org/wiki/Local_Shared_Object"><span class="icon">LSO</span></a>) support</li>
<li><a class="wiki" href="http://pyamf.org/wiki/AdapterFramework">Adapter Framework</a> to integrate nicely with third-party Python projects</li>
</ul>
<p><strong>More on the PyAMF library:</strong></p>
<ul>
<li><a class="wiki" href="http://pyamf.org/wiki/Download">Download</a> &#8212; Download PyAMF</li>
<li><a class="wiki" href="http://pyamf.org/wiki/Examples">Examples</a> &#8212; Tutorials and examples</li>
<li><a class="wiki" href="http://pyamf.org/wiki/Features">Features</a> &#8212; PyAMF features</li>
<li><a class="wiki" href="http://pyamf.org/wiki/Documentation">Documentation</a> &#8211; General documentation</li>
<li><a class="wiki" href="http://pyamf.org/wiki/MailingList">Mailing List</a> &#8212;  Join the mailinglist for user and developer discussions</li>
<li><a class="ext-link" href="http://blog.pyamf.org/"><span class="icon">Blog</span></a> &#8212; Announcements and news</li>
<li><a class="wiki" href="http://pyamf.org/wiki/IrcChannel">IRC Channel</a> &#8212; Chat and discuss PyAMF or get support</li>
<li><a class="wiki" href="http://pyamf.org/wiki/SuccessStories">Success Stories</a> &#8212; See how PyAMF is being used</li>
<li><a class="wiki" href="http://pyamf.org/wiki/Team">Team</a> &#8212; The people working on this project</li>
<li><a class="source" href="http://pyamf.org/browser/pyamf/trunk/LICENSE.txt">License</a> &#8212; The project is licensed under the open source <a class="ext-link" href="http://opensource.org/licenses/mit-license.php"><span class="icon">MIT license</span></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/04/16/pyamf-03-released-and-sample-on-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3, Convert Python Code to Flex AS3 with flex-pypy</title>
		<link>http://drawlogic.com/2008/03/20/as3-convert-python-code-to-flex-as3-with-flex-pypy/</link>
		<comments>http://drawlogic.com/2008/03/20/as3-convert-python-code-to-flex-as3-with-flex-pypy/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 08:11:42 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[BASEPLANE]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[DYNAMIC]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[FUNCTIONAL]]></category>
		<category><![CDATA[HAXE]]></category>
		<category><![CDATA[MARKET]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[PYTHON]]></category>
		<category><![CDATA[STANDARDS]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[CODE]]></category>
		<category><![CDATA[flex-pypy]]></category>
		<category><![CDATA[pypy]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=170</guid>
		<description><![CDATA[I have officially been sucked into the Python vortex. I recently have really been digging IronPython, Jython and good old plain Python but have not ventured here yet. Google (They employ Guido), Microsoft (IronPython) and Sun (Jython) are all becoming infected pythonistas as well. But this is just too cool, Python to AS3 code with [...]]]></description>
			<content:encoded><![CDATA[<p>I have officially been sucked into the Python vortex.  I recently have really been digging IronPython, Jython and good old plain Python but have not ventured here yet. Google (They employ <a href="http://www.python.org/%7Eguido/" target="_blank">Guido</a>), Microsoft (<a href="http://www.codeplex.com/IronPython" target="_blank">IronPython</a>) and Sun (<a href="http://www.jython.org/Project/index.html" target="_blank">Jython</a>) are all becoming infected pythonistas as well. But this is just too cool,  <b><a href="http://code.google.com/p/flex-pypy/" target="_blank">Python to AS3 code with flex-pypy</a>. </b>This project is very young but could be fun, <a href="http://code.google.com/p/flex-pypy/source/browse" target="_blank">source at Google Code</a>.<b><br />
</b></p>
<p><a href="http://haxe.org/" target="_blank">Haxe</a> has a similar premise where it can compile to Flash6-9 versions of actionscript 2-3 which makes for a system with better reach. Python code for this is lots of fun and very flexible.  <a href="http://baseplane.com/2008/03/13/is-python-becoming-a-market-baseplane-language/" target="_blank">Python is becoming a baseplane language</a> and one great language for transcending platform lock-in.</p>
<p>Check out this snippet pulled from <a href="http://www.taniquetil.com.ar/py/chimp/chimp.html" target="_blank">here (click to see sample game) </a></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#/usr/bin/env python</span>
<span style="color: #483d8b;">&quot;&quot;&quot;
This simple example has very little to do with the pygame
chimp example, except that it will act the same (more or less)
and it uses the same resources, only they got converted to
mp3s, pngs.
&quot;&quot;&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#Import Modules</span>
<span style="color: #ff7700;font-weight:bold;">from</span> pypy.<span style="color: black;">translator</span>.<span style="color: black;">flex</span>.<span style="color: black;">modules</span>.<span style="color: black;">flex</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> MyRect:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,x,y,w,h<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">x</span>, <span style="color: #008000;">self</span>.<span style="color: black;">y</span>,<span style="color: #008000;">self</span>.<span style="color: black;">w</span>,<span style="color: #008000;">self</span>.<span style="color: black;">h</span> = x,y,w,h
&nbsp;
SCREEN_W = <span style="color: #ff4500;">468</span>
SCREEN_H = <span style="color: #ff4500;">60</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Game:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:<span style="color: #ff7700;font-weight:bold;">pass</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> init<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,screen<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">screen</span> = screen
        screen.<span style="color: black;">layout</span> = <span style="color: #483d8b;">'absolute'</span>
        screen.<span style="color: black;">setActualSize</span><span style="color: black;">&#40;</span>SCREEN_W, SCREEN_H<span style="color: black;">&#41;</span>
&nbsp;
        screen.<span style="color: black;">addEventListener</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'mouseMove'</span>,mousemotion<span style="color: black;">&#41;</span>
        screen.<span style="color: black;">addEventListener</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'enterFrame'</span>,do_loop<span style="color: black;">&#41;</span>
        screen.<span style="color: black;">addEventListener</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'click'</span>,chimp_whip<span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #008000;">self</span>.<span style="color: black;">bg</span> = load_sprite<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;py_background_png&quot;</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">screen</span>.<span style="color: black;">addChild</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">bg</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #008000;">self</span>.<span style="color: black;">chimp</span> = load_sprite<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;py_chimp_png&quot;</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">screen</span>.<span style="color: black;">addChild</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">chimp</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #008000;">self</span>.<span style="color: black;">orig_y</span> = <span style="color: #008000;">self</span>.<span style="color: black;">chimp</span>.<span style="color: black;">y</span>
&nbsp;
        img2 = <span style="color: #008000;">self</span>.<span style="color: black;">fist</span> = load_sprite<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;py_fist_png&quot;</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">screen</span>.<span style="color: black;">addChild</span><span style="color: black;">&#40;</span>img2<span style="color: black;">&#41;</span>
        img2.<span style="color: black;">move</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">400</span>,img2.<span style="color: black;">height</span>/<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">move</span> = <span style="color: #ff4500;">1</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">spin</span> = <span style="color: #ff4500;">0</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">hit</span> = <span style="color: #ff4500;">0</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">hit_move</span> = <span style="color: #ff4500;">1</span>
&nbsp;
        <span style="color: #008000;">self</span>.<span style="color: black;">sfx</span> = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">sfx</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'whip'</span><span style="color: black;">&#93;</span> = load_sound_resource<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;py_punch_mp3&quot;</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">sfx</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'nohit'</span><span style="color: black;">&#93;</span> = load_sound_resource<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;py_whiff_mp3&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> loop<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        img = <span style="color: #008000;">self</span>.<span style="color: black;">chimp</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">self</span>.<span style="color: black;">spin</span>:
            <span style="color: #008000;">self</span>.<span style="color: black;">spin</span> -= <span style="color: #ff4500;">1</span>
            img.<span style="color: black;">rotation</span> = <span style="color: #008000;">self</span>.<span style="color: black;">spin</span><span style="color: #66cc66;">*</span><span style="color: #ff4500;">24</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            img.<span style="color: black;">x</span> += <span style="color: #008000;">self</span>.<span style="color: black;">move</span> <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">8</span>
            <span style="color: #ff7700;font-weight:bold;">if</span> img.<span style="color: black;">x</span> <span style="color: #66cc66;">&gt;</span> SCREEN_W-img.<span style="color: black;">width</span>:
                <span style="color: #008000;">self</span>.<span style="color: black;">move</span> = -<span style="color: #ff4500;">1</span>
            <span style="color: #ff7700;font-weight:bold;">if</span> img.<span style="color: black;">x</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #ff4500;">0</span>:
                <span style="color: #008000;">self</span>.<span style="color: black;">move</span> = <span style="color: #ff4500;">1</span>
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">self</span>.<span style="color: black;">hit</span>:
            <span style="color: #008000;">self</span>.<span style="color: black;">hit</span> -= <span style="color: #ff4500;">1</span>
            <span style="color: #008000;">self</span>.<span style="color: black;">fist</span>.<span style="color: black;">y</span> += <span style="color: #ff4500;">6</span> <span style="color: #66cc66;">*</span> <span style="color: #008000;">self</span>.<span style="color: black;">hit_move</span>
&nbsp;
            <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">self</span>.<span style="color: black;">hit</span>  SCREEN_W - img_halfw:
        newx = SCREEN_W - img.<span style="color: black;">width</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> newx  img.<span style="color: black;">x</span> <span style="color: #ff7700;font-weight:bold;">and</span> e.<span style="color: black;">stageX</span> <span style="color: #66cc66;">&lt;</span> img.<span style="color: black;">x</span>+img.<span style="color: black;">width</span>:
        game.<span style="color: black;">sfx</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'whip'</span><span style="color: black;">&#93;</span>.<span style="color: black;">play</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        game.<span style="color: black;">spin</span> = <span style="color: #ff4500;">20</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        game.<span style="color: black;">sfx</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'nohit'</span><span style="color: black;">&#93;</span>.<span style="color: black;">play</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> flash_main<span style="color: black;">&#40;</span> x=<span style="color: #ff4500;">1</span> <span style="color: black;">&#41;</span>:
    game.<span style="color: black;">init</span><span style="color: black;">&#40;</span>castToWindow<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/03/20/as3-convert-python-code-to-flex-as3-with-flex-pypy/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

