<?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>JActionScripters</title>
	<atom:link href="http://blog.jactionscripters.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jactionscripters.com</link>
	<description>More than 20 Japanese flash coders share the blog/ You will be junkie for this crazy Japanese Flash news</description>
	<lastBuildDate>Sun, 20 Jun 2010 10:03:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Correction of a sample code in &#8220;Using the Text Layout Framework&#8221; of the CS5 help</title>
		<link>http://blog.jactionscripters.com/2010/06/02/correction-of-a-sample-code-in-using-the-text-layout-framework-of-the-cs5-help/</link>
		<comments>http://blog.jactionscripters.com/2010/06/02/correction-of-a-sample-code-in-using-the-text-layout-framework-of-the-cs5-help/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 07:18:45 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1325</guid>
		<description><![CDATA[&#8220;Using the Text Layout Framework&#8221; in &#8220;ActionScript 3.0 Developer&#8217;s Guide&#8221; on the Flash CS5 help includes some example codes to show how to use the Text Layout Framework. However, the second example in the section &#8220;The Text Layout Framework View&#8221; yields errors. The following two corrections should be made.
First, insert the xmlns attribute into the [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;<a href="http://help.adobe.com/en_US/as3/dev/WSb2ba3b1aad8a27b0-1b8898a412218ad3df9-8000.html" target="_blank">Using the Text Layout Framework</a>&#8221; in &#8220;ActionScript 3.0 Developer&#8217;s Guide&#8221; on the Flash CS5 help includes some example codes to show how to use the Text Layout Framework. However, <a href="http://help.adobe.com/en_US/as3/dev/WS14c3067b34b57c6d4a97343b122ab36a52f-7ff4.html#WS14c3067b34b57c6d4a97343b122ab36a52f-7ff2" target="_blank">the second example</a> in the section &#8220;<a href="http://help.adobe.com/en_US/as3/dev/WS14c3067b34b57c6d4a97343b122ab36a52f-7ff4.html" target="_blank">The Text Layout Framework View</a>&#8221; yields errors. The following two corrections should be made.</p>
<p>First, insert the xmlns attribute into the Flow element of the XML data (markup).</p>
<blockquote><p><font color="#999999">// var markup:XML = &lt;TextFlow&gt;&lt;p&gt;&lt;span&gt;Hello, World&lt;/span&gt;&lt;/p&gt;&lt;/TextFlow&gt;;</font><br />
var markup:XML = &lt;TextFlow <font color="#0000FF"><strong>xmlns=&#8217;http://ns.adobe.com/textLayout/2008&#8242;</strong></font>&gt;&lt;p&gt;&lt;span&gt;Hello, World&lt;/span&gt;&lt;/p&gt;&lt;/TextFlow&gt;;
</p></blockquote>
<p>Second, the method updateAllContainers() is not implemented in the IFlowComposer interface.  Use the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/compose/IFlowComposer.html?filter_flash=cs5&#038;filter_flashplayer=10.1&#038;filter_air=2#updateAllControllers()" target="_blank"><em>updateAllControllers()</em> method</a> instead.</p>
<blockquote><p><font color="#999999">// myFlow.flowComposer.updateAllContainers();</font><br />
myFlow.flowComposer.<strong><font color="#0000FF">updateAllControllers</font></strong>();</p></blockquote>
<p>The corrected frame action below works and shows the text in the top left corner of the stage.</p>
<p><code-style></p>
<pre name="code" class="as3">// import necessary classes
import flashx.textLayout.container.*;
import flashx.textLayout.compose.*;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.conversion.TextConverter;

// first, create a TextFlow instance named myFlow
// var markup:XML = &lt;TextFlow&gt;&lt;p&gt;&lt;span&gt;Hello, World&lt;/span&gt;&lt;/p&gt;&lt;/TextFlow&gt;;
var markup:XML = &lt;TextFlow xmlns='http://ns.adobe.com/textLayout/2008'&gt;&lt;p&gt;&lt;span&gt;Hello, World&lt;/span&gt;&lt;/p&gt;&lt;/TextFlow&gt;;
var myFlow:TextFlow = TextConverter.importToFlow(markup, TextConverter.TEXT_LAYOUT_FORMAT);

// second, create a controller
// the first parameter, this, must point to a DisplayObjectContainer
// the last two parameters set the initial size of the container in pixels
var contr:ContainerController = new ContainerController(this, 600, 600);

// third, associate it with the flowComposer property
myFlow.flowComposer.addController(contr);

// fourth, update the display list ;
// myFlow.flowComposer.updateAllContainers();
myFlow.flowComposer.updateAllControllers();</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/06/02/correction-of-a-sample-code-in-using-the-text-layout-framework-of-the-cs5-help/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a class in flashx.textLayout package prevents the constructor from accessing Stage</title>
		<link>http://blog.jactionscripters.com/2010/05/22/using-a-class-in-flashx-textlayout-package-prevents-the-constructor-from-accessing-stage/</link>
		<comments>http://blog.jactionscripters.com/2010/05/22/using-a-class-in-flashx-textlayout-package-prevents-the-constructor-from-accessing-stage/#comments</comments>
		<pubDate>Sat, 22 May 2010 08:41:33 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1289</guid>
		<description><![CDATA[&#8220;Text Layout Framework example: News layout&#8221; in the [Help] yields the run-time error #1009.  Because using a class in flashx.textLayout package prevents the constructor from accessing the Stage instance.
Note: The code has already been fixed. But it is good to know how to access the Stage object when classes in flashx.textLayout package are used. [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;<a href="http://help.adobe.com/en_US/as3/dev/WS14c3067b34b57c6d4a97343b122ab36a52f-7fed.html" target="_blank">Text Layout Framework example: News layout</a>&#8221; in the [Help] yields the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/runtimeErrors.html#1009" target="_blank">run-time error #1009</a>.  Because using a class in flashx.textLayout package prevents the constructor from accessing the Stage instance.</p>
<p><strong>Note</strong>: The code has already been fixed. But it is good to know how to access the Stage object when classes in flashx.textLayout package are used. (2010/06/20)</p>
<p>As the test script below shows, the Stage object is available after the <a href="http://help.adobe.com/ja_JP/Flash/CS5/AS3LR/flash/display/DisplayObject.html#event:addedToStage" target="_blank">DisplayObject.addedToStage event</a>, which is dispatched twice.</p>
<p><code-style></p>
<pre name="code" class="as3">package {
	import flash.display.Sprite;
	import flash.events.Event;
	import flashx.textLayout.elements.TextFlow;
	public class TextLayoutFormatTest extends Sprite {
		public function TextLayoutFormatTest() {
			var my_fmt:TextFlow;
			trace("constructor", stage, parent);
			addEventListener(Event.ADDED_TO_STAGE, onAdded);
		}
		private function onAdded(eventObject:Event):void {
			trace(stage, parent);
		}
	}
}</pre>
<p></code></p>
<blockquote><p>// [Output]:<br />
constructor null null<br />
[object Stage] [object Loader]<br />
[object Stage] [object Stage]</p></blockquote>
<p>As for the prior example in the [Help], TLFNewsLayout class, the statements in the constructor should be moved into a listener method of the <em>DisplayObject.addedToStage</em> event as follows:</p>
<p><code-style></p>
<pre name="code" class="as3">package {
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.geom.Rectangle;

	import flashx.textLayout.compose.StandardFlowComposer;
	import flashx.textLayout.container.ContainerController;
	import flashx.textLayout.container.ScrollPolicy;
	import flashx.textLayout.conversion.TextConverter;
	import flashx.textLayout.elements.TextFlow;
	import flashx.textLayout.formats.TextLayoutFormat;

	public class TLFNewsLayout extends Sprite {
		private var hTextFlow:TextFlow;
		private var headContainer:Sprite;
		private var headlineController:ContainerController;
		private var hContainerFormat:TextLayoutFormat;

		private var bTextFlow:TextFlow;
		private var bodyTextContainer:Sprite;
		private var bodyController:ContainerController;
		private var bodyTextContainerFormat:TextLayoutFormat;

		private const headlineMarkup:String = "<flow:TextFlow xmlns:flow='http://ns.adobe.com/textLayout/2008'><flow:p textAlign='center'><flow:span fontFamily='Helvetica' fontSize='18'>TLF News Layout Example</flow:span><flow:br/><flow:span fontFamily='Helvetica' fontSize='14'>This example formats text like a newspaper page with a headline, a subtitle, and multiple columns</flow:span></flow:p></flow:TextFlow>";

		private const bodyMarkup:String = "<flow:TextFlow xmlns:flow='http://ns.adobe.com/textLayout/2008' fontSize='12' textIndent='10' marginBottom='15' paddingTop='4' paddingLeft='4'><flow:p marginBottom='inherit'><flow:span>There are many </flow:span><flow:span fontStyle='italic'>such</flow:span><flow:span> lime-kilns in that tract of country, for the purpose of burning the white marble which composes a large part of the substance of the hills. Some of them, built years ago, and long deserted, with weeds growing in the vacant round of the interior, which is open to the sky, and grass and wild-flowers rooting themselves into the chinks of the stones, look already like relics of antiquity, and may yet be overspread with the lichens of centuries to come. Others, where the lime-burner still feeds his daily and nightlong fire, afford points of interest to the wanderer among the hills, who seats himself on a log of wood or a fragment of marble, to hold a chat with the solitary man. It is a lonesome, and, when the character is inclined to thought, may be an intensely thoughtful occupation; as it proved in the case of Ethan Brand, who had mused to such strange purpose, in days gone by, while the fire in this very kiln was burning.</flow:span></flow:p><flow:p marginBottom='inherit'><flow:span>The man who now watched the fire was of a different order, and troubled himself with no thoughts save the very few that were requisite to his business. At frequent intervals, he flung back the clashing weight of the iron door, and, turning his face from the insufferable glare, thrust in huge logs of oak, or stirred the immense brands with a long pole. Within the furnace were seen the curling and riotous flames, and the burning marble, almost molten with the intensity of heat; while without, the reflection of the fire quivered on the dark intricacy of the surrounding forest, and showed in the foreground a bright and ruddy little picture of the hut, the spring beside its door, the athletic and coal-begrimed figure of the lime-burner, and the half-frightened child, shrinking into the protection of his father's shadow. And when again the iron door was closed, then reappeared the tender light of the half-full moon, which vainly strove to trace out the indistinct shapes of the neighboring mountains; and, in the upper sky, there was a flitting congregation of clouds, still faintly tinged with the rosy sunset, though thus far down into the valley the sunshine had vanished long and long ago.</flow:span></flow:p></flow:TextFlow>";

		public function TLFNewsLayout() {
			addEventListener(Event.ADDED_TO_STAGE, initialize);
		}
		function initialize(eventObject:Event):void {
			removeEventListener(Event.ADDED_TO_STAGE, initialize);
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;

			// Headline text flow and flow composer
			hTextFlow = TextConverter.importToFlow(headlineMarkup,TextConverter.TEXT_LAYOUT_FORMAT);
			hTextFlow.flowComposer = new StandardFlowComposer();

			// initialize the headline container and controller objects
			headContainer = new Sprite();
			headlineController = new ContainerController(headContainer);
			headlineController.verticalScrollPolicy = ScrollPolicy.OFF;
			hContainerFormat = new TextLayoutFormat();
			hContainerFormat.paddingTop = 4;
			hContainerFormat.paddingRight = 4;
			hContainerFormat.paddingBottom = 4;
			hContainerFormat.paddingLeft = 4;

			headlineController.format = hContainerFormat;
			hTextFlow.flowComposer.addController(headlineController);
			addChild(headContainer);
			stage.addEventListener(flash.events.Event.RESIZE, resizeHandler);

			// Body text TextFlow and flow composer
			bTextFlow = TextConverter.importToFlow(bodyMarkup,TextConverter.TEXT_LAYOUT_FORMAT);
			bTextFlow.flowComposer = new StandardFlowComposer();

			// The body text container is below, and has three columns
			bodyTextContainer = new Sprite();
			bodyController = new ContainerController(bodyTextContainer);
			bodyTextContainerFormat = new TextLayoutFormat();
			bodyTextContainerFormat.columnCount = 3;
			bodyTextContainerFormat.columnGap = 30;

			bodyController.format = bodyTextContainerFormat;
			bTextFlow.flowComposer.addController(bodyController);
			addChild(bodyTextContainer);
			resizeHandler(null);
		}

		private function resizeHandler(event:Event):void {
			const verticalGap:Number = 25;
			const stagePadding:Number = 16;
			var stageWidth:Number = stage.stageWidth - stagePadding;
			var stageHeight:Number = stage.stageHeight - stagePadding;
			var headlineWidth:Number = stageWidth;
			var headlineContainerHeight:Number = stageHeight;

			// Initial compose to get height of headline after resize
			headlineController.setCompositionSize(headlineWidth, headlineContainerHeight);
			hTextFlow.flowComposer.compose();
			var rect:Rectangle = headlineController.getContentBounds();
			headlineContainerHeight = rect.height;

			// Resize and place headline text container
			// Call setCompositionSize() again with updated headline height
			headlineController.setCompositionSize(headlineWidth, headlineContainerHeight );
			headlineController.container.x = stagePadding / 2;
			headlineController.container.y = stagePadding / 2;
			hTextFlow.flowComposer.updateAllControllers();

			// Resize and place body text container ;
			var bodyContainerHeight:Number = (stageHeight - verticalGap - headlineContainerHeight);
			bodyController.format = bodyTextContainerFormat;
			bodyController.setCompositionSize(stageWidth, bodyContainerHeight );
			bodyController.container.x = (stagePadding/2);
			bodyController.container.y = (stagePadding/2) + headlineContainerHeight + verticalGap;
			bTextFlow.flowComposer.updateAllControllers();
		}
	}
}</pre>
<p></code></p>
<div id="attachment_1319" class="wp-caption alignnone" style="width: 562px"><img src="http://blog.jactionscripters.com/wp-content/uploads/2010/05/TLFNewsLayout.gif" alt="The result of the TLFNewsLayout class" title="TLFNewsLayout" width="552" height="402" class="size-full wp-image-1319" /><p class="wp-caption-text">The result of the TLFNewsLayout class</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/05/22/using-a-class-in-flashx-textlayout-package-prevents-the-constructor-from-accessing-stage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NTT DoCoMo SH-07B Standby Widgets</title>
		<link>http://blog.jactionscripters.com/2010/05/18/ntt-docomo-sh-07b-standby-widgets/</link>
		<comments>http://blog.jactionscripters.com/2010/05/18/ntt-docomo-sh-07b-standby-widgets/#comments</comments>
		<pubDate>Tue, 18 May 2010 08:21:05 +0000</pubDate>
		<dc:creator>Yoshihiro Shindo</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1284</guid>
		<description><![CDATA[Today, the NTT DoCoMo has released some new products and services for this summer. One of them, &#8220;SH-07B&#8221; which is released from SHARP Corporation, has new function called &#8220;Standby Widgets&#8221; that was implemented by Yoshihiro Shindo (BeInteractive!, it&#8217;s me) and Yusuke Nakahara who belongs to the CD-IM. It was directed by Naoki Mima who belongs [...]]]></description>
			<content:encoded><![CDATA[<p>Today, the NTT DoCoMo has released some new products and services for this summer. One of them, &#8220;<a href="http://www.sharp.co.jp/products/sh07b/">SH-07B</a>&#8221; which is released from SHARP Corporation, has new function called &#8220;Standby Widgets&#8221; that was implemented by Yoshihiro Shindo (<a href="http://www.be-interactive.org/">BeInteractive!</a>, it&#8217;s me) and Yusuke Nakahara who belongs to the <a href="http://www.cd-im.jp/">CD-IM</a>. It was directed by Naoki Mima who belongs to the <a href="http://www.rightning.com/">Rightninc, Inc</a>. What I mentioned in my presentation at the FITC Toronto 2010 is about this.</p>
<p>&#8220;Standby Widgets&#8221; is a function that enables you to customize your standby screen. You can add, remove, or lay out built-in widgets as you like. There are some built-in widgets like bookmarks, calendar, and manner mode switch. Also you can change widget&#8217;s color to your favorite color. For phone and mail, it has a list that you can access recent calls or mails easily.</p>
<p><p>In all honesty, it&#8217;s not an amazing new function. However, a point is why the team has invited me. Can you make sense? Yes, it&#8217;s written by Flash (FlashLite). A special customized FlashLite engine has been provided by the device team, and all of &#8220;Standby Widgets&#8221; is running on it. This is our first answer of a question &#8220;Can we make better UI if we could use Flash?&#8221;.</p>
<p>Many Japanese mobile phone is high-spec actually, but its UI ruins the value of it, I think. In my view, this project is to improve it. Also I feel this project provides fun future to not only users of device but also Flash developers in the world.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/05/18/ntt-docomo-sh-07b-standby-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TETRIS on the beat !</title>
		<link>http://blog.jactionscripters.com/2010/05/15/tetris-on-the-beat/</link>
		<comments>http://blog.jactionscripters.com/2010/05/15/tetris-on-the-beat/#comments</comments>
		<pubDate>Fri, 14 May 2010 20:16:12 +0000</pubDate>
		<dc:creator>keim</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1270</guid>
		<description><![CDATA[
SiON TETRISizer &#8211; wonderfl build flash online
This is new demonstration of my AS3 software synthesize &#8216;SiON&#8217;. This work may remind someone of &#8216;LUMINES&#8217; (of cause this is one of my favorite games). The SiON can bring its feeling to your flash.
In this flash, I also use various libraries, betweenas3, froce55ing, minimalcomps and papervision3d.
I would like [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-1271" href="http://blog.jactionscripters.com/2010/05/15/tetris-on-the-beat/tetrision/"><img class="alignnone size-full wp-image-1271" title="Tetrision" src="http://blog.jactionscripters.com/wp-content/uploads/2010/05/Tetrision.png" alt="Tetrision" width="640" height="320" /></a></p>
<p><a title="SiON TETRISizer - wonderfl build flash online" href="http://wonderfl.net/c/f5eX">SiON TETRISizer &#8211; wonderfl build flash online</a></p>
<p>This is new demonstration of my AS3 software synthesize <a href="http://www.libspark.org/wiki/keim/SiON_e" target="_blank">&#8216;SiON&#8217;</a>. This work may remind someone of <a href="http://en.wikipedia.org/wiki/Lumines">&#8216;LUMINES&#8217;</a> (of cause this is one of my favorite games). The SiON can bring its feeling to your flash.<br />
In this flash, I also use various libraries, <a href="http://www.libspark.org/wiki/BetweenAS3/en">betweenas3</a>, <a href="http://www.libspark.org/wiki/nutsu/Frocessing/en">froce55ing</a>, <a href="http://www.minimalcomps.com/">minimalcomps</a> and <a href="http://blog.papervision3d.org/">papervision3d</a>.<br />
I would like to say thank you for all authors of these useful libraries.</p>
<p>Enjoy !</p>
<p><a href="http://www.libspark.org/wiki/keim/SiON_e" target="_blank">AS3 software synthesizer SiON Development Center</a> in <a href="http://www.libspark.org/wiki/WikiStart/en" target="_blank">spark project</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/05/15/tetris-on-the-beat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decrement versus Increment in Loop 2</title>
		<link>http://blog.jactionscripters.com/2010/05/01/decrement-versus-increment-in-loop-2/</link>
		<comments>http://blog.jactionscripters.com/2010/05/01/decrement-versus-increment-in-loop-2/#comments</comments>
		<pubDate>Sat, 01 May 2010 06:05:18 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1233</guid>
		<description><![CDATA[Adobe&#8217;s &#8220;Optimizing Performance for the Flash Platform&#8221; recommends that &#8220;Use reverse order for while loops&#8221; in its &#8220;Miscellaneous optimizations&#8221; section.  And in my last post, decrement was not explicitly faster than increment with the following code to compare them:


while (--i > -1)




while (++i < MAX_NUMBER)  // MAX_NUMBER is a constant


Difference was very little [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe&#8217;s &#8220;Optimizing Performance for the Flash Platform&#8221; recommends that &#8220;Use reverse order for while loops&#8221; in its &#8220;<a href="http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c3a0f5f19124318fc87b-7ffc.html" target="_blank">Miscellaneous optimizations</a>&#8221; section.  And in <a href="http://blog.jactionscripters.com/2010/04/12/decrement-versus-increment-in-loop/" target="_blank">my last post</a>, decrement was not explicitly faster than increment with <a href="http://wonderfl.net/c/pB5I" target="_blank">the following code</a> to compare them:</p>
<p><code-style></p>
<pre name="code" class="as3">
while (--i > -1)
</pre>
<p></code></p>
<p><code-style></p>
<pre name="code" class="as3">
while (++i < MAX_NUMBER)  // MAX_NUMBER is a constant
</pre>
<p></code></p>
<p>Difference was very little in my Mac OS environment. But in Internet Explorer 7 and Firefox 3/Flash Player 10/Windows Vista, decrement was faster up to twenty percent than increment.  After several trials, speed of operation between decrement and increment seems to be almost the same.  The condition of loop does not care if expression is decrement or increment.</p>
<p>The difference came from value to be compared with a counter variable. <a href="http://wonderfl.net/c/li9w" target="_blank">The new sample script</a> for increment below does not use a constant in the condition. Then its speed seems to be almost identical to the decrement's.</p>
<p><code-style></p>
<pre name="code" class="as3">
while (++i < &lt;the literal number&gt;)
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/05/01/decrement-versus-increment-in-loop-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AS3/Flash10 software synthesizer SiON goes to version 0.6</title>
		<link>http://blog.jactionscripters.com/2010/04/26/as3flash10-software-synthesizer-sion-goes-to-version-0-6/</link>
		<comments>http://blog.jactionscripters.com/2010/04/26/as3flash10-software-synthesizer-sion-goes-to-version-0-6/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 14:49:09 +0000</pubDate>
		<dc:creator>keim</dc:creator>
				<category><![CDATA[Library]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1216</guid>
		<description><![CDATA[
Now, the ActionScript software synthesizer &#8220;SiON&#8221; is updated to version 0.6. You can get the newest version from following link.
SiON Development Center in spark project
SiON version 0.60 ASDoc
In the SiON version 0.6, the interfaces are basically same as previous, but it suggests one new feature &#8220;SoundObject&#8221;. Here&#8217;s the example on wonderfl.
SiON SoundObject Quartet
The Arpeggiator, BassSequencer, [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-1215" href="http://blog.jactionscripters.com/2010/04/26/as3flash10-software-synthesizer-sion-goes-to-version-0-6/abcd/"><img class="size-full wp-image-1215" title="ABCD" src="http://blog.jactionscripters.com/wp-content/uploads/2010/04/ABCD.png" alt="SiON goes to version 0.60" width="640" height="240" /></a></p>
<p>Now, the ActionScript software synthesizer &#8220;SiON&#8221; is updated to version 0.6. You can get the newest version from following link.</p>
<p><a href="http://www.libspark.org/wiki/keim/SiON_e" target="_blank">SiON Development Center</a> in <a href="http://www.libspark.org/wiki/WikiStart/en" target="_blank">spark project</a><br />
<a href="http://www.libspark.org/htdocs/as3/sion/index.html" target="_blank">SiON version 0.60 ASDoc</a></p>
<p>In the SiON version 0.6, the interfaces are basically same as previous, but it suggests one new feature &#8220;SoundObject&#8221;. Here&#8217;s the example on wonderfl.</p>
<p><a href="http://wonderfl.net/c/9Xx7">SiON SoundObject Quartet</a></p>
<p>The Arpeggiator, BassSequencer, ChordPad and DrumMachine are the inheritances of SiON SoundObject. The SoundObject brings an feeling of &#8216;DisplayObject&#8217; to the operations of SiON&#8217;s synthesizer.</p>
<p>Let us explore a tidbit of sample&#8217;s source code. The concept of SiON SoundObject consists of 4 modules, the SiONDriver, SoundObjects, Synthesizers and Effectors (shown in line 16~54).</p>
<p>The SiONDriver is the centeral processing unit of all SiON&#8217;s sound, you have to create one new SiONDriver and call play() method. And you might access some SiONDriver&#8217;s properties and methods to set up general settings (BPM, effector and so on) (shown in line 76~83).<br />
<code>driver = new SiONDriver(); (line 65)<br />
...<br />
driver.autoStop = true;              // set auto stop after fade out<br />
driver.bpm = 132;                    // BPM = 132<br />
driver.effector.slot0 = [equaliser]; // The equaliser is applied to slot0 (master effector)<br />
driver.effector.slot1 = [delay];     // The delay effector is applied to slot1 (global effector)<br />
driver.effector.slot2 = [chorus];    // The chorus effector is applied to slot2 (global effector)<br />
driver.addEventListener(SiONTrackEvent.BEAT, _onBeat);           // handler for each beat<br />
driver.addEventListener(SiONEvent.STREAM_START, _onStartStream); // handler when streaming starts<br />
driver.addEventListener(SiONEvent.STREAM_STOP,  _onStopStream);  // handler when streaming stopped<br />
...<br />
driver.play(null, false); (line 193)<br />
</code><br />
The SoundObjects provides a sequence controler. You can control the sounding patterns in real time by properties (following code is from Arpeggiator&#8217;s setting line 91~101). In this exapmle, you can feel the SoundObject&#8217;s sound controling especially in the Arpeggiator&#8217;s large square pad. All SoundObject classes belong to <a href="http://www.libspark.org/htdocs/as3/sion/index.html?org/si/sound/package-detail.html&amp;org/si/sound/class-list.html">org.si.sound package</a>.<br />
<code>Ar = new Arpeggiator();<br />
Ar.scaleName = "o6Emp";             // scaled in E minor pentatonic on octave 6<br />
Ar.pattern = [0,1,2,3,4,2,3,1];     // basic pattern is "egababg" in MML<br />
Ar.noteLength = 1;                  // note langth = 16th<br />
Ar.gateTime = 0.2;                  // gate time = 0.2<br />
Ar.effectors = [autopan];           // apply auto-panning effector to Arpeggiator (local effector)<br />
Ar.volume = 0.3;                    // dry volume = 0.3<br />
Ar.effectSend1 = Ar.volume * 0.4;   // effect send for slot1 = 0.3 * 0.4 = 0.12<br />
Ar.effectSend2 = Ar.volume * 0.5;   // effect send for slot2 = 0.3 * 0.4 = 0.15<br />
...<br />
Ar.play(); (line 198)<br />
</code></p>
<p>The Synthesizers provides a voice controler. This class simplifys the SiONVoice&#8217;s settings, and supports a real-time voice charactor chagings on a SoundObject. In this example, some components are connected to the synthesizer&#8217;s properties (especially in BassSequencer&#8217;s envelop controls) and you may feel the voice character changing on it. (following code is from Arpeggiator&#8217;s WaveTableSynth line 106~109). All synthesizer classes belong to <a href="http://www.libspark.org/htdocs/as3/sion/index.html?org/si/sound/synthesizers/package-detail.html&amp;org/si/sound/synthesizers/class-list.html">org.si.sound.synthesizers package</a>.<br />
<code>waveTableSynth = new WaveTableSynth();<br />
waveTableSynth.color = 0x1203acff;  // wavecolor value<br />
waveTableSynth.releaseTime = 0.2;   // release time<br />
Ar.synthesizer = waveTableSynth;    // apply synthesizer<br />
</code></p>
<p>The Effectors represents the sound effector units. You can apply effectors to the SoundObject like filters to the DisplayObject (please refer above code).<br />
One remarkable point on effectors is that there are 3 types of connections, master, global and local effector. The master effector preocesses the final output of all SiON&#8217;s sound, the global effector preocesses the effect send pipe and the local effector processes only one SoundObject&#8217;s output. The arrow diagram of effector connection is as shown in below figure. All effector classes belong to <a href="http://www.libspark.org/htdocs/as3/sion/index.html?org/si/sion/effector/package-detail.html&amp;org/si/sion/effector/class-list.html">org.si.sion.effector package</a>.</p>
<div id="attachment_1217" class="wp-caption alignnone" style="width: 490px"><a rel="attachment wp-att-1217" href="http://blog.jactionscripters.com/2010/04/26/as3flash10-software-synthesizer-sion-goes-to-version-0-6/sioneffectconnection/"><img class="size-full wp-image-1217" title="SiONEffectConnection" src="http://blog.jactionscripters.com/wp-content/uploads/2010/04/SiONEffectConnection.png" alt="SiON SoundObject's Effector connection arrow diagram" width="480" height="180" /></a><p class="wp-caption-text">SiON SoundObject&#39;s Effector connection arrow diagram</p></div>
<p>The SiON&#8217;s SoundObject brings the simple interactive synthesizers to your flash contents. Enjoy it !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/04/26/as3flash10-software-synthesizer-sion-goes-to-version-0-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Decrement versus Increment in Loop</title>
		<link>http://blog.jactionscripters.com/2010/04/12/decrement-versus-increment-in-loop/</link>
		<comments>http://blog.jactionscripters.com/2010/04/12/decrement-versus-increment-in-loop/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 02:28:21 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1198</guid>
		<description><![CDATA[Adobe&#8217;s &#8220;Optimizing Performance for the Flash Platform&#8221; recommends that &#8220;Use reverse order for while loops&#8221; in its &#8220;Miscellaneous optimizations&#8221; section.


while (--i > -1)


But according to my test significant difference could not be found between  decrement and increment.  In other language they said that decrement and increment are identical.
The pre-increment/decrement is a little faster [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe&#8217;s &#8220;Optimizing Performance for the Flash Platform&#8221; recommends that &#8220;Use reverse order for while loops&#8221; in its &#8220;<a href="http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c3a0f5f19124318fc87b-7ffc.html" target="_blank">Miscellaneous optimizations</a>&#8221; section.</p>
<p><code-style></p>
<pre name="code" class="as3">
while (--i > -1)
</pre>
<p></code></p>
<p>But according to <a href="http://wonderfl.net/code/b367bc355256e499f86580359b5120053aa13c49" target="_blank">my test</a> significant difference could not be found between  decrement and increment.  In other language they said that <a href="http://social.msdn.microsoft.com/Forums/en-US/wptk_v4/thread/2e73042e-3ed4-4b16-a8e6-c3d5c350ff89" target="_blank">decrement and increment are identical</a>.</p>
<p>The pre-increment/decrement is a little faster than post, which is included in my test, though.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/04/12/decrement-versus-increment-in-loop/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quaternion notation of Vector3D</title>
		<link>http://blog.jactionscripters.com/2010/04/02/quaternion-notation-of-vector3d/</link>
		<comments>http://blog.jactionscripters.com/2010/04/02/quaternion-notation-of-vector3d/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 09:30:52 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1135</guid>
		<description><![CDATA[The [Help] of the Vecror3D.w property mentions about the quaternion notation as follows:
Quaternion notation employs an angle as the fourth element in its calculation of three-dimensional rotation. The w property can be used to define the angle of rotation about the Vector3D object.
But this sounds like explanation of the axis angle (see Orientation3D .AXIS_ANGLE Constant). [...]]]></description>
			<content:encoded><![CDATA[<p>The [Help] of the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/geom/Vector3D.html#w" target="_blank">Vecror3D.w property</a> mentions about the quaternion notation as follows:</p>
<blockquote><p>Quaternion notation employs an angle as the fourth element in its calculation of three-dimensional rotation. The w property can be used to define the angle of rotation about the Vector3D object.</p></blockquote>
<p>But this sounds like explanation of the axis angle (see <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/geom/Orientation3D.html#AXIS_ANGLE" target="_blank">Orientation3D .AXIS_ANGLE Constant</a>).  The axis angle uses a combination of an axis and an angle to determine the rotation.  For an argument of the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/geom/Matrix3D.html#decompose()" target="_blank">Matrix3D.decompose()</a> or <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/geom/Matrix3D.html#recompose()" target="_blank">Matrix3D.recompose()</a> method Orientation3D.AXIS_ANGLE can be specified as the orientation style used for the matrix transformation.</p>
<p>Try to rotate a Matrix3D object 180 degrees (&pi;) around the axis (1/&radic;2, 1/&radic;2, 0).</p>
<p><img src="http://blog.jactionscripters.com/wp-content/uploads/2010/04/ActionScript30for3D_04_054.gif" alt="The axis of rotation" title="The axis of rotation" width="362" height="362" class="alignnone size-full wp-image-1145" /></p>
<p><code-style></p>
<pre name="code" class="as3">
var myMatrix3D:Matrix3D = new Matrix3D();
var axis:Vector3D = new Vector3D(Math.SQRT1_2, Math.SQRT1_2,0);
myMatrix3D.prependRotation(180, axis);
var axisAngle:Vector3D = myMatrix3D.decompose(Orientation3D.AXIS_ANGLE)[1];
trace(axisAngle, axisAngle.w);
</pre>
<p></code></p>
<p>The frame action above outputs as follows:</p>
<blockquote><p>Vector3D(0.7071067094802856, 0.7071068286895752, -2.339619844353034e-24) 3.1415927410125732
</p></blockquote>
<p>[Note]: 0.707&#8230; = 1/&radic;2 and 3.14&#8230; = &pi; radians = 180 degrees.</p>
<p>The (x, y, z) coordinates represents the axis and Vector3D.w property is an angle of the rotation.  This result seems to fit the explanation of the [Help] quoted above.</p>
<p>But the quaternion notation determine the rotation by the four value.  The following expression of the quaternion Q represents the rotation of &theta; around the vector U.</p>
<blockquote><p>U = (x, y, z) and |U| = 1<br />
Q = (cos(&theta;/2); sin(&theta;/2)U)
</p></blockquote>
<p>Then try to rotate a Matrix3D object 60 degrees around the y axis (0, 1, 0).</p>
<p><code-style></p>
<pre name="code" class="as3">
var myMatrix3D:Matrix3D = new Matrix3D();
myMatrix3D.prependRotation(60, Vector3D.Y_AXIS);
var quaternion:Vector3D = myMatrix3D.decompose(Orientation3D.QUATERNION)[1];
trace(quaternion.w, quaternion);
</pre>
<p></code></p>
<p> The frame action above outputs as follows:</p>
<blockquote><p>0.8660253882408142 Vector3D(0, 0.4999999701976776, 0)</p></blockquote>
<p>These numbers represent the quaternion of 60 degrees&#8217; rotation.</p>
<blockquote><p>0.866&#8230; = cos(60/2) = cos(30)<br />
(0, 0.5, 0) = sin(60/2) (0, 1, 0)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/04/02/quaternion-notation-of-vector3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Return value of Matrix3D.recompose() method</title>
		<link>http://blog.jactionscripters.com/2010/03/05/return-value-of-matrix3d-recompose-method/</link>
		<comments>http://blog.jactionscripters.com/2010/03/05/return-value-of-matrix3d-recompose-method/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 16:38:34 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1108</guid>
		<description><![CDATA[The [Help] of the Matrix3D.recompose() method tells about its return value as follows:
Returns false if any of the scale elements are zero.
But this is not true.  Try the code below, in the 7th statement of which the third element, the z coordinate, of the scale Vector3D instance is set to zero.


var myMatrix3D:Matrix3D = new [...]]]></description>
			<content:encoded><![CDATA[<p>The [Help] of the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/geom/Matrix3D.html#recompose()"><em>Matrix3D.recompose()</em> method</a> tells about its return value as follows:</p>
<blockquote><p>Returns false if any of the scale elements are zero.</p></blockquote>
<p>But this is not true.  Try the code below, in the 7th statement of which the third element, the z coordinate, of the scale Vector3D instance is set to zero.</p>
<p><code-style></p>
<pre name="code" class="as3">
var myMatrix3D:Matrix3D = new Matrix3D();
trace(myMatrix3D.decompose());
// Output: Vector3D(0, 0, 0),Vector3D(0, 0, 0),Vector3D(1, 1, 1)
var myVector:Vector.&lt;Vector3D&gt; = new Vector.&lt;Vector3D&gt;();
myVector.push(new Vector3D());  // translation
myVector.push(new Vector3D());  // rotation
myVector.push(new Vector3D(1, 1, 0));  // scale
trace(myMatrix3D.recompose(myVector));
// Output: true
trace(myMatrix3D.decompose());
// Output: Vector3D(0, -1.9986319541931152, 0),Vector3D(-1.5707963705062866, NaN, 0),Vector3D(7.667765755019554e-19, -1.998608112335205, 1.9719639421382673e-19)
</pre>
<p></code></p>
<p>The method returns <em>true</em> as long as the argument of Vector instance has three Vector3D elements.  Therefore, the explanation in the [Help] should be rewritten as follows:</p>
<blockquote><p>Returns false if any of the Vector3D elements of the Vector instance as the argument don&#8217;t exist or are null.</p></blockquote>
<p><strong>Note</strong>: The coordinates of Vector3D elements come to be invalid values if any of the scale elements are zero.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/03/05/return-value-of-matrix3d-recompose-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculation in the Utils3D.projectVectors() method</title>
		<link>http://blog.jactionscripters.com/2010/02/01/calculation-in-the-utils3d-projectvectors-method/</link>
		<comments>http://blog.jactionscripters.com/2010/02/01/calculation-in-the-utils3d-projectvectors-method/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 23:11:06 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1073</guid>
		<description><![CDATA[The Utils3D.projectVectors() method projects a Vector of three-dimensional space coordinates to a Vector of two-dimensional space coordinates.  And the method also sets the t value of the uvt data.
The Utils3D.projectVectors() method calculates t value of the uvt data by the following formula:
t value = 1 / (Distance to the origin + z coordinate value)
Also, [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/geom/Utils3D.html#projectVectors()" target="_blank"><em>Utils3D.projectVectors()</em> method</a> projects a Vector of three-dimensional space coordinates to a Vector of two-dimensional space coordinates.  And the method also sets the t value of the uvt data.</p>
<div id="attachment_1078" class="wp-caption alignnone" style="width: 325px"><img src="http://blog.jactionscripters.com/wp-content/uploads/2010/02/Utils3D_projectVectors1.gif" alt="Calculation in the Utils3D.projectVectors() method" title="Utils3D.projectVectors() method" width="315" height="180" class="size-full wp-image-1078" /><p class="wp-caption-text">Values for the calculation in the Utils3D.projectVectors() method</p></div>
<p>The <em>Utils3D.projectVectors() </em>method calculates t value of the uvt data by the following formula:</p>
<blockquote><p>t value = 1 / (Distance to the origin + z coordinate value)</p></blockquote>
<p>Also, the method calculates projected x and y values by the following formula:</p>
<blockquote><p>Projected x or y value = Three-dimensional space x or y coordinate * Focal length * t value</p></blockquote>
<p>The frame action below compares the results of calculation by the formulas above with the methods&#8217;.  And [Output] is as follows:</p>
<blockquote><p>0,0,0.0004  // uvt data<br />
0.0004  // Calculated t value<br />
20,20  // Projected x and y coordinates<br />
20  // Calculated two-dimensional space x or y coordinate  </p></blockquote>
<p><code-style></p>
<pre name="code" class="as3">
var myPerspective:PerspectiveProjection = new PerspectiveProjection();
var myMatrix3D:Matrix3D = new Matrix3D();
var nDistance:Number = 1000;  // Distance to the origin
var nX:Number = 100;  // Three-dimensional space x or y coordinate
var nZ:Number = 1500;  // Three-dimensional z coordinate
var vertices3D:Vector.&lt;Number&gt; = Vector.&lt;Number&gt;([nX, nX, nZ]);
var vertices2D:Vector.&lt;Number&gt; = new Vector.&lt;Number&gt;();
var uvtData:Vector.&lt;Number&gt; = Vector.&lt;Number&gt;([0, 0, 0]);
var nT:Number = 1/(nDistance + nZ);  // t value
myPerspective.focalLength = 500;  // Focal length 
myMatrix3D.appendTranslation(0, 0, nDistance);
myMatrix3D.append(myPerspective.toMatrix3D());
Utils3D.projectVectors(myMatrix3D, vertices3D, vertices2D, uvtData);
trace(uvtData);  // uvt data
trace(nT);  // Calculated t value
trace(vertices2D);  // Projected x and y coordinates
trace(nX * myPerspective.focalLength * nT);  // Calculated two-dimensional space x or y coordinate
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/02/01/calculation-in-the-utils3d-projectvectors-method/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone Metronome app built with Flash CS5</title>
		<link>http://blog.jactionscripters.com/2010/01/25/iphone-metronome-app-built-with-flash-cs5/</link>
		<comments>http://blog.jactionscripters.com/2010/01/25/iphone-metronome-app-built-with-flash-cs5/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 07:35:18 +0000</pubDate>
		<dc:creator>Takayuki Fukatsu</dc:creator>
				<category><![CDATA[Showcase]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1054</guid>
		<description><![CDATA[
I released Simple Metronome app that runs with Package for iPhone technology, CS5&#8217;s new feature. I just got permission to talk about the app.
Seems this is the first Flash made iPhone app from Japan.
This app is originally made for technical research, to understand animation speed and interactivity of flash for iPhone. The reason why I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.jactionscripters.com/wp-content/uploads/2010/01/simplemetronome_js.png" alt="simplemetronome_js" title="simplemetronome_js" width="640" height="380" class="alignnone size-full wp-image-1064" /></p>
<p>I released <a href="http://artandmobile.com/metronome/">Simple Metronome app</a> that runs with <a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/">Package for iPhone technology</a>, CS5&#8217;s new feature. I just got permission to talk about the app.</p>
<p>Seems this is the first Flash made iPhone app from Japan.<br/><br/></p>
<p>This app is originally made for technical research, to understand animation speed and interactivity of flash for iPhone. The reason why I made metronome is simply it needs accurate and smooth frame rate. Version 1.00 is minimum implementation, it will be updated step by step.</p>
<p>Some people said that flash is too slow for iPhone, however as far as I see this app, Flash is enough fast for actual project. It may be not for  3d game, but for utility app. Flash CS5 is still under development and I believe it will be much much faster when it is actually shipped.</p>
<p>The biggest advantage of Flash made iPhone app is that you can easily build both iPhone app and online demo. In iPhone app market, many people looking for the way to promote their application, however <strong>only flash developer can promote their app with working demo on the web site!!</strong>. It&#8217;s quite strong feature, isn&#8217;t it?  </p>
<p>This is sample project and I will make the source code open. It will be available when Flash CS5 is released. <img src='http://blog.jactionscripters.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2010/01/25/iphone-metronome-app-built-with-flash-cs5/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Rotating an instance with the y axis</title>
		<link>http://blog.jactionscripters.com/2009/12/05/rotating-an-instance-with-the-y-axis/</link>
		<comments>http://blog.jactionscripters.com/2009/12/05/rotating-an-instance-with-the-y-axis/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 13:33:10 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=1017</guid>
		<description><![CDATA[Try to rotate a MovieClip instance named my_mc 80 degrees with the y axis.  The trace() function in the code below displays information in the [Output] panel as follows: 
80.00003182368921 1.3962639570236206


var nRotationY:Number = 80;
my_mc.rotationY = 0;
var myMatrix3D:Matrix3D = my_mc.transform.matrix3D;
myMatrix3D.prependRotation(nRotationY, Vector3D.Y_AXIS);
trace(my_mc.rotationY, myMatrix3D.decompose()[1].y);



Then change the number of degrees in the variable, nRotationY, to 100. The code [...]]]></description>
			<content:encoded><![CDATA[<p>Try to rotate a MovieClip instance named my_mc 80 degrees with the y axis.  The trace() function in the code below displays information in the [Output] panel as follows: </p>
<blockquote><p>80.00003182368921 1.3962639570236206</p></blockquote>
<p><code-style></p>
<pre name="code" class="as3">
var nRotationY:Number = 80;
my_mc.rotationY = 0;
var myMatrix3D:Matrix3D = my_mc.transform.matrix3D;
myMatrix3D.prependRotation(nRotationY, Vector3D.Y_AXIS);
trace(my_mc.rotationY, myMatrix3D.decompose()[1].y);
</pre>
<p></code></p>
<p><img src="http://blog.jactionscripters.com/wp-content/uploads/2009/12/rotationTest_80.gif" alt="Rotating an instance 80 degrees" title="Rotating an instance 80 degrees" width="270" height="235" class="alignnone size-full wp-image-1023" /></p>
<p>Then change the number of degrees in the variable, nRotationY, to 100. The code seems to rotate an instance 100 degrees. However, the number of degrees shown in the [Output] panel is still 80.</p>
<blockquote><p>80.00003182368921 1.3962639570236206</p></blockquote>
<p><code-style></p>
<pre name="code" class="as3">
var nRotationY:Number = 100;  // 80;
my_mc.rotationY = 0;
var myMatrix3D:Matrix3D = my_mc.transform.matrix3D;
myMatrix3D.prependRotation(nRotationY, Vector3D.Y_AXIS);
trace(my_mc.rotationY, myMatrix3D.decompose()[1].y);
</pre>
<p></code></p>
<p><img src="http://blog.jactionscripters.com/wp-content/uploads/2009/12/rotationTest_100.gif" alt="Rotating an instance 100 degrees" title="Rotating an instance 100 degrees" width="270" height="235" class="alignnone size-full wp-image-1035" /></p>
<p>The following code reveals the reason.</p>
<blockquote><p>0 80.00003182368921 0<br />
Vector3D(0, 1.3962639570236206, 0)<br />
180.00000500895632 80.00003182368921 180.00000500895632<br />
Vector3D(3.1415927410125732, 1.3962639570236206, 3.1415927410125732)</p></blockquote>
<p><code-style></p>
<pre name="code" class="as3">
var mySprite:Sprite = new Sprite();
var axis:Vector3D = Vector3D.Y_AXIS;  // Vector3D.X_AXIS  // Try to change this
mySprite.rotationY = 0;
var myMatrix3D:Matrix3D = mySprite.transform.matrix3D;
myMatrix3D.prependRotation(80, axis);
xTrace(mySprite);
myMatrix3D.prependRotation(20, axis);
xTrace(mySprite);
function xTrace(targetSprite:Sprite):void {
	trace(targetSprite.rotationX, targetSprite.rotationY, targetSprite.rotationZ);
	trace(targetSprite.transform.matrix3D.decompose()[1]);
}
</pre>
<p></code></p>
<p>When the <em>Matrix3D.prependRotation()</em> method rotates an instance 100 degrees with y axis, it is only rotated 80 degrees but is flipped with x and z axes.</p>
<p>The appearance of the instance is all right. But the number of degrees is not good. Besides, 100 degrees can be set with x or z axis. It means that the result of y axis is not consistent. Therefore, I suspect that this is a bug.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2009/12/05/rotating-an-instance-with-the-y-axis/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Three types of transformation objects in the Transform class</title>
		<link>http://blog.jactionscripters.com/2009/10/14/three-types-of-transformation-objects-in-the-transform-class/</link>
		<comments>http://blog.jactionscripters.com/2009/10/14/three-types-of-transformation-objects-in-the-transform-class/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 09:25:07 +0000</pubDate>
		<dc:creator>Fumio Nonaka</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=985</guid>
		<description><![CDATA[The Transform class has several kinds of transformation objects as its properties.
The Transform class provides access to color adjustment properties and two- or three-dimensional transformation objects that can be applied to a display object.
I noticed three types of properties from the point of view of getting and seting their values.
The first example is the Transform.matrix [...]]]></description>
			<content:encoded><![CDATA[<p>The Transform class has several kinds of transformation objects as its properties.</p>
<blockquote><p>The Transform class provides access to color adjustment properties and two- or three-dimensional transformation objects that can be applied to a display object.</p></blockquote>
<p>I noticed three types of properties from the point of view of getting and seting their values.</p>
<p>The first example is the <em>Transform.matrix</em> property.  It does not provide its Matrix object reference but its copy.  It means that operations to the copy will not affect to the property&#8217;s Matrix object.  To set a Matrix object to the <em>Transform.matrix</em> property, the object should be assigned to the property.</p>
<p><code-style></p>
<pre name="code" class="as3">var mySprite:Sprite = new Sprite();
var myMatrix:Matrix = new Matrix();
mySprite.transform.matrix = myMatrix;
myMatrix.translate(100, 50);
trace(mySprite.transform.matrix);
// Output: (a=1, b=0, c=0, d=1, tx=0, ty=0)
mySprite.transform.matrix = myMatrix;
trace(mySprite.transform.matrix);
// Output: (a=1, b=0, c=0, d=1, tx=100, ty=50)
myMatrix = mySprite.transform.matrix;
myMatrix.scale(2, 1.5);
trace(mySprite.transform.matrix);
// Output: (a=1, b=0, c=0, d=1, tx=100, ty=50)
trace(mySprite.transform.matrix == myMatrix);  // Output: false</pre>
<p></code></p>
<p>The second example is the <em>Transform.matrix3D</em> property.  Unlike to the <em>Transform.matrix</em> property, a Matrix3D object&#8217;s reference is obtained from the property.    Therefore, once its reference is gotten, operations to the reference affects to the <em>Transform.matrix3D</em> property.</p>
<p><code-style></p>
<pre name="code" class="as3">var mySprite:Sprite = new Sprite();
var myMatrix3D:Matrix3D = new Matrix3D();
mySprite.transform.matrix3D = myMatrix3D;
myMatrix3D.prependTranslation(100, 50, 0);
trace(mySprite.transform.matrix3D.position);
// Output: Vector3D(100, 50, 0)
trace(mySprite.transform.matrix3D == myMatrix3D);  // Output: true</pre>
<p></code></p>
<p>The third one is the <em>Transform.perspectiveProjection</em> property. When a new PerspectiveProjection instance is assigned to the property, operations to the instance do not affect to the property as well as the <em>Transform.matrix</em> property. Then, try to get the object from the property and set it to a variable again. You can operate the variable as if it was the object reference of the property. However the variable&#8217;s object is not evaluated to be equal to the property&#8217;s value. It is a mysterious property, isn&#8217;t it.</p>
<p><code-style></p>
<pre name="code" class="as3">var mySprite:Sprite = new Sprite();
var myPerspective:PerspectiveProjection = new PerspectiveProjection();
mySprite.transform.perspectiveProjection = myPerspective;
myPerspective.fieldOfView = 20;
trace(mySprite.transform.perspectiveProjection.fieldOfView);  // Output: 55
myPerspective = mySprite.transform.perspectiveProjection;
myPerspective.fieldOfView = 100;
trace(mySprite.transform.perspectiveProjection.fieldOfView);  // Output: 100
trace(mySprite.transform.perspectiveProjection == myPerspective);
// Output: false</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2009/10/14/three-types-of-transformation-objects-in-the-transform-class/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ActionScript3/Flash10 software synthesizer SiON released</title>
		<link>http://blog.jactionscripters.com/2009/10/02/sion-released/</link>
		<comments>http://blog.jactionscripters.com/2009/10/02/sion-released/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 16:08:22 +0000</pubDate>
		<dc:creator>keim</dc:creator>
				<category><![CDATA[Library]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=939</guid>
		<description><![CDATA[
Hello all, I&#8217;m kei mesuda aka keim japanese free-game home brewer.
I just release completely new software synthesizer named &#8220;SiON&#8221; (pronounced as &#8220;scion&#8221;), so let me introduce my work.
The SiON library works on ActionScript3/Flash10. This provides a simple sound synchronization with DisplayObject and an easy dynamic sound generation. You can generate various sounds without any mp3 [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-947" href="http://blog.jactionscripters.com/2009/10/02/sion-released/img0004/"><img class="alignnone size-full wp-image-947" title="SiON title" src="http://blog.jactionscripters.com/wp-content/uploads/2009/10/img0004.png" alt="SiON title" width="640" height="360" /></a></p>
<p>Hello all, I&#8217;m kei mesuda aka keim japanese free-game home brewer.</p>
<p>I just release completely new software synthesizer named &#8220;SiON&#8221; (pronounced as &#8220;scion&#8221;), so let me introduce my work.</p>
<p>The SiON library works on ActionScript3/Flash10. This provides a simple sound synchronization with DisplayObject and an easy dynamic sound generation. You can generate various sounds without any mp3 files and wave data. The musical sequence is represented as simple text data &#8220;Music Macro Language&#8221;. It makes your sounding SWF file very very small.</p>
<p>This library&#8217;s development center is <a href="http://www.libspark.org/wiki/keim/SiON_e" target="_blank">here</a> in <a href="http://www.libspark.org/wiki/WikiStart/en" target="_blank">spark project</a>. You can get newest version&#8217;s <a href="http://www.libspark.org/svn/as3/SiOPM/trunk/archive/sion057.swc" target="_self">swc file</a>, <a href="http://www.libspark.org/svn/as3/SiOPM/trunk/archive/sion057_asdoc.zip">asdoc</a> and <a href="http://www.libspark.org/svn/as3/SiOPM/trunk/src/">svn link</a>.</p>
<p><strong><br />
</strong></p>
<p><strong>- Demonstrations </strong></p>
<p>You can use SiON in <a href="http://wonderfl.net/">Wonderfl</a> and I posted some demonstrations.</p>
<ul>
<li><a href="http://wonderfl.net/code/b7ec8cd3801e3784dbbb4f5d2e68b15e9e384832">SiON Tenorion</a></li>
<li><a href="http://wonderfl.net/code/646e3b9efade64bd02a2a6797d74d17725e1b6bb">SiON KaosPad</a></li>
<li><a href="http://wonderfl.net/code/80621cb517f2691e07f1147272386ff83ecf2ebe">SiON Kaoscillator</a></li>
<li><a href="http://wonderfl.net/code/82e45099bf2f4d24451e00eb58e67835d927d405">Super Mario Synthesizer</a></li>
<li><a href="http://wonderfl.net/code/6a738c4f99a6c786421c38b4cce01e73c1c9bb89">SiON FM synthesizer WF-1</a></li>
</ul>
<p>Other works using SiON are shown in <a href="http://wonderfl.net/tag/sion">tag [SiON] in Wonderfl</a>. I plan to post some other works with SiON at wonderfl, please check <a href="http://wonderfl.net/user/keim_at_Si">my page</a> if you want more.</p>
<ul>
<li><a href="http://mmltalks.appspot.com/">MMLTalks</a></li>
</ul>
<p>And this is another demonstration for SiON. The <a href="http//mmltalks.appspot.com/">MMLTalks</a> is an MML hosting service powered by SiON. Here, you can listen many musics generated only by SiON software synthsizer without any mp3 files and wave data.</p>
<p><strong><br />
</strong></p>
<p><strong>- Synthesizer specifications</strong></p>
<p>The SiON software synthesizer is an extention of the sound chip YM2151s emulator. Currently, SiON includes 4 types of sound modules.</p>
<ol></ol>
<ul>
<li>Extended Emulators of various Frequency Modulation synthesizing sound chips; The emulation code is based on the time-proven emulators, MAME, fmgen and x68sound.dll. And the outputs of various sound chips (OPM,OPNA,OPL3,OPX,MA3) are reproducible by giving same parameters of actual equipments.</li>
</ul>
<ol></ol>
<ul>
<li>Simulator of PSG and wave memory sound chips; The SiONs Extended FM synth can simulate various PSG chips (AY-3-8910, DCSG, 2A03, SSG) and wave memory sound chips(SCC, C15, GameBoy).</li>
</ul>
<ol></ol>
<ul>
<li>Physical Modeling Guitar synthesizer; SiON also includes Guitar Physical modeling synthesizer based on Karplus strong algorism.</li>
</ul>
<ol></ol>
<ul>
<li>PCM sound module; The SiON handles MP3 sound (Sound Class) as a PCM sound modules source wave. This means you can control the pitch of MP3 file by musical sequence.</li>
</ul>
<ol></ol>
<p>The SiON can modify the output from these sound modules by low-pass filter with ADSR envelop, ring modulation, pitch/amplitude modulation.</p>
<p><strong> </strong></p>
<p><strong><br />
</strong></p>
<p><strong>- Sequencer specifications</strong></p>
<p>The SiON uses <a href="http://en.wikipedia.org/wiki/Music_Macro_Language">Music Macro Language (MML)</a> as a musical score data. The MML is a simple powerful language to represent musical sequence. For example, &#8220;[ccggaag2 ffeeddc2 | [ggffeed2]]&#8221; represents &#8220;the ABC song&#8221; in MML. The reference manual is <a href="http://mmltalks.appspot.com/document/siopm_mml_ref_05.html">here</a>, mml editor <a href="http://mmltalks.appspot.com/labo/mmleditor.html">here</a>, and you can refer MMLs of various great musics <a href="http://mmltalks.appspot.com/">here</a> in MMLTalks (and click rightmost button in song title).</p>
<p><strong> </strong></p>
<p><strong><br />
</strong></p>
<p><strong>- Effector specifications</strong></p>
<p>SiON includes many sound effectors like reverb, chorus, delay, wave shaper, various filters, speaker simulator and so on. These effectors can be control from MML. Please see the discriptions in the <a href="http://mmltalks.appspot.com/document/siopm_mml_ref_05.html">MML reference manual</a>.</p>
<p>Now detail discription is under construction, please check <a href="http://keim-at-si.blogspot.com/">my blog</a> or <a href="http://www.libspark.org/wiki/keim/SiON_e" target="_blank">development center</a>. And if you have any questions or comments, please leave comment on this post or contact me by e-mail (but sorry for my poor English..).</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 817px; width: 1px; height: 1px;">Sequencer specification.<br />
SiON uses Music Macro Language (MML) as a musical score data. The MML is a simple powerful language to represent musical sequence. For example, &#8220;[ccggaag2 ffeeddc2 | [ggffeed2]]&#8221; represents &#8220;the ABC song&#8221; in MML. Reference manual &lt;a href=&#8221;http://mmltalks.appspot.com/document/siopm_mml_ref_05.html&#8221;&gt;here&lt;/a&gt; and you can try to play mml &lt;a href=&#8221;http://mmltalks.appspot.com/labo/mmleditor.html&#8221;&gt;here&lt;/a&gt;.<br />
This site &lt;a href=&#8221;http://mmltalks.appspot.com/&#8221;&gt;MMLTalks&lt;/a&gt; is the MML hosting service powered by SiON, you can refer many MMLs to represent grate musics.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2009/10/02/sion-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Genie effect with as3</title>
		<link>http://blog.jactionscripters.com/2009/09/09/genie-effect-with-as3/</link>
		<comments>http://blog.jactionscripters.com/2009/09/09/genie-effect-with-as3/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 08:01:14 +0000</pubDate>
		<dc:creator>Takayuki Fukatsu</dc:creator>
				<category><![CDATA[Experiment]]></category>

		<guid isPermaLink="false">http://blog.jactionscripters.com/?p=934</guid>
		<description><![CDATA[Here is a Mac OSX like Genie effect made with AS3.
It&#8217;s basically made with Flash 10&#8217;s drawTriangles API &#038; Yoshihiro Shindo&#8217;s betweenAS3 tween library.
It&#8217;s just a initial sketch, but seems there is plenty of possibilities around the new bitmap drawing API.
]]></description>
			<content:encoded><![CDATA[<p>Here is a Mac OSX like <a href="http://fladdict.net/exp/ginnyeffect/">Genie effect made with AS3</a>.</p>
<p>It&#8217;s basically made with Flash 10&#8217;s drawTriangles API &#038; <a href="http://blog.jactionscripters.com/author/beinteractive/">Yoshihiro Shindo</a>&#8217;s <a href="http://www.libspark.org/svn/as3/BetweenAS3/tags/alpha-r3022/">betweenAS3 </a>tween library.</p>
<p>It&#8217;s just a initial sketch, but seems there is plenty of possibilities around the new bitmap drawing API.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jactionscripters.com/2009/09/09/genie-effect-with-as3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
