<?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>w3blog &#187; Flash</title>
	<atom:link href="http://wahlers.com.br/claus/blog/category/webdev/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://wahlers.com.br/claus/blog</link>
	<description>Claus Wahlers on Application Development, Web Standards and what not</description>
	<lastBuildDate>Thu, 22 Jul 2010 18:23:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SWF Timeline Reconstruction with as3swf</title>
		<link>http://wahlers.com.br/claus/blog/timeline-reconstruction-with-as3swf/</link>
		<comments>http://wahlers.com.br/claus/blog/timeline-reconstruction-with-as3swf/#comments</comments>
		<pubDate>Sat, 08 May 2010 06:01:22 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[SWF]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/?p=167</guid>
		<description><![CDATA[In case you havent heard of it yet, as3swf is an ActionScript 3 library to parse and publish SWF files. It does that rather well by now, providing full roundtrip publishing, plus some neat extra features like shape export to AS3 Drawing API, AS3 GraphicsObjects, FXG, and Objective-C. Whenever i find some free time i&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>In case you havent heard of it yet, <a href="http://github.com/claus/as3swf">as3swf</a> is an ActionScript 3 library to parse and publish SWF files. It does that rather well by now, providing full roundtrip publishing, plus some neat extra features like shape export to AS3 Drawing API, AS3 GraphicsObjects, <a href="http://wiki.github.com/claus/as3swf/shape-export-to-fxg">FXG</a>, and <a href="http://wiki.github.com/claus/as3swf/shape-export-to-objective-c">Objective-C</a>.</p>
<p>Whenever i find some free time i&#8217;m working on adding new, useful features. One feature of as3swf, that i haven&#8217;t talked about much yet but is implemented for quite a while already, is the reconstruction of timelines as you know them from Adobe&#8217;s Flash IDEs.</p>
<p>In the first place, timelines in as3swf help you to export and render layered animations. Having a long list of parsed SWF tags won&#8217;t help much if you want to export or render frame X, as the Flash Player would display it.</p>
<p><strong>Flash Player Display List</strong></p>
<p>When executing a SWF, the Flash Player reads sequentially through all its tags, from start to end, and builds and maintains an internal display list along the way. This display list is manipulated by <code>PlaceObject</code> and <code>RemoveObject</code> tags, and rendered every time the Flash Player encounters a <code>ShowFrame</code> tag. Characters placed on the display list by <code>PlaceObject</code> tags stay on the display list until they are removed by a <code>RemoveObject</code> tag. <code>PlaceObject</code> tags are also used to manipulate a previously placed character (tweens).</p>
<p>In order to figure out which characters are displayed how and at which depths in any given frame, as3swf simulates the Flash Player behavior and builds its own display list structures while parsing the tags.</p>
<p>as3swf&#8217;s <code>SWF</code> (root) and <code>TagDefineSprite</code> (movieclips) classes each have a <code>timeline</code> property, containing an instance of the <code>SWFTimeline</code> class. Other than the <code>tags</code> itself, this class contains the following goodies:</p>
<ul>
<li><code>dictionary</code> &#8211; Contains references to all characters that may be placed on the display list. The dictionary&#8217;s key is the character ID as defined by the definition tag, the value is the index of the definition tag.</li>
<li><code>scenes</code> &#8211; Lists all scenes with their names and frame numbers.</li>
<li><code>frames</code> &#8211; Lists all frames. For each frame, you can access the contained characters and their depths, what tag placed the character on the display list, what tag modified its transformation/color matrices if any (for tweens) and whether this frame is a key frame or not.</li>
<li><code>layers</code> &#8211; Lists all layers. Each layer contains an array of active frames.</li>
<li><code>soundStream</code> &#8211; If present, contains this timeline&#8217;s sound stream complete with raw MP3 data, start frame, length, number of samples etc.</li>
</ul>
<p><strong>Example</strong></p>
<p>Consider the following very simple FLA. It has two layers, one containing a motion tween, the other a static on-stage shape starting at frame 5:</p>
<p><img src="http://wahlers.com.br/claus/blog/wp-content/uploads/MotionTweenFLA.png" alt="" /></p>
<p>Published to SWF:</p>
<p>
<object width="180" height="160">
<param name="movie" value="http://wahlers.com.br/claus/blog/wp-content/uploads/MotionTween.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="180" height="160" src="http://wahlers.com.br/claus/blog/wp-content/uploads/MotionTween.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>Parsed by as3swf, we get these timeline infos (get the <a href="http://wahlers.com.br/claus/blog/wp-content/uploads/MotionTween.txt">full trace dump here</a>):</p>
<pre><code>  Scenes:
    Name: Scene 1, Frame: 0
  Frames:
    [0] Start: 0, Length: 9
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, IsKeyframe
    [1] Start: 9, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 9
    [2] Start: 11, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 11
    [3] Start: 13, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 13
    [4] Start: 15, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 15
    [5] Start: 17, Length: 4
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 17
      Depth: 3 (Layer 1), CharacterId: 3, PlacedAt: 19, IsKeyframe
    [6] Start: 21, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 21
      Depth: 3 (Layer 1), CharacterId: 3, PlacedAt: 19
    [7] Start: 23, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 23
      Depth: 3 (Layer 1), CharacterId: 3, PlacedAt: 19
    [8] Start: 25, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 25
      Depth: 3 (Layer 1), CharacterId: 3, PlacedAt: 19
    [9] Start: 27, Length: 2
      Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 27
      Depth: 3 (Layer 1), CharacterId: 3, PlacedAt: 19
  Layers:
    [0] Frames 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
    [1] Frames 5, 6, 7, 8, 9</code></pre>
<p>Lets take a closer look at frame 6:</p>
<pre><code>  [5] Start: 17, Length: 4
    Depth: 1 (Layer 0), CharacterId: 2, PlacedAt: 5, LastModifiedAt: 17
    Depth: 3 (Layer 1), CharacterId: 3, PlacedAt: 19, IsKeyframe</code></pre>
<p>This tells us that this frame:</p>
<ul>
<li>displays character ID 2 (the red square movieclip) at depth 1. This character was originally placed on the display list by tag index 5 and was modified by tag index 17 (this character is tweened).</li>
<li>displays character ID 3 (the blue square shape) at depth 3. This character was placed on the display list by tag index 19. As the character was placed in this very frame, this is a key frame.</li>
<li>starts at tag index 17 and consumes 4 tags total:
<pre><code><span style="color:blue">17: </span>[26:PlaceObject2] Depth: 1, Matrix: (1,1,0,0,1400,400)
<span style="color:blue">18: </span>[83:DefineShape4] ID: 3, EdgeBounds: (2200,3200,1800,2800)
      FillStyles:
        [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000FF
      LineStyles:
        [1] [SWFLineStyle2] Width: 200, Color: FF000000
      ShapeRecords:
        [SWFShapeRecordStyleChange] MoveTo: 3200,1800, FillStyle1: 1, LineStyle: 1
        [SWFShapeRecordStraightEdge] Vertical: 1000
        [SWFShapeRecordStraightEdge] Horizontal: -1000
        [SWFShapeRecordStraightEdge] Vertical: -1000
        [SWFShapeRecordStraightEdge] Horizontal: 1000
        [SWFShapeRecordEnd]
<span style="color:blue">19: </span>[26:PlaceObject2] Depth: 3, CharacterID: 3, Matrix: (1,1,0,0,0,0)
<span style="color:blue">20: </span>[01:ShowFrame]</code></pre>
</li>
</ul>
<p>As you can see, this info is a quite exact reconstruction of the original FLA&#8217;s timeline, and can be used to rebuild the original FLA (XFL, rather), to publish SWFs to run natively on alternative runtimes and platforms (HTML5, iPhone OS), or as a very first step to creating a web based version of the Flash IDE.</p>
<p>Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/timeline-reconstruction-with-as3swf/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>&#8220;Flash is as open as HTML5&#8243; &#8211; No, it isn&#8217;t.</title>
		<link>http://wahlers.com.br/claus/blog/flash-is-as-open-as-html5-no-it-isnt/</link>
		<comments>http://wahlers.com.br/claus/blog/flash-is-as-open-as-html5-no-it-isnt/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 10:49:26 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/?p=162</guid>
		<description><![CDATA[Lately, Adobe representatives and Flash fan boys alike became more vocal than usual about the alleged openness of Flash. This is probably spurred by the proposed feature set of HTML5, as well as the decisions of a certain vendor to ban Flash from some of their products, both potentially being threats to Adobe and the [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, Adobe representatives and Flash fan boys alike became more vocal than usual about the alleged openness of Flash. This is probably spurred by the proposed feature set of HTML5, as well as the decisions of a certain vendor to ban Flash from some of their products, both potentially being threats to Adobe and the Flash Platform.</p>
<p>I originally posted the following article as comment to an article by Serge Jespers, &#8220;<a href="http://www.webkitchen.be/2010/04/22/flash-is-as-open-as-html5/">Flash is as open as HTML5</a>&#8220;. Serge is an Adobe Platform Evangelist. I thought this comment deserves its own post, so here we go.</p>
<blockquote><p>No, it isn’t.</p>
<p>And it is beyond me why so many independent Flash Platform developers fail to see it. I completely understand of course why Adobe evangelists downplay it.</p>
<p>It is irrelevant for the so called “open web” whether the Flash Player is going to get open sourced or not. That’s not the point. Microsoft won’t open source their browser, Opera won’t open source their browser, etc.</p>
<p>Relevant is who decides about the development of the data format that a runtime consumes, and the APIs a runtime provides to access that data. In the Flash world that’s SWF and the Flash Player APIs, both controlled by a single vendor: Adobe. In the HTML world that’s HTML and DOM, controlled by many vendors, including you and me, via standards bodies.</p>
<p>Adobe neither provides formal means for other companies and individuals to participate in the development of SWF and Flash Player APIs, nor does it provide detailed work-in-progress specs to the general public for discussion. This effectively rules out the possibility for third parties to provide alternative runtimes. The runtime and its specs are released to the public at the same time.</p>
<p>This is the exact opposite of “open”.</p>
<p>To make matters worse, the specs released by Adobe are incomplete and buggy (e.g. the SWF spec fails to explain how exactly shapes are supposed to be rendered and leaves out information on codecs, the ABC spec is plain wrong on some things) and generally infested with patented technologies.</p>
<p>Of course i understand why it is how it is (and likely always will be). If Adobe were to become truly open and put the development of SWF etc in the hands of standards bodies, the 1.5 year release cycle would become a 10+ years release cycle. Innovation would slow down significantly. I as a Flash Platform developer wouldn’t want that to happen.</p>
<p>However, sorry to say that, but to tout “Flash is as open as HTML5″ is pure FUD.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/flash-is-as-open-as-html5-no-it-isnt/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>SWFtrospection</title>
		<link>http://wahlers.com.br/claus/blog/swftrospection/</link>
		<comments>http://wahlers.com.br/claus/blog/swftrospection/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 21:58:10 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[SWF]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/?p=151</guid>
		<description><![CDATA[Open Flash CS4, create new AS3 FLA, add as3swf.swc and paste this on frame 1: import com.codeazur.as3swf.SWF; var swf:SWF = new SWF(root.loaderInfo.bytes); trace(swf); Trace output: [SWF] Header: Version: 10 FileLength: 149405 FileLengthCompressed: 149405 FrameSize: (550,400) FrameRate: 24 FrameCount: 1 Tags: [69:FileAttributes] AS3: true, HasMetadata: false, UseDirectBlit: false, UseGPU: false, UseNetwork: false [09:SetBackgroundColor] Color: #FFFFFF [86:DefineSceneAndFrameLabelData] [...]]]></description>
			<content:encoded><![CDATA[<p>Open Flash CS4, create new AS3 FLA, add <a href="http://github.com/claus/as3swf/blob/master/bin/as3swf.swc">as3swf.swc</a> and paste this on frame 1:</p>
<pre><code>import com.codeazur.as3swf.SWF;
var swf:SWF = new SWF(root.loaderInfo.bytes);
trace(swf);</code></pre>
<p>Trace output:</p>
<pre><code>[SWF]
  Header:
    Version: 10
    FileLength: 149405
    FileLengthCompressed: 149405
    FrameSize: (550,400)
    FrameRate: 24
    FrameCount: 1
  Tags:
    [69:FileAttributes] AS3: true, HasMetadata: false,
      UseDirectBlit: false, UseGPU: false, UseNetwork: false
    [09:SetBackgroundColor] Color: #FFFFFF
    [86:DefineSceneAndFrameLabelData]
      Scenes:
        [0] Frame: 0, Name: Scene 1
    [82:DoABC] Lazy: true, Length: 149219
    [76:SymbolClass]
      Symbols:
        [0] TagID: 0, Name: Untitled_fla.MainTimeline
    [01:ShowFrame]
    [00:End]</code></pre>
<p>Excercise: Draw something on stage, and run the code again.</p>
<p>Want more? Drop by my session <a href="http://www.fitc.ca/events/presentations/presentation.cfm?event=101&#038;presentation_id=1078">Hacking SWF</a> at <a href="http://www.fitc.ca/events/about/?event=101">FITC Amsterdam</a> (Feb 22th, 16:00).</p>
<p>[Edit] <a href="http://twitter.com/jimcheng">Jim Cheng</a> deserves credits. He was the one who whispered &#8220;root.loaderInfo.bytes&#8221; into my virtual ear on IM.</p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/swftrospection/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Custom Installer For Adobe AIR Applications</title>
		<link>http://wahlers.com.br/claus/blog/custom-installer-for-adobe-air-applications/</link>
		<comments>http://wahlers.com.br/claus/blog/custom-installer-for-adobe-air-applications/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 07:47:28 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex 2]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/custom-installer-for-adobe-air-applications/</guid>
		<description><![CDATA[I need a custom installer for an AIR application i&#8217;m currently developing. That&#8217;s because my AIR app needs additional functionality that the AIR runtime doesn&#8217;t provide (specifically: detecting USB storage devices, act as a TCP socket server, talk to Last.fm scrobbler plugins). For that purpose i wrote a local RPC socket server gateway in C [...]]]></description>
			<content:encoded><![CDATA[<p>I need a custom installer for an AIR application i&#8217;m currently developing. That&#8217;s because my AIR app needs additional functionality that the AIR runtime doesn&#8217;t provide (specifically: detecting USB storage devices, act as a TCP socket server, talk to Last.fm scrobbler plugins). For that purpose i wrote a local RPC socket server gateway in C (one for Mac OS X and one for Windows) which always runs once the user logs in to her OS. The AIR application can then call methods on that local gateway, or receive events.</p>
<p>The problem is that the user needs to install the RPC server before she installs the actual AIR application. The install process should be seamless (one installer installs RPC server, AIR runtime if needed, and the application itself in one go)  and the installer should be as small as possible. Currently there is no info available from Adobe on how to write custom installers that automatically download/install the AIR runtime if needed (is there?).</p>
<p>Artemis is another project aiming at extending AIR using a local socket server, but it seems that the project has been shut down because of the reasons stated above.</p>
<p>So i have been pulling out my hair lately on how to solve that problem.</p>
<p>I think i found a feasible solution. I am not sure because i haven&#8217;t tested all this, but i wanted to throw it online for discussion. The drawback is that the user needs to install your application with a OS native custom installer.</p>
<p>First you write standard installers for both Mac OS X and Windows, that install the local socket server either as a service/daemon or as an agent so that the server always starts at system launch or user login. Nothing special here yet.</p>
<p>The trick would be to write a simple SWHX application that basically implements the code included with the AIR Installer badge. That helper application can then be included with the installer, which executes it after the local socket server has been installed.</p>
<p>As i said i haven&#8217;t tested this yet (will do soonish), but this should work, no?</p>
<p>The question remains why i don&#8217;t just use SWHX for the main app and screw AIR alltogether.</p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/custom-installer-for-adobe-air-applications/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FZip Alpha Release: Create And Modify ZIP Archives</title>
		<link>http://wahlers.com.br/claus/blog/fzip-alpha-release-create-and-modify-zip-archives/</link>
		<comments>http://wahlers.com.br/claus/blog/fzip-alpha-release-create-and-modify-zip-archives/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 20:08:25 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex 2]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/fzip-alpha-release-create-and-modify-zip-archives/</guid>
		<description><![CDATA[FZip has been around for some time now, and people seem to like it. However one feature has been asked for repeatedly: In addition to reading ZIP archive, people want to be able to create new (and modify existing) archives. So i finally sat down this weekend and added that. The code is not tested [...]]]></description>
			<content:encoded><![CDATA[<p>FZip has been around for some time now, and people seem to like it. However one feature has been asked for repeatedly: In addition to reading ZIP archive, people want to be able to create new (and modify existing) archives.</p>
<p>So i finally sat down this weekend and added that.</p>
<p>The code is not tested very well (it works for me but may not work for you)  and has no ASDocs yet, so i release it as an alpha version, with the hope of massive bug feedback.. :)</p>
<p>Download: <a href="http://codeazur.com.br/lab/fzip/download/fzip_1_0_52_alpha.zip" style="text-decoration: line-through" title="FZip 1.0.52 Alpha">fzip_1_0_52_alpha.zip</a> <a href="http://codeazur.com.br/lab/fzip/download/fzip.zip" title="FZip">fzip.zip</a></p>
<p>New methods in class FZip:</p>
<ul>
<li>addFile(name:String, date:Date, content:ByteArray)</li>
<li>addFileAt(index:uint, name:String, date:Date, content:ByteArray)</li>
<li>removeFileAt(index:uint)</li>
<li>serialize(stream:IDataOutput)</li>
</ul>
<p>Sample code:</p>
<pre style="margin-left: 20px"><code><span style="color: #808080; font-style: italic">// Create file contents</span>
<span style="color: #000000; font-weight: bold">var</span> ba:ByteArray = <span style="color: #000000; font-weight: bold">new</span> ByteArray<span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>;
ba.<span style="color: #006600">writeUTFBytes</span><span style="color: #66cc66">(</span><span style="color: #ff0000">"Hello World!"</span><span style="color: #66cc66">)</span>;
<span style="color: #808080; font-style: italic">// Create ZIP archive and add file</span>
<span style="color: #000000; font-weight: bold">var</span> zip:FZip = <span style="color: #000000; font-weight: bold">new</span> FZip<span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>;
zip.<span style="color: #006600">addFile</span><span style="color: #66cc66">(</span><span style="color: #ff0000">"hello.txt"</span>, <span style="color: #000000; font-weight: bold">null</span>, ba<span style="color: #66cc66">)</span>;
<span style="color: #808080; font-style: italic">// Serialize ZIP into a new file</span>
<span style="color: #808080; font-style: italic">// (we use the Adobe AIR specific class FileStream here,</span>
<span style="color: #808080; font-style: italic">// but you can as well use ByteArray </span></code><code><span style="color: #808080; font-style: italic">or anything that</span></code><code><span style="color: #808080; font-style: italic"></span>
<span style="color: #808080; font-style: italic">// implements IDataOutput)</span>
<span style="color: #000000; font-weight: bold">var</span> file:File = File.<span style="color: #006600">applicationStorageDirectory</span>;
file = file.<span style="color: #006600">resolvePath</span><span style="color: #66cc66">(</span><span style="color: #ff0000">"hello.zip"</span><span style="color: #66cc66">)</span>;
<span style="color: #000000; font-weight: bold">var</span> stream:FileStream = <span style="color: #000000; font-weight: bold">new</span> FileStream<span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>;
stream.<span style="color: #006600">open</span><span style="color: #66cc66">(</span>file, FileMode.<span style="color: #006600">WRITE</span><span style="color: #66cc66">)</span>;
zip.<span style="color: #006600">serialize</span><span style="color: #66cc66">(</span>stream<span style="color: #66cc66">)</span>;
stream.<span style="color: #0066cc">close</span><span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/fzip-alpha-release-create-and-modify-zip-archives/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>FZip, AIRRemoteUpdater Upgraded for AIR Beta 2</title>
		<link>http://wahlers.com.br/claus/blog/fzip-airremoteupdater-upgraded-for-air-beta-2/</link>
		<comments>http://wahlers.com.br/claus/blog/fzip-airremoteupdater-upgraded-for-air-beta-2/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 11:28:04 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex 2]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/fzip-airremoteupdater-upgraded-for-air-beta-2/</guid>
		<description><![CDATA[Just a quick FYI: FZip and AIRRemoteUpdater upgrades for AIR Beta 2 are now available for download. FZip now uses ByteArray.uncompress(CompressionAlgorithm.DEFLATE) instead of the now deprecated ByteArray.inflate(). I also tweaked FZip to throw an exception when a parsing error occurs and no event listener is registered for FZipErrorEvent.PARSE_ERROR events. AIRRemoteUpdater now gets the local descriptor [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick FYI: <a href="http://codeazur.com.br/lab/fzip/" title="FZip">FZip</a> and <a href="http://codeazur.com.br/lab/airremoteupdater/" title="AIRRemoteUpdater">AIRRemoteUpdater</a> upgrades for AIR Beta 2 are now available for download.</p>
<p>FZip now uses <code>ByteArray.uncompress(CompressionAlgorithm.DEFLATE)</code> instead of the now deprecated <code>ByteArray.inflate()</code>. I also tweaked FZip to throw an exception when a parsing error occurs and no event listener is registered for <code>FZipErrorEvent.PARSE_ERROR events</code>.</p>
<p>AIRRemoteUpdater now gets the local descriptor XML via <code>Shell.shell.applicationDescriptor</code> which was added in AIR Beta 2, and uses the upgraded FZip sources.</p>
<p>Enjoy, and please let me know if you run into any problems with this new release.</p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/fzip-airremoteupdater-upgraded-for-air-beta-2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Automating remote software updates in Adobe AIR applications</title>
		<link>http://wahlers.com.br/claus/blog/automating-remote-software-updates-in-adobe-air-applications/</link>
		<comments>http://wahlers.com.br/claus/blog/automating-remote-software-updates-in-adobe-air-applications/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 14:01:43 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex 2]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/automating-remote-software-updates-in-adobe-air-applications/</guid>
		<description><![CDATA[I just released the first version of AIR Remote Updater, an AS3 class to automate remote software updates in Adobe AIR applications. It transparently checks version numbers, downloads the .AIR installer file if needed and triggers the AIR-native update process. It grabs the version number directly from the remote .AIR file without having to download [...]]]></description>
			<content:encoded><![CDATA[<p>I just released the first version of <a href="http://codeazur.com.br/lab/airremoteupdater/">AIR Remote Updater</a>, an AS3 class to  automate remote software updates in Adobe AIR applications.</p>
<p>It transparently checks version numbers, downloads the .AIR installer  file if needed and triggers the AIR-native update process.</p>
<p>It grabs the version number directly from the remote .AIR file without  having to download the entire file, eliminating the potential error  prone need of having to put a separate descriptor file online along with  the .AIR installer file.</p>
<p>Background:</p>
<p>An .AIR installer file is a PKZIP archive containing metadata files  along with the packaged application files. The files contained in a .AIR  installer file are, in this order:</p>
<ol>
<li>/mimetype</li>
<li>/META-INF/AIR/application.xml (contains version info)</li>
<li>/META-INF/AIR/hash</li>
<li>/META-INF/signatures.xml</li>
<li>packaged application files</li>
</ol>
<p>The file we are interested in, /META-INF/AIR/application.xml (the  &#8220;application descriptor file&#8221; that contains the version number), is  always the second file in the archive. AIR Remote Updater uses FZip to  stream in the remote .AIR until (and only until) the application  descriptor file has loaded. We can then close the stream, uncompress  that file and extract the version number.</p>
<p>More info and download here:<br />
<a href="http://codeazur.com.br/lab/airremoteupdater/" class="moz-txt-link-freetext">http://codeazur.com.br/lab/airremoteupdater/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/automating-remote-software-updates-in-adobe-air-applications/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FZip Update</title>
		<link>http://wahlers.com.br/claus/blog/fzip-update/</link>
		<comments>http://wahlers.com.br/claus/blog/fzip-update/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 20:41:45 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex 2]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/fzip-update/</guid>
		<description><![CDATA[We just released an update for FZip (the Actionscript 3 class library to load standard ZIP archives and extract/decompress contained files): Added support for Adobe Air. The Adobe Air runtime provides a low level inflate method, making it possible to load any ZIP archive and decompress compressed files without the need of injecting Adler32 checksums. [...]]]></description>
			<content:encoded><![CDATA[<p>We just released an update for <a href="http://codeazur.com.br/lab/fzip/">FZip</a> (the Actionscript 3 class library to load standard ZIP archives and extract/decompress contained files):</p>
<ul>
<li>Added support for <a href="http://labs.adobe.com/technologies/air/">Adobe Air</a>. The Adobe Air runtime provides a low level inflate method, making it possible to load any ZIP archive and decompress compressed files without the need of injecting Adler32 checksums.</li>
<li>Added FZipLibrary class for higher level access to files in a ZIP  archive. &#8220;FZipLibrary processes files (based on file extensions) from an  FZip instance and converts them into usable formats. Files can be  converted to either a BitmapData or DisplayObject classes. Data embedded  in SWF files (like classes) can also be retrieved. Flash&#8217;s built-in  Loader class is used to convert formats, so the only formats currently  supported are ones that Loader supports. As of this writing they are  SWF, JPEG, GIF, and PNG.&#8221;</li>
<li>Bug fix: There was a problem with filenames containing special  characters. Filename encoding now defaults to UTF-8. In case the  filenames are encoded differently in your ZIP, you can specify the  encoding in the FZip constructor.</li>
</ul>
<p>Special thanks to Daniel Wabyick at Adobe for contributing the Adobe Air support!</p>
<p>Enjoy!</p>
<p><a href="http://codeazur.com.br/lab/fzip/">http://codeazur.com.br/lab/fzip/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/fzip-update/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Adobe Apollo and Last.fm: Proof of concept</title>
		<link>http://wahlers.com.br/claus/blog/adobe-apollo-and-lastfm-proof-of-concept/</link>
		<comments>http://wahlers.com.br/claus/blog/adobe-apollo-and-lastfm-proof-of-concept/#comments</comments>
		<pubDate>Fri, 25 May 2007 21:07:16 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/adobe-apollo-and-lastfm-proof-of-concept/</guid>
		<description><![CDATA[I have been toying around with the idea to write an Adobe Apollo application that&#8217;s able to monitor your favorite media player (such as Winamp, Windows Media Player, iTunes, Rhythmbox, etc) for play back status and song information. Last.fm provides an application along with plugins for pretty much all existing media players on all major [...]]]></description>
			<content:encoded><![CDATA[<p>I have been toying around with the idea to write an Adobe Apollo application that&#8217;s able to monitor your favorite media player (such as Winamp, Windows Media Player, iTunes, Rhythmbox, etc) for play back status and song information.</p>
<p>Last.fm provides an application along with plugins for pretty much all existing media players on all major platforms (Windows, MacOS, Linux, etc) that does exactly that. During installation of the Last.fm client, the user is prompted to install the required plugins for the media players she uses. When a media player executes and plays a song, the plugin establishes a TCP socket connection with the client application and sends status and song infos.</p>
<p>The problem: The Apollo runtime (alpha) that is currently  available on Adobe Labs doesn&#8217;t provide any documented way of (a) talking to shared libraries, (b) launching executables or (c) serving as a socket server, and Adobe indicated that Apollo likely is not going to support those features in it&#8217;s 1.0 release version.</p>
<p>There is hope though. Afaik, the last word on launching executables at runtime from an Apollo app isn&#8217;t spoken yet, and there exist some undocumented hacks that enable Apollo apps to do just that. If Adobe should decide against letting apps launch executables, then the only way of solving it is to provide second installers that install a socket server of some sort to do the dirty work.</p>
<p>However, i sat down last night and wrote a proof of concept Flash application that can live in Apollo, which talks to a custom daemon via sockets. The daemon in this proof of concept runs as a Windows Service. I took the Last.fm iTunes  plugin and modified a bit so that it also connects to that daemon. The daemon then simply echoes the messages it receives from the Last.fm plugin to the socket listener in Flash. Voilà.</p>
<p>Here&#8217;s a screenshot of the app in action (iTunes on top, Flash below):</p>
<p><img src="http://wahlers.com.br/claus/blog/wp-images/apolloscrobbler_itw.png" title="iTunes talking to Flash" alt="iTunes talking to Flash" height="452" width="374" /></p>
<p><strong>[Update]</strong> I also modified the Last.fm Windows Media Player plugin to work with my daemon. All plugins can be used simultaneously. See this screenshot (Windows Media Player on top, Flash below):</p>
<p><img src="http://wahlers.com.br/claus/blog/wp-images/apolloscrobbler_wmp.png" title="Windows Media Player talking to Flash" alt="Windows Media Player talking to Flash" height="497" width="374" /></p>
<p>Note that this is only a proof of concept, and sources aren&#8217;t ready for release yet. I would very much like to make this an open source project (The Last.fm plugins are released under GPL), so if there are any interested developers out there who like to help, please contact me or leave a comment. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/adobe-apollo-and-lastfm-proof-of-concept/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flashconference 2007, May 4th, Stuttgart, Germany</title>
		<link>http://wahlers.com.br/claus/blog/flashconference-2007-may-4th-stuttgart-germany/</link>
		<comments>http://wahlers.com.br/claus/blog/flashconference-2007-may-4th-stuttgart-germany/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 13:01:33 +0000</pubDate>
		<dc:creator>Claus Wahlers</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://wahlers.com.br/claus/blog/flashconference-2007-may-4th-stuttgart-germany/</guid>
		<description><![CDATA[Just to let you know that i&#8217;ll be speaking at the 9th annual Flashconference in Stuttgart, Germany on May 4th. My presentation is about the new Actionscript 3 Flash UI Components that come with Adobe Flash CS3. I&#8217;ll give an overview on what&#8217;s new, what&#8217;s different with respect to previous components sets and Flex, if [...]]]></description>
			<content:encoded><![CDATA[<p>Just to let you know that i&#8217;ll be speaking at the <span class="vevent">9th annual <a href="http://www.flashconference.de/" class="summary url" title="flashconference 2007">Flashconference</a> in <span class="location">Stuttgart, Germany</span> on <abbr class="dtstart" title="20070504">May 4th</abbr></span>. My presentation is about the new Actionscript 3 Flash UI Components that come with Adobe Flash CS3. I&#8217;ll give an overview on what&#8217;s new, what&#8217;s different with respect to previous components sets and Flex, if and how to use them and how to skin and subclass them. I was part of the CS3 components dev team together with the guys at <a href="http://gskinner.com/">gskinner.com</a> so hopefully i have some interesting things to show. If things work out well i&#8217;ll probably also be showing some <a href="http://osflash.org/fc64/" title="Flash Commodore 64 emulator">FC64</a> stuff i was working on lately.</p>
<p>If you&#8217;re in central Europe early May, please drop by. Among others, <a href="http://quasimondo.com/">Mario Klingemann</a>, <a href="http://void.andre-michelle.com/">Andre Michelle</a>, <a href="http://www.peterelst.com/blog/">Peter Elst</a> and <a href="http://www.marcosweskamp.com/blog/">Marcos Weskamp</a> will be presenting, and as the flashconference is taking place as part of the fmx (&#8220;12th International Conference on Animation, Effects, Realtime and Content&#8221;, May 1st-4th), there&#8217;s almost a full week of top notch events to attend.</p>
<p>Check out the full schedule <a href="http://www.fmx.de/E.2562.html" title="fmx/events | flashconference">here</a>.</p>
<p>I&#8217;ll stay in Germany  for two weeks and will be traveling Munich, Stuttgart and Bremen, so if you like to meet, please drop me a line!</p>
]]></content:encoded>
			<wfw:commentRss>http://wahlers.com.br/claus/blog/flashconference-2007-may-4th-stuttgart-germany/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
