<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>.swfgeek &#187; TUTORIALS</title>
	<atom:link href="http://www.swfgeek.net/tag/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.swfgeek.net</link>
	<description>My Flash Wanderings</description>
	<lastBuildDate>Sun, 15 Aug 2010 05:30:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.5/mx/</creativeCommons:license>
		<item>
		<title>Using Flex PMD in FlashDevelop 3</title>
		<link>http://www.swfgeek.net/2009/09/18/using-flex-pmd-in-flashdevelop-3/</link>
		<comments>http://www.swfgeek.net/2009/09/18/using-flex-pmd-in-flashdevelop-3/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 17:33:05 +0000</pubDate>
		<dc:creator>swfgeek</dc:creator>
				<category><![CDATA[ADOBE OS]]></category>
		<category><![CDATA[EXAMPLES]]></category>
		<category><![CDATA[FEATURED]]></category>
		<category><![CDATA[FLASHDEVELOP]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[TUTORIALS]]></category>
		<category><![CDATA[FlexPMD]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.swfgeek.net/?p=654</guid>
		<description><![CDATA[
Adobe recently made available Flex PMD a tool that lets you keep track of your code bad practices and helps you  by auditing your source directory and displaying  common errors such as:

Unused code (functions, variables, constants, etc.)
Inefficient code (misuse of dynamic filters, heavy constructors, etc.)
Over-complex code (nested loops, too many ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-656" title="FlashDevelop 3" src="http://www.swfgeek.net/blog/wp-content/uploads/2009/09/flexdevelop.png" alt="FlashDevelop 3" width="105" height="105" /></p>
<p>Adobe recently made available <a title="Adobe OpenSource FlexPMD" href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD" target="_blank">Flex PMD</a> a tool that lets you keep track of your code bad practices and helps you  by auditing your source directory and displaying  common errors such as:</p>
<ul>
<li>Unused code (functions, variables, constants, etc.)</li>
<li>Inefficient code (misuse of dynamic filters, heavy constructors, etc.)</li>
<li>Over-complex code (nested loops, too many conditionals, etc.)</li>
<li>Over-long code (classes, methods, etc.)</li>
<li>Incorrect use of the Flex component lifecycle (commitProperties, etc).</li>
</ul>
<p>A report is produced describing the violations of a given rule set. FlexPMD includes a rule set that is broad ranging and continually growing. It is also straightforward to create your own new rules.</p>
<p>Originally Flex PMD can be called from: Ant, The Command Line and Maven, but thanks to the <a title="FRlashDevelop" href="http://www.flashdevelop.org/" target="_blank">FlashDevelop</a> (FD3 from now on ) community a plugin has been made available that lets you use FlexPMD in the FD3 IDE and throws the result right in the Output and Results window of FD3.</p>
<p><img class="alignnone size-full wp-image-671" title="flexpmdinfd3" src="http://www.swfgeek.net/blog/wp-content/uploads/2009/09/flexpmdinfd3.jpg" alt="flexpmdinfd3" width="579" height="456" /></p>
<p><span style="font-weight: bold;">Installation</span></p>
<p><span style="font-weight: bold;">1.</span> Download flashdevelopPMD from <a href="http://www.kemelyon.com/flashdevelop/flashdevelopPMD.zip">http://www.kemelyon.com/flashdevelop/flashdevelopPMD.zip</a></p>
<p><span style="font-weight: bold;">2. </span>Copy PMD.dll into the plugins folder of your FD Application Files.</p>
<p><img class="alignnone size-full wp-image-680" title="fdsettings" src="http://www.swfgeek.net/blog/wp-content/uploads/2009/09/fdsettings.jpg" alt="fdsettings" width="399" height="277" /></p>
<p><img class="alignnone size-full wp-image-681" title="fdplugins" src="http://www.swfgeek.net/blog/wp-content/uploads/2009/09/fdplugins.jpg" alt="fdplugins" width="460" height="281" /></p>
<p><span style="font-weight: bold;">3. </span>Download flexPMD from Adobe Labs (<!-- m --><a href="http://opensource.adobe.com/wiki/display/flexpmd/Downloads">http://opensource.adobe.com/wiki/displa &#8230; /Downloads</a><!-- m -->) and extract to your disk.</p>
<p><img class="alignnone size-full wp-image-679" title="adobeos" src="http://www.swfgeek.net/blog/wp-content/uploads/2009/09/adobeos.jpg" alt="adobeos" width="376" height="97" /></p>
<p>Set &#8220;PMD jar Location&#8221; in Tools -&gt; Settings -&gt; FlexPMD to your &#8220;flex-pmd-command-line-1.0.RC3.jar&#8221;</p>
<p><img class="alignnone size-full wp-image-682" title="flexpmdlocation" src="http://www.swfgeek.net/blog/wp-content/uploads/2009/09/flexpmdlocation.jpg" alt="flexpmdlocation" width="600" height="384" /></p>
<p><span style="font-weight: bold;">Usage</span></p>
<p>Press Ctrl-Shift-A to run FlexPMD in current Project. <span style="font-style: italic;">This version only checks code inside the &#8220;src&#8221; folder</span>, so you don&#8217;t see warnings in your libraries.</p>
<p>To use your own ruleset, set &#8220;PMD Ruleset&#8221; in Tools -&gt; Settings -&gt; FlexPMD</p>
<p>Thanks again to the FlashDevelop community for spending time in making this useful plugins.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swfgeek.net/2009/09/18/using-flex-pmd-in-flashdevelop-3/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.5/mx/</creativeCommons:license>
	</item>
		<item>
		<title>Drawing API and Mouse Events</title>
		<link>http://www.swfgeek.net/2008/02/25/drawing-api-and-mouse-events/</link>
		<comments>http://www.swfgeek.net/2008/02/25/drawing-api-and-mouse-events/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 16:33:44 +0000</pubDate>
		<dc:creator>swfgeek</dc:creator>
				<category><![CDATA[ACTIONSCRIPT 3.0]]></category>
		<category><![CDATA[EXAMPLES]]></category>
		<category><![CDATA[FLASH CS3]]></category>
		<category><![CDATA[FLASH IDE]]></category>
		<category><![CDATA[FLEX IDE]]></category>
		<category><![CDATA[TUTORIALS]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Drawing API]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[MouseEvents]]></category>

		<guid isPermaLink="false">http://www.swfgeek.net/?p=117</guid>
		<description><![CDATA[
Click on the image to see the example and get the code.
A pair of days ago I found the blog of Sorin Haidan in wish he post some very useful tutorials on Flash and Actionscript 3.0 in a very understandable way, I found one that caught my attention called Draw ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://examples.swfgeek.net/flash/drawingapimouse"><img src="http://www.swfgeek.net/blog/wp-content/uploads/2008/02/drawingapi_img.jpg" alt="DrawingAPI" /></a><br />
<strong>Click on the image to see the example and get the code.</strong></p>
<p>A pair of days ago I found the <a href="http://biochimistu.blogspot.com/">blog</a> of <a href="http://www.blogger.com/profile/09135002905210428963">Sorin Haidan </a>in wish he post some very useful tutorials on Flash and Actionscript 3.0 in a very understandable way, I found one that caught my attention called <a href="http://biochimistu.blogspot.com/2008/02/draw-custom-shapes-with-actionscript-30.html">Draw Custom shapes with ActionScript 3.0.</a> In this tutorial he explains how to make a &#8220;Ball&#8221; appear on screen every time you click and move your mouse on the screen by using the Drawing API  and MouseEvents, the change of the color on the ball was achieved doing a loop in a 10 frame movie clip  with a ball of different gradient fill on each frame, so occurred to me to wrap that code on a class on a <a href="http://www.adobe.com/products/flex/">Flex 3</a> Actionscript Project  and get rid of the <a href="http://www.adobe.com/products/flash/">Flash</a> assets by drawing the ball  in a dynamic way and this let me Change the color of the Ball more than the 10 times of Sorin example, so check the example be sure to check <a href="http://biochimistu.blogspot.com/">Sorin&#8217;s blog </a>.<br />
In <a href="http://examples.swfgeek.net/flash/drawingapimouse">my example</a> if you right click on the file you get to see the source that it&#8217;s also included below this text here&#8217;s what I got: <a href="http://examples.swfgeek.net/flash/drawingapimouse">Drawing API Ball Example.</a></p>
<p>Thanks Sorin for letting me mess around with his code keep up with those good tutorials.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p117code2'); return false;">View Code</a> ACTIONSCRIPT3</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1172"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
</pre></td><td class="code" id="p117code2"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/*
/////---- Class by Dave Ga?mez (.swfgeek) 24-February-2008 http://www.swfgeek.net----\\\
///---- Original Example by: Sorin Haidan in his  Draw Custom shapes with ActionScript 3.0. Tutorial ----\
///---- Found on his blog http://biochimistu.blogspot.com/ ---- \
*/</span>
&nbsp;
<span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=gradienttype%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:gradienttype.html"><span style="color: #004993;">GradientType</span></a><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=spreadmethod%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:spreadmethod.html"><span style="color: #004993;">SpreadMethod</span></a><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=stagescalemode%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:stagescalemode.html"><span style="color: #004993;">StageScaleMode</span></a><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=stagealign%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:stagealign.html"><span style="color: #004993;">StageAlign</span></a><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=matrix%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:matrix.html"><span style="color: #004993;">Matrix</span></a><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>adobe<span style="color: #000066; font-weight: bold;">.</span>viewsource<span style="color: #000066; font-weight: bold;">.</span>ViewSource<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #000000;">&#91;</span>SWF<span style="color: #000000;">&#40;</span><span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;0x000000&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">frameRate</span>=<span style="color: #990000;">&quot;31&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> DrawingAPI <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> sprite<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> holder<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> myCircle<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> fillType<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> matr<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=matrix%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:matrix.html"><span style="color: #004993;">Matrix</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> spreadMethod<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> focalPointRatio<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> DrawingAPI<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
        <span style="color: #000000;">&#123;</span>
            ViewSource<span style="color: #000066; font-weight: bold;">.</span>addMenuItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;srcview/index.html&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleMode</span> = <a href="http://www.google.com/search?q=stagescalemode%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:stagescalemode.html"><span style="color: #004993;">StageScaleMode</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NO_SCALE</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">align</span> = <a href="http://www.google.com/search?q=stagealign%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:stagealign.html"><span style="color: #004993;">StageAlign</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TOP_LEFT</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_DOWN</span><span style="color: #000066; font-weight: bold;">,</span>prepareToDraw<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> prepareToDraw<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
         <span style="color: #000000;">&#123;</span>
          <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_MOVE</span><span style="color: #000066; font-weight: bold;">,</span>drawGraphics<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
          <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_UP</span><span style="color: #000066; font-weight: bold;">,</span>stopDrawing<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
         <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> drawGraphics<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
        <span style="color: #000000;">&#123;</span>
         fillType = <a href="http://www.google.com/search?q=gradienttype%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:gradienttype.html"><span style="color: #004993;">GradientType</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">RADIAL</span><span style="color: #000066; font-weight: bold;">;</span>
         <span style="color: #004993;">colors</span> = <span style="color: #000000;">&#91;</span>0xFFFFFF<span style="color: #000066; font-weight: bold;">,</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>0xFFFFFF<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
         <span style="color: #004993;">alphas</span> = <span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
         <span style="color: #004993;">ratios</span> = <span style="color: #000000;">&#91;</span>0x37<span style="color: #000066; font-weight: bold;">,</span> 0xFF<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
         matr= <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=matrix%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:matrix.html"><span style="color: #004993;">Matrix</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         matr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">360</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">40</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         spreadMethod = <a href="http://www.google.com/search?q=spreadmethod%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:spreadmethod.html"><span style="color: #004993;">SpreadMethod</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PAD</span><span style="color: #000066; font-weight: bold;">;</span>
         focalPointRatio = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
         holder = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>holder<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         myCircle = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         myCircle<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span>fillType<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span> matr<span style="color: #000066; font-weight: bold;">,</span>spreadMethod<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         myCircle<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawCircle</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">40</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         myCircle<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         holder<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>myCircle<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
         holder<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #004993;">mouseX</span><span style="color: #000066; font-weight: bold;">;</span>
         holder<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #004993;">mouseY</span><span style="color: #000066; font-weight: bold;">;</span>
         holder<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleX</span> = holder<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleY</span> = <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">0.5</span><span style="color: #000066; font-weight: bold;">;</span>
         holder<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span> = <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">360</span><span style="color: #000066; font-weight: bold;">;</span>
         holder<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">alpha</span> = <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">0.7</span><span style="color: #000066; font-weight: bold;">;</span>
       <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> stopDrawing<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
       <span style="color: #000000;">&#123;</span>
        <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_MOVE</span><span style="color: #000066; font-weight: bold;">,</span>drawGraphics<span style="color: #000000;">&#41;</span>
       <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.swfgeek.net/2008/02/25/drawing-api-and-mouse-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.5/mx/</creativeCommons:license>
	</item>
		<item>
		<title>FuseFX Audio Example</title>
		<link>http://www.swfgeek.net/2007/03/15/fusefx-audio-example/</link>
		<comments>http://www.swfgeek.net/2007/03/15/fusefx-audio-example/#comments</comments>
		<pubDate>Thu, 15 Mar 2007 19:53:03 +0000</pubDate>
		<dc:creator>swfgeek</dc:creator>
				<category><![CDATA[ACTIONSCRIPT 2.0]]></category>
		<category><![CDATA[EXAMPLES]]></category>
		<category><![CDATA[TUTORIALS]]></category>

		<guid isPermaLink="false">http://www.swfgeek.net/?p=13</guid>
		<description><![CDATA[Here's a little try on the new FuseFX:
( Based on the FuseFX Download Example )]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little try on the new FuseFX:<br />
( Based on the FuseFX Download Example )</p>
<p><a title="volumenFuseFx" href="http://examples.swfgeek.net/flash/volumefuse"><img title="Example of FuseFX" src="http://www.cloudfaces.com/swfgeekblogexamples/images/volumeTween2.jpg" alt="Example of FuseFX" /></a></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p13code3'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p133"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code" id="p13code3"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">mosesSupposes</span>.<span style="color: #006600;">fuse</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">mosesSupposes</span>.<span style="color: #006600;">fusefx</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">mosesSupposes</span>.<span style="color: #006600;">util</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
ZigoEngine.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span> PennerEasing <span style="color: #66cc66;">&#41;</span>;
FuseFX.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span> MixerFX <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> s:<span style="color: #0066CC;">Sound</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Sound</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
s.<span style="color: #0066CC;">attachSound</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;librarySound&quot;</span><span style="color: #66cc66;">&#41;</span>;
s.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
volUp_mc.<span style="color: #0066CC;">onPress</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_parent</span>.<span style="color: #006600;">fadeUp</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_alpha</span> = <span style="color: #cc66cc;">50</span>;
	ZigoEngine.<span style="color: #006600;">doTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;_alpha&quot;</span>, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
volDown_mc.<span style="color: #0066CC;">onPress</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_parent</span>.<span style="color: #006600;">fadeSound</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_alpha</span> = <span style="color: #cc66cc;">50</span>;
	ZigoEngine.<span style="color: #006600;">doTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;_alpha&quot;</span>, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> fadeUp<span style="color: #66cc66;">&#40;</span>endVolume:<span style="color: #0066CC;">Number</span>, seconds:<span style="color: #0066CC;">Number</span>, ease:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>volume<span style="color: #66cc66;">!</span>=<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		volume = <span style="color: #cc66cc;">150</span>;
	<span style="color: #66cc66;">&#125;</span>
ZigoEngine.<span style="color: #006600;">doTween</span><span style="color: #66cc66;">&#40;</span>s, MixerFX.<span style="color: #006600;">VOLUME</span>, volume, seconds, ease<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> fadeSound<span style="color: #66cc66;">&#40;</span>endVolume:<span style="color: #0066CC;">Number</span>, seconds:<span style="color: #0066CC;">Number</span>, ease:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>volume <span style="color: #66cc66;">!</span>=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		volume = <span style="color: #cc66cc;">0</span>;
	<span style="color: #66cc66;">&#125;</span>
ZigoEngine.<span style="color: #006600;">doTween</span><span style="color: #66cc66;">&#40;</span>s, MixerFX.<span style="color: #006600;">VOLUME</span>, volume, seconds, ease<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.swfgeek.net/2007/03/15/fusefx-audio-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.5/mx/</creativeCommons:license>
	</item>
	</channel>
</rss>
