<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
   <channel>
      <title>sephiroth.it - flash world</title>
      <link>http://www.sephiroth.it/weblog/</link>
      <description>Almost everything interesting the flash world ( using php, python, c#, etc )</description>
      <language>en</language>
      <copyright>Copyright 2010</copyright>
      <lastBuildDate>Sat, 27 Feb 2010 11:59:41 +0100</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=5.01</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
         <title>PdfReader for purePDF</title>
         <description><![CDATA[Recently I've update <a href="http://code.google.com/p/purepdf/">purepdf</a> adding PdReader.<div>Using PdfReader an existing pdf document can be opened and parsed. Later I will also port the <a href="http://api.itextpdf.com/com/itextpdf/text/pdf/PdfStamper.html">PdfStamper</a> which will allow to modify existing pdf documents.</div><div><br /></div><div>Currently I've posted 3 simple examples about the <b>PdfReader</b>:</div><div><ol><li><a href="http://code.google.com/p/purepdf/source/browse/examples/src/test_reader/HelloWorldReader.as">Extract bookmarks</a></li><li><a href="http://code.google.com/p/purepdf/source/browse/examples/src/test_reader/HelloWorldReader.as"></a><a href="http://code.google.com/p/purepdf/source/browse/examples/src/test_reader/ExtractStream.as">Extract text</a></li><li><a href="http://code.google.com/p/purepdf/source/browse/examples/src/test_reader/ExtractStream.as"></a><a href="http://code.google.com/p/purepdf/source/browse/examples/src/test_reader/ExtractImages.as">Extract images</a></li><li><a href="http://www.sephiroth.it/weblog/archives/2010/02/27/ExtractTextPDF.air">ExtractTextPDF.air</a>&nbsp;(air application): browse for local pdf documents and display pages contents</li></ol><div>Currently the reader has some limitations (such as it cannot open crypted documents) and it's not fast enough, but I hope to optimize it in the future.</div><div><br /></div></div><div></div>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=099ac39b-84af-49c0-80ce-8814821fc8e5" style="border:none;float:right" /><span class="zem-script more-related more-info pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2010/02/pdfreader_for_purepdf.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2010/02/pdfreader_for_purepdf.php</guid>
         <category></category>
         <pubDate>Sat, 27 Feb 2010 11:59:41 +0100</pubDate>
      </item>
      
      <item>
         <title>mm.cfg revealed!</title>
         <description><![CDATA[I've just discovered an unbelievable post by&nbsp;Jean-Philippe Auclair&nbsp;with ALL the undocumented options of the <a href="http://help.adobe.com/en_US/Flex/4.0/html/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html">mm.cfg</a> file!<div><font class="Apple-style-span" color="#000000" face="arial, sans-serif"><span class="Apple-style-span" style="white-space: pre-wrap;">Really interesting in particular <b>AS3Trace</b> and <b>AS3Verbose</b> (and what is AS3Turbo anyway?). Also TraceOutputBuffered could be useful for all swf with uncommented trace calls :)</span></font></div><div><font class="Apple-style-span" color="#000000" face="arial, sans-serif"><span class="Apple-style-span" style="white-space: pre-wrap;"><br /></span></font></div><div><font class="Apple-style-span" color="#000000" face="arial, sans-serif"><span class="Apple-style-span" style="white-space: pre-wrap;">Read all the features here: <a href="http://jpauclair.net/2010/02/10/mmcfg-treasure/">http://jpauclair.net/2010/02/10/mmcfg-treasure/</a></span></font></div><div><br /></div><div><br /></div><div>By the way, this is the list of features he discovered (follow the link above for detailed information on each command):</div><div><ul><li>AllowUserLocalTrust</li><li>AS3AllocationTracking</li><li>AS3AutoStartSampling</li><li>AS3CSE</li><li>AS3DCE</li><li>AS3DynamicProfile</li><li>AS3MIR</li><li>AS3Sampling</li><li>AS3SSE</li><li>AS3StaticProfile</li><li>AS3Trace</li><li>AS3Turbo</li><li>AS3Verbose</li><li>AssetCacheSize=X</li><li>AutoUpdateDisable</li><li>AutoUpdateInterval</li><li>AutoUpdateVersionUrl</li><li>AVHardwareDisable</li><li>CodeSignLogFile</li><li>CodeSignRootCert</li><li>Convert8kAnd16kAudio</li><li>CrashLogEnable</li><li>DisableAVM1Loading</li><li>DisableDeviceFontEnumeration</li><li>DisableIncrementalGC</li><li>DisableMulticoreRenderer</li><li>DisableNetworkAndFilesystemInHostApp</li><li>DisableProductDownload</li><li>DisableSockets</li><li>DisplayGPUBlend</li><li>EnableIncrementalValidation</li><li>EnableLeakFile</li><li>EnableSocketsTo</li><li>EnableSocketsTo</li><li>EnableSocketsTo</li><li>EnforceLocalSecurityInActiveXHostApp</li><li>ErrorReportingEnable</li><li>FileDownloadDisable</li><li>FileUploadDisable</li><li>ForceGPUBlend</li><li>FrameProfilingEnable</li><li>FullScreenDisable</li><li>GCStats</li><li>GPULogOutputFileName</li><li>HeapProfilingAS3Enable</li><li>LegacyDomainMatching</li><li>LocalFileLegacyAction</li><li>LocalFileReadDisable</li><li>LocalStorageLimit</li><li>LogGPU</li><li>MaxWarnings</li><li>OverrideGPUValidation</li><li>OverrideUserInvokedActions</li><li>PolicyFileLog</li><li>PolicyFileLogAppend</li><li>PreloadSwf</li><li>PreloadSwf</li><li>ProductDisabled</li><li>ProductDownloadBaseUrl</li><li>ProfileFunctionEnable</li><li>ProfilingOutputDirectory</li><li>ProfilingOutputFileEnable</li><li>RendererProfilingEnable</li><li>RTMFPP2PDisable</li><li>RTMFPTURNProxy</li><li>ScriptStuckTimeout</li><li>SecurityDialogReportingEnable</li><li>SuppressDebuggerExceptionDialogs</li><li>ThirdPartyStorage</li><li>TraceOutputBuffered</li><li>TraceOutputFileEnable</li><li>TraceOutputFileName</li><li>UseBrokerProcess</li><li>WindowlessDisable</li></ul></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2010/02/mmcfg_revealed.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2010/02/mmcfg_revealed.php</guid>
         <category></category>
         <pubDate>Thu, 11 Feb 2010 23:41:39 +0100</pubDate>
      </item>
      
      <item>
         <title>Flash alpha GradientMatrix to PDF using purePDF</title>
         <description><![CDATA[One of the most hard thing to traslate when creating pdf documents from existing flash movies is indeed the <b><a class="zem_slink freebase/en/gradient rdfa" href="http://en.wikipedia.org/wiki/Gradient" title="Gradient" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/gradient" property="ctag:label">gradient</a> matrix</b>.&nbsp;<div>Not only because pdf and flash have 2 different coordinates system and because the gradient matrix is applied in 2 different ways, but also if you want to convert gradient with <b>transparent colors</b> inside.</div><div><br /></div><div>Let me say that I've encountered the same issue <a href="http://www.quasimondo.com/archives/000689.php#000689">Mario posted here</a>, even if I made a little modification to his solution:&nbsp;<a href="http://www.sephiroth.it/weblog/archives/2010/02/10/GradientMatrix.as">GradientMatrix.as</a></div><div><br /></div><div>This is the swf example. Click on the sprite to start the animation. It will rotate and translate both the sprite and its gradient matrix, then click again to stop the animation and create the pdf file at that frame.</div><div><br /></div><div id="ExampleColorGradient2">SWF HERE</div><div><br /></div><div>In order to create the correct gradient matrix with the right position and rotation in <a href="http://code.google.com/p/purepdf/">purePDF</a> I've used the&nbsp;<span class="Apple-style-span" style="font-family: Monaco, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 12px; ">PdfShading.complexAxial<span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; ">&nbsp;static method in this way:</span></span></div><div><br /></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><span style="color: #78abd3">var</span> cb_shading: PdfShading = PdfShading.complexAxial( writer, top_left.x, top_left.y, top_right.x, top_right.y, cb_colors, cb_ratios, <span style="color: #0c54f9">true</span>, <span style="color: #0c54f9">true</span> );</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; ">then for the alpha masking I've created a&nbsp;<span class="Apple-style-span" style="font-family: Monaco, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 12px; ">PdfTransparencyGroup<span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; ">&nbsp;applied to the alpha mask.</span></span></span></p></div><div>You can see my solution (which probably is not the best one, but it's the one I discovered for now) in the code below.</div>

<script type="text/javascript">
var so = new SWFObject("http://www.sephiroth.it/weblog/archives/2010/02/10/ExampleColorGradient2.swf", "ExampleColorGradient2", "400", "300", "10", "#FFFFFF");
so.addParam("quality", "high");
so.write("ExampleColorGradient2");
</script>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=d3bf64f1-e4a7-4489-aa00-664f80327378" style="border:none;float:right" /><span class="zem-script more-related more-info pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2010/02/flash_gradientmatrix_to_pdf_using_pur.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2010/02/flash_gradientmatrix_to_pdf_using_pur.php</guid>
         <category>actionscript</category>
         <pubDate>Wed, 10 Feb 2010 07:41:19 +0100</pubDate>
      </item>
      
      <item>
         <title>purePDF, a complete actionscript PDF library</title>
         <description><![CDATA[<p><strong>PurePDF</strong> is a complete library for creating PDF documents using actionscript 3 ( targeted for flash player 10 ).
The project is actually hosted on <a href="http://code.google.com/p/purepdf">google code</a>.</p>

<p>This is is a porting I've made of the famous java <a href="http://itextpdf.com/">iText</a> library ( version 4.2 ) by <strong>Bruno Lowagie</strong> into pure actionscript 3.0 (with some little modifications).<br>
iText ( and purePDF ) has tons of features for create and manipulate pdf documents. A quick list of the features actually implemented into purepdf:</p>
<p>
</p><ul>
<li>pdf viewers display options
</li><li>alpha transparency, blend modes
</li><li>layers
</li><li>arabic RTL writing
</li><li>support for pdf text rendering ( <a href="http://www.sephiroth.it/purepdf/pdfs/TextRender.pdf">example</a> )
</li><li>tables ( nested tables, page split tables, table with images, etc...)
</li><li>slide show ( page transitions )
</li><li>annotations, comments, file annotations
</li><li>patterns, shadings patterns (linear and gradient), spot colors, rgb color and cmyk color
</li><li>linear and radial gradients with alpha ( <a href="http://www.sephiroth.it/purepdf/pdfs/ShadingGradientTransparency.pdf">example</a> or <a href="http://www.sephiroth.it/purepdf/pdfs/AdvancedGradient.pdf">example 2</a> )
</li><li>forms (user input forms, textfields, combo box, list, checkbox)
</li><li>paragraphs, phrases, chunks for text manipulation, chapters, lists...
</li><li>images (jpeg, png, animated gif, tif, bitmapdata ) and image patterns
</li><li>basic and advanced paths
</li><li>afm, otf, pfm, ttc and ttf fonts (embedded and not embedded)
</li><li>metadata, page header and footers
</li><li>external, internal links
</li><li>barcodes creation ( ean-ucc 13, ucc-12, ean-ucc-8, upc-e, pdf 417, ean supplements) ( <a href="/purepdf/pdfs/BarCodes.pdf">example</a> )
</li><li>unicode, cjk fonts and text
</li><li>file attachments
</li><li>javascript ( <a href="http://www.sephiroth.it/purepdf/pdfs/Javascript2.pdf">example</a> )
</li><li>multi column text
</li><li>Embedded movies ( <a href="http://www.sephiroth.it/purepdf/pdfs/EmbeddedMovie.pdf">example</a> )
</li><li>Vertical text ( see this <a href="http://www.sephiroth.it/purepdf/pdfs/VerticalTextExample.pdf">example</a> )
</li><li>and many other features...
</li></ul>
<p></p><p>
You can take a look at this <a href="http://www.sephiroth.it/purepdf/pdfs/Reflection.pdf">PDF document</a> (self generated using actionscript reflection) with the purePDF APIs.</p>

<p>Other actionscript libraries I've used for this project are: <a href="http://www.wizhelp.com/fzlib/">fzlib</a>, <a href="http://code.google.com/p/as3corelib/">as3corelib</a>, <a href="http://code.google.com/p/ashashmap/">ashashmap</a>, alchemy, <a href="http://code.google.com/p/as3-commons/">as3-commons</a>.</p>

<p>You can both download the library from source code and compile it yourself ( see at the <a href="http://code.google.com/p/purepdf/wiki/Installation">Installation</a> guide ) or download the precompiled swc files from the project's <a href="http://code.google.com/p/purepdf/downloads/list">download section</a>.</p>

<p>Moreover there are actually a lot of examples to explain all the library features and for a quick guide. You can find them listed and updated <a href="http://code.google.com/p/purepdf/wiki/Examples">here</a>. In General refers to the <a href="http://code.google.com/p/purepdf/w/list">project wiki</a> for all the updated examples/howtos and the project updates.</p>

<p><strong>update:</strong> <a href="http://sephiroth.it/purepdf/asdoc-output/">here</a> you can find the updated online api documentation
</p>

<br><br>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2010/02/purepdf_a_complete_actionscript_pdf_l.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2010/02/purepdf_a_complete_actionscript_pdf_l.php</guid>
         <category>actionscript</category>
         <pubDate>Wed, 03 Feb 2010 21:37:08 +0100</pubDate>
      </item>
      
      <item>
         <title>Update your app VERSION using ant</title>
         <description><![CDATA[This is just a quick tip in case someone needs it. Maybe when you compile your flash application or your swc library you want to automatically update the "<b>VERSION</b>" number too without do it manually every time.<div>This is the way I do. In the "compile" task I've added a depends link to this ant task:</div><div><br /></div><div><br /></div><div><div><div><pre>&lt;target name="update-version"&gt;
	&lt;propertyset id="tdate"&gt;&lt;/propertyset&gt;
	&lt;tstamp&gt;
		&lt;format property="tdate" pattern="yyyyMMdd"/&gt;
	&lt;/tstamp&gt;
	&lt;buildnumber file="build.number"/&gt;
	&lt;echo&gt;updating version to current datetime: ${tdate}&lt;/echo&gt;
	&lt;replaceregexp byline="true"&gt;
		&lt;regexp pattern="public static const BUILD_DATE: String = \'([0-9]+)'"/&gt;
		&lt;substitution expression="public static const BUILD_DATE: String = '${tdate}'"/&gt;
		&lt;fileset dir="src/it/sephiroth/somestuff"&gt;
			&lt;include name="Library.as"/&gt;
		&lt;/fileset&gt;
	&lt;/replaceregexp&gt;
	
	&lt;replaceregexp byline="true"&gt;
		&lt;regexp pattern="public static const BUILD_NUMBER: String = \'([0-9\.]+)'"/&gt;
		&lt;substitution expression="public static const BUILD_NUMBER: String = '${build.number}'"/&gt;
		&lt;fileset dir="src/it/sephiroth/somestuff"&gt;
			&lt;include name="Library.as"/&gt;
		&lt;/fileset&gt;
	&lt;/replaceregexp&gt;
&lt;/target&gt;</pre></div></div></div><br /><div>The 2 optional tasks I've used are: <a href="http://ant.apache.org/manual/CoreTasks/buildnumber.html">BuildNumber</a> task and <a href="http://ant.apache.org/manual/OptionalTasks/replaceregexp.html">ReplaceRegExp</a> Task. In this way every time I do an ant compile, it will update my build number and modification date.</div><div>What this task does is find this 2 lines in my Library.as file:</div><div><br /></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><span style="color: #0053ff">public</span> <span style="color: #0053ff">static</span> <span style="color: #0053ff">const</span> BUILD_DATE: String = <span style="color: #ab1500">'20100131'</span>;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">and</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><span style="color: #0053ff">public</span> <span style="color: #0053ff">static</span> <span style="color: #0053ff">const</span> BUILD_NUMBER: String = <span style="color: #ab1500">'5'</span>;</p><p></p></div><div><br /></div><div>then replace the BUILD_DATE const with the current date and the BUILD_NUMBER with an incremental build number. After being executed the first time, ant will also create a new file in your directory called "build.number" with the latest build number int.</div><div><br /></div><div><br /></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2010/01/update_your_app_version_using_ant_bui.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2010/01/update_your_app_version_using_ant_bui.php</guid>
         <category>actionscript</category>
         <pubDate>Sun, 31 Jan 2010 11:48:41 +0100</pubDate>
      </item>
      
      <item>
         <title>Vector.splice bug</title>
         <description><![CDATA[Ususally people complain about opensource projects because they lack of documentation ( that's true most of the times.. ), but this doens't happen only there...<div><br /></div><div>Today I've spent a lot of time trying to understand why I was so stupid because I wasn't able to concatenate 2 vectors of int using splice.</div><div>But for what you can read from the *<b>official*</b>&nbsp;Adobe <a href="http://livedocs.adobe.com/flex/3/langref/Vector.html#splice()">documentation</a>,&nbsp;which says (about the third parameter for the splice method):</div><div><br /></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; "><code style="font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; "><a href="http://livedocs.adobe.com/flex/3/langref/statements.html#..._(rest)_parameter" style="color: rgb(0, 0, 204); text-decoration: none; ">...</a>&nbsp;<span class="label" style="color: rgb(68, 68, 68); font-weight: bold; ">items</span></code>&nbsp;-- An optional list of one or more comma-separated values, **<b>or a Vector**</b>, to insert into the Vector at the position specified in the&nbsp;<code style="font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">startIndex</code>&nbsp;parameter.</span></div><div><br /></div><div>Ok, that's why I didn't know why I couldn't manage to make it work! This simple code gives wrong results:</div><div><br /></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><span style="color: #78aad6">var</span> v1: Vector.&lt;int&gt; = <span style="color: #0053ff">new</span> Vector.&lt;int&gt;();</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">v1.push(1);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">v1.push(2);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">v1.push(3);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">v1.push(4);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco"><span style="color: #78aad6">var</span> v2: Vector.&lt;int&gt; = <span style="color: #0053ff">new</span> Vector.&lt;int&gt;();</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">v2.push(100);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">v2.push(200);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco">v1.splice( 1, 1, v2 );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #4f76cb">// Expected result: [1,100,200,3,4]</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #4f76cb">// Actual result: [1,0,3,4]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; color: #4f76cb"><br /></p></div><p>It seems that the third parameter is being casted into int and so only '0' has been inserted into the first Vector!&nbsp;</p><p>I tried to look into <b>Adobe jira bugbase</b> and what I've found <a href="http://bugs.adobe.com/jira/browse/FP-1349">there</a> is that it was a known bug since long time and it has been also moved to the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=472207">tamarin bugbase</a>.</p><p>The problem is that at the end they simply closed the bug as invalid bug because the documentation was wrong!</p><p>Funny</p><p><br /></p>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2010/01/vectorsplice_bug.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2010/01/vectorsplice_bug.php</guid>
         <category>actionscript</category>
         <pubDate>Wed, 27 Jan 2010 01:28:54 +0100</pubDate>
      </item>
      
      <item>
         <title>Alchemy installation problems under OSX</title>
         <description><![CDATA[<p>I&#8217;m writing this little issue I discovered today in the alchemy installation under OSX, in case someone else is having the same problem&#8230;<div>In fact, today I decided to makes a little swc library for an actionscript project using alchemy ( because of the lacks of union in flash ), so I downloaded the <a href="http://labs.adobe.com/technologies/alchemy/">alchemy toolkit for OSX</a>.<div>I spent a couple of hours trying to make it working on my Snow Leopard and because I&#8217;m not a shell and perl expert I finally moved to the linux toolkit under ubuntu ( even if on linux the Flex builder is really far to be usable!)</div><div><br /></div><div>Anyway, this evening I decided to spend some more time trying to understand why when I was trying to execute the alchemy &#8220;<b>gcc</b>&#8221; script ( the ones inside the <i>achacks</i> folder, which is a perl script) nothing happened.</div><div>After long time with old style &#8220;print&#8221; debugging strategy, at the end I discovered an error in the &#8220;<b>config</b>&#8221; script in the main alchemy installation folder.</div><div><br /></div><div>At this line (line 33):</div><div><pre>if echo $MACHTYPE | grep darwin &amp;&gt; /dev/null; then</pre></div><div><br /></div><div>I had to modify it into:</div><div><pre>if echo $MACHTYPE | grep -i darwin &amp;&gt; /dev/null; then</pre></div><div><br /></div><div>because the command &#8220;echo $MACHTYPE&#8221; outputs &#8220;<b>x86_64-Apple-Darwin</b>&#8221;, with the uppercase &#8220;D&#8221;.</div><div><br /></div><div>In fact, after that modification everything finally worked!</div><div><br /></div></div></p>
]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2010/01/alchemy_installation_problems_under_o.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2010/01/alchemy_installation_problems_under_o.php</guid>
         <category>actionscript</category>
         <pubDate>Thu, 07 Jan 2010 22:01:08 +0100</pubDate>
      </item>
      
      <item>
         <title>Flex 3 Tree double-click to edit</title>
         <description><![CDATA[<span class="Apple-style-span" style="font-family: 'trebuchet ms', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; ">Some people asked about changing the default editing behavior of a Flex 3 Tree control so &nbsp;that item editing starts on a double-click event instead of the default single click.</span><div><font class="Apple-style-span" face="'trebuchet ms', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif">Indeed it has been covered several times on forums or mailing list, but it's faster to create a simple script than search for it sometimes.</font></div><div><font class="Apple-style-span" face="'trebuchet ms', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif"><br /></font></div><div><font class="Apple-style-span" face="'trebuchet ms', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif">Here's the files:</font></div><div><font class="Apple-style-span" face="'trebuchet ms', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif"><a href="http://www.sephiroth.it/weblog/archives/2009/12/23/src.zip">Download Source</a></font></div><div><font class="Apple-style-span" face="'trebuchet ms', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif"><a href="http://www.sephiroth.it/weblog/archives/2009/12/23/tree_double_click.html">Run the demo</a></font></div><div><font class="Apple-style-span" face="'trebuchet ms', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif"><br /></font></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/12/flex_3_tree_double-click_to_edit.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/12/flex_3_tree_double-click_to_edit.php</guid>
         <category>flex</category>
         <pubDate>Wed, 23 Dec 2009 16:24:52 +0100</pubDate>
      </item>
      
      <item>
         <title>Flash Player 10.1 and global error handling</title>
         <description><![CDATA[Well, it seems that the upcoming <a href="http://labs.adobe.com/technologies/flashplayer10/">flashplayer 10.1</a> (first half of 2010?) has been completely designed to fill the gap that the current flashplayer has with the <a class="zem_slink freebase/en/smartphone rdfa" href="http://en.wikipedia.org/wiki/Smartphone" title="Smartphone" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/smartphone" property="ctag:label">smartphones</a> world (multitouch, accelerometer, screen orientation, sleep mode, out-of-memory management, etc..).<div>There will be a lot of new useful features, if you look at the release note pdf:&nbsp;<a href="http://labs.adobe.com/technologies/flashplayer10/releasenotes.pdf">http://labs.adobe.com/technologies/flashplayer10/releasenotes.pdf</a></div><div><br /></div><div>But the most important feature, for me (as <a href="http://www.sephiroth.it/weblog/archives/2009/09/add_system_excepthook_in_actionscript.php">I asked a little time ago</a>), is indeed the <b>global error handling</b>!</div><div>Unfortunately the global error handling feature hasn't been already implemented in the current prerelease public version. I hope they will enable this feature soon, I really miss this option!</div><div><br /></div>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=6700bf42-181b-4426-8617-97ad9431426f" style="border:none;float:right" /><span class="zem-script more-related more-info pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/12/flash_player_101_and_global_error_han.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/12/flash_player_101_and_global_error_han.php</guid>
         <category>actionscript</category>
         <pubDate>Tue, 15 Dec 2009 14:58:17 +0100</pubDate>
      </item>
      
      <item>
         <title>Apple is evil and developers are not stupid</title>
         <description><![CDATA[<div>If you're an iPhone developer probably you have been involved in the&nbsp;<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Arial, sans-serif; line-height: 19px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">messy<span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(51, 51, 51); ">&nbsp;App Store publishing process.</span></span></div><div><br /></div><div>Here there is a very interesting post about the Apple's mistakes:&nbsp;<a href="http://www.paulgraham.com/apple.html">http://www.paulgraham.com/apple.html</a></div><div>More or less I'm completely agree with the author, especially about the app store policies, because I tested in first person. There would be dozen of other topics I can found about it, but the app store is the perfect example.</div><div><br /></div><div>But yesterday I discovered this post: "<a href="http://www.quirksmode.org/blog/archives/2009/11/apple_is_not_ev.html">Apple is not evil. iPhone developers are stupid</a>".</div><div>After reading that post I realized that developers are stupid because they pretend to publish their applications on the App Store! Wow, I never thought about this! When I signed the iphone sdk I didn't read anywhere that I should publish my applications on the web because the app store is a mess!</div><div>I don't question the fact that many applications could be published on the web, but that's is another thing. The point is: I have the choice and I want to choose.</div><div><br /></div><div>So the conclusion is that we are stupid because <b>we don't understand how much Apple is evil</b> and we don't publish applications on the web instead of trying to publish them on the App Store!</div><div>The assumption is that I have an application that could be either published on the app store as standalone application and on the web, and is my mistake if I want to publish on the app store.&nbsp;</div><div><br /></div><div>So why apple simply doesn't close the App Store for us poor developers and keeps it only for the big companies which pay in order to be in the front page?</div><div><br /></div><div><br /></div><div><br /></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/11/apple_is_evil_and_developers_are_not.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/11/apple_is_evil_and_developers_are_not.php</guid>
         <category>iphone</category>
         <pubDate>Wed, 25 Nov 2009 08:48:43 +0100</pubDate>
      </item>
      
      <item>
         <title>New Actionscript Editor coming?</title>
         <description><![CDATA[<div><font class="Apple-style-span" face="'Trebuchet MS', Tahoma, Arial" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 18px;"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.sephiroth.it/weblog/archives/2009/11/12/realaxy.png"><img alt="realaxy.png" src="http://www.sephiroth.it/weblog/archives/assets_c/2009/11/realaxy-thumb-200x132-26.png" width="200" height="132" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></a></span></span></font></div><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS', Tahoma, Arial; font-size: 12px; line-height: 18px; ">See videos of an alpha editor from Realaxy:&nbsp;<span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><a href="http://www.cleoag.ru/2009/11/12/langenfew-secret-videos-langenlangru-langru/" style="text-decoration: underline; ">http://www.cleoag.ru/...-langru/</a></span></span></div><div><div>Hope not Eclipse based this time!</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/11/new_actionscript_editor_coming.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/11/new_actionscript_editor_coming.php</guid>
         <category>actionscript</category>
         <pubDate>Thu, 12 Nov 2009 10:51:16 +0100</pubDate>
      </item>
      
      <item>
         <title>Thoughts about flash on the iPhone</title>
         <description><![CDATA[ <p>I didn't have the chance yet to try out <strong>Flash CS5</strong>, but I'm still a bit concerned about the <a href="http://www.adobe.com/devnet/logged_in/abansod_iphone.html">new feature</a> that makes users able to compile their own application into valid iPhone apps.</p>
<p>Things look really good if you look at the examples and if you talk with the people that already had the chance to try this feature out. But I must remember that usually the excitement for a new - and let's say outstanding - feature usually cannot guarantee the final result to be acceptable. I fear that this feature might evolve the same - bad - way as Alchemy did: they started with a promising project that then felt down to a side project because many users shown that it was possible to achieve the same or better results by just using plain AS.</p>
<p>A few weeks ago I started spending my free time on experimenting with generating a valid iPhone app from a SWF file. I didn't know anything about the fact that the Adobe would have put the same feature in Flash CS5.<br/> My approach wasn't too sophisticated: basically, as long as I didn't have so much time to spend on writing a full binary converter, I was <strong>parsing the SWF and then generating static Objective-C/C++</strong> (well mostly C++ and I've used Objective-C as glue where strictly required) code that then was <strong>compiled by Xcode</strong> to a working iPhone application.<br/>
I stopped once I figured out that Adobe was going to promote a similar thing (even if <strong>their approach is better</strong> and probably more powerful), but I had time to figure out a few issues that they may encounter (or maybe they already encountered):
</p>
<ul>
<li>Generated applications are <strong>really big in size</strong>, mostly because there is a lot of glue code generated and because you need to replicate the FPL API in C++ to be able to <em>easilly</em> convert the SWF into an iPhone app;</li>
<li>ActionScript is a dynamic language, and this dynamicity must be taken into account when generating binary code (or source code in my situation). Even if using <a href="http://llvm.org/">LLVM</a> probably helped with this, you will always need to generate additional dynamic checks that slow down a lot the execution;</li>
<li>The FPL doesn't support (yet) threading API, nor the AIR version does. So, if they want to preserve the portability of a flash game so it can be run with AIR or on the iPhone without any change, they are limiting the developers on building just quite simple games;</li>
<li>The same can be said for all the other native APIs. AIR for instance has multitouch API, which are however at a lower level then the ones provided by the iPhone;</li>
<li>The other big issue is <strong>rendering performance</strong>. When I was working on my project, I've tried many different approaches to figure out which one was the best to render decent vector graphics with a good framerate on the iPhone. Core Graphics is not an option, as long as it is as slow as hell. Using OpenGL to render the graphics increases a lot the performances, but adds a few limits to the rendering quality. The best approach I found was to mix caching and OpenGL rendering together, but that was not working fine with rapidly changing graphics. But I must say I didn't have the same knowledge as the FPL developers on this topic and I didn't have months to work on that too ...</li>
<li>iPhone developers must take special care for memory and resource management; probably having a huge bootstrapping code and transition structures won't help.</li>
</ul>
<p>What I fear most actually is that they'll be able sooner or later to solve all the issues and create a good product, but probably that product won't be suitable for complex applications, that will be always developed directly using XCode.</p>
<p>That said, I think that probably a better approach would have been to figure out a way for Adobe to include the Flash Player on the iPhone. It's already ready and I really can't understand why they don't release it (<strong>it must be Apple</strong>, and probably because having a <em>Virtual Machine</em> on the system will break the basis the App Store has been built over).<br/> Having the FPL on the iPhone will still limit us, but it will open up a brighter future for AS developers who want to release apps that runs on the iPhone too (Did you ever heard about <em>compile once, run everywhere</em>?).</p>
<p>So let's wait and see what happens. What I've seen so far on the app store are really simple games that don't use so much resources, so I can't really say yet if they did a great job or not ...</p>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/10/thoughts_about_flash_on_the_iphone.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/10/thoughts_about_flash_on_the_iphone.php</guid>
         <category>actionscript</category>
         <pubDate>Fri, 09 Oct 2009 09:46:51 +0100</pubDate>
      </item>
      
      <item>
         <title>Flash for iPhone!</title>
         <description><![CDATA[Well, <b>it's not</b> true at all, but it's something like that ( they enabled this by using the Low Level Virtual Machine (<a href="http://www.llvm.org/" style="text-decoration: underline; ">LLVM</a>) compiler infrastructure).<div><div>With the upcoming Flash CS5 we will able to create iPhone applications using Actionscript 3 and the Flash IDE (Flash CS5)!</div><div>It also seems that in the future it will be possible to compile iPhone apps using the free flash compiler.</div><div><br /></div><div>We won't have flash iphone apps, but native iphone applications: "i<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px; ">Phone applications built with Flash Platform tools are compiled into standard, native iPhone executable packages and there is no runtime interpreter that could be used to run Flash byte-code within the application".</span></div><div><font class="Apple-style-span" color="#000000" face="Arial, Helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 16px;"><br /></span></font></div><div><font class="Apple-style-span" color="#000000" face="Arial, Helvetica, sans-serif" size="3"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 16px;">Most of the Flash Player 10 and AIR 2.0 APIs will be available, so for instance: <b>pixel</b><b> Bender</b> filters and also <b>dy</b><span class="Apple-style-span" style="line-height: 18px; "><b>namically loading SWFs</b> that contain ActionScript (but the Actionscript will be ignored since there's no flash VM in the iphone).</span></span></font></font></div><div><font class="Apple-style-span" color="#000000" face="Arial, Helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 18px;"><br /></span></font></div><div><font class="Apple-style-span" color="#000000" face="Arial, Helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; color: rgb(51, 51, 51); "><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; ">The Cons.</span></div></span></span></font></div><div><font class="Apple-style-span" color="#000000" face="Arial, Helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 18px;">We won't be able to test our apps using the Mac iPhone simulator. &nbsp;And we cannot use the iPhone controls with actionscript.&nbsp;</span></font></div><div><font class="Apple-style-span" color="#000000" face="Arial, Helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 12px; line-height: 18px;"><br /></span></font></div><div>Read original entry here:</div><div><a href="http://www.adobe.com/devnet/logged_in/abansod_iphone.html">http://www.adobe.com/devnet/logged_in/abansod_iphone.html</a></div><div><br /></div><div>Read the developers' FAQ:</div><div><a href="http://labs.adobe.com/wiki/index.php/Applications_for_iPhone:Developer_FAQ">http://labs.adobe.com/...Applications_for_iPhone:Developer_FAQ</a></div><div><br /></div><div><br /></div></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/10/flash_for_iphone.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/10/flash_for_iphone.php</guid>
         <category>actionscript</category>
         <pubDate>Mon, 05 Oct 2009 21:28:00 +0100</pubDate>
      </item>
      
      <item>
         <title>Add system excepthook in actionscript!</title>
         <description><![CDATA[Imagine you've made a very huge flash application and many users will play with it every day.<div>Imagine they don't have the flashplayer debug installed and at certain points they fall into undiscovered application bugs ( it's impossible to have a real bug free application, we know this ).</div><div>Then, what happens? With the flashplayer debug installed you can see the traceback and you can also continue or dismiss the code execution. But without the debug player? The code will try to continue but probably at that point your application is broken and users will feel it more and more uncomfortable with it.</div><div><br /></div><div><b>What I would like to have in flash</b>, and probably you too, is a global system exception handling for those unhandled exception.</div><div>&nbsp;In this way you can both present the problem to your users and then also create a report system which will help you to improve and fix your own application!</div><div><br /></div><div>Something like I did with <a href="http://sourceforge.net/projects/sepy/develop">SEPY</a> years ago using the <b><a href="http://effbot.org/pyref/sys.excepthook.htm">sys.excepthook</a></b> of python:</div><div><br /></div><div><span class="Apple-style-span" style="font-style: italic; ">When an exception is raised and uncaught, the interpreter calls sys.excepthook with three arguments, the exception class, exception instance, and a traceback object. In an interactive session this happens just before control is returned to the prompt; in a Python program this happens just before the program exits. The handling of such top-level exceptions can be customized by assigning another three-argument function to sys.excepthook.</span></div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/09/add_system_excepthook_in_actionscript.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/09/add_system_excepthook_in_actionscript.php</guid>
         <category>actionscript</category>
         <pubDate>Fri, 18 Sep 2009 19:08:48 +0100</pubDate>
      </item>
      
      <item>
         <title>Welcome to Myna, newest Aviary bird!</title>
         <description><![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.sephiroth.it/weblog/archives/assets_c/2009/09/myna-23.php" onclick="window.open('http://www.sephiroth.it/weblog/archives/assets_c/2009/09/myna-23.php','popup','width=1066,height=741,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.sephiroth.it/weblog/archives/assets_c/2009/09/myna-thumb-300x208-23.png" width="300" height="208" alt="myna.png" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></a></span> <div>Today <a href="http://aviary.com">Aviary</a> released a new tool of his suite: <b>Myna</b>.</div><div>Myna is a powerful online audio editor, made by Alan Queen, which allows to create quickly audio remix.</div><div>You can upload, record or just use one of the tons of available clips ( thanks to the partnership with <a href="http://www.apmmusic.com/">APM Music</a> and its <a href="http://qt.apmmusic.com/pr/apm/qt/about-us.aspx">Quantum tracks</a> library ) to create cool audio mix.&nbsp;</div><div><br /></div><div>More about Myna:</div><div><div><b>Powerful Clip Editing</b></div><div>Trim, Loop, Stretch and Reverse your audio clips, width editable loop points, and interactive time stretch capabilities.</div><div><br /></div><div><b>Automation</b></div><div>Easily add fade-ins, fade-outs, pan from left to right, and modify gain over time, with editable control points.</div><div><br /></div><div><b>Effects</b></div><div>Add non-destructive effects to your audio clips including Pitch Change, Reverb, Delay, Parametric EQ, and more.</div><div><br /></div><div><b>Import / Export</b></div><div>Import your own audio files, or search one of our provided libraries. Mix it down and export directly to your desktop or publish back to your account.</div><div><br /></div><div>Let's enjoy it!</div></div><div><br /></div><div><a href="http://www.youtube.com/watch?v=_3-VWMKpQiI">See a demo on YouTube</a>.</div>]]></description>
         <link>http://www.sephiroth.it/weblog/archives/2009/09/welcome_to_myna_newest_aviary_bird.php</link>
         <guid>http://www.sephiroth.it/weblog/archives/2009/09/welcome_to_myna_newest_aviary_bird.php</guid>
         <category>aviary</category>
         <pubDate>Wed, 16 Sep 2009 18:22:14 +0100</pubDate>
      </item>
      
   </channel>
</rss>
