<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Latcho Flog</title>
	<link>http://greencollective.nl/blog</link>
	<description>Flog till you drop &#124;&#124; if you can't flog it then hog it!</description>
	<pubDate>Sat, 26 Sep 2009 13:37:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>(Obsfucate data) embed an swf as a hexadecimal string in your &#8230;swf</title>
		<link>http://greencollective.nl/blog/?p=28</link>
		<comments>http://greencollective.nl/blog/?p=28#comments</comments>
		<pubDate>Sat, 26 Sep 2009 01:47:40 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[binary]]></category>

		<category><![CDATA[bintohex]]></category>

		<category><![CDATA[embed swf]]></category>

		<category><![CDATA[hex]]></category>

		<category><![CDATA[hexToBin]]></category>

		<category><![CDATA[loadbytes]]></category>

		<category><![CDATA[Obsfucate]]></category>

		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=28</guid>
		<description><![CDATA[You can embed an swf, or any other binary octet stream, containing -harder to get to- data as a hexadecimal string into your project.
Note: This is not true  data security.  Nothing is securable in actionscript, but you CAN make it hard(er) to get to.

So to describe my last attempt to hide some game [...]]]></description>
			<content:encoded><![CDATA[<p>You can embed an swf, or any other binary octet stream, containing -harder to get to- data as a hexadecimal string into your project.</p>
<p>Note: This is not true  data security.  Nothing is securable in actionscript, but you CAN make it hard(er) to get to.<br />
<br />
So to describe my last attempt to hide some game xml data that I embedded in an second swf i went ahead like this to embed that swf as a hex string in my main project like this:</p>
<li><strong>1)</strong> Create a seperate empty project along your main project and create a simple swf containing the protectable data.</li>
<p></p>
<li><strong>2)</strong> I'm not a smoker but let's say you want secure the class <code>"SensimillaPlantagesXml.as"</code> containing your sensitive sensimilla location xml data. Compile that class into "sensitive.swf" (uhum). Make sure that that class is embedded into the swf by including a reference to it in your document's main class <code>new SensimillaPlantagesXml()</code> or just put 'SensimillaPlantagesXml' as a word in your documentclass's constructor</li>
<p></p>
<li><strong>3)</strong>Create a second project along your main project that will serve as a hexadecimal tracer: Embed the swf in it with the Embed tag. We will now convert the binary application octet stream from 'sensitive.swf' to a hexadecimal string:</li>
<p>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="600" height="300" id="ftf_wp" align="middle">
		  <param name="movie" value="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noscale" />
		  <param name="bgcolor" value="#ffffff" />
		  <param name="flashvars" value="w=600&h=300&file=index.php&ftf=true&postID=28&no=0&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		  <embed src="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" quality="high" scale="noscale" bgcolor="#ffffff" width="600" height="300" name="ftf_wp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="w=600&h=300&file=index.php&ftf=true&postID=28&no=0&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		</object></p>
<p></p>
<li>4) This will leave us with a long hexadecimal string in the trace output window, representing your swf as hexadecimal data.<br />
The class to do the Binary to Hexadecimal conversion I will include later, below in this post. </li>
<p><code>Trace Output: 4357530a2a60000078dad55c4d6cdbd87626f547cbffae6399444f9274a3d4a642b4e9cc4719eedb.........</code></p>
<li>5)Copy that string without additional spaces and paste it in a 'Data' class under a variable, called var _hexData here.
<li>6)So let me show you now how you load this hexadcimal string, and parse it as an accessible swf within you main project:</li>
<p>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="700" height="800" id="ftf_wp" align="middle">
		  <param name="movie" value="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noscale" />
		  <param name="bgcolor" value="#ffffff" />
		  <param name="flashvars" value="w=700&h=800&file=index.php&ftf=true&postID=28&no=1&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		  <embed src="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" quality="high" scale="noscale" bgcolor="#ffffff" width="700" height="800" name="ftf_wp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="w=700&h=800&file=index.php&ftf=true&postID=28&no=1&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		</object><br />
<br />
The only easy way to get to ALL the data of the embedded-hex-swf is (including bitmaps) is<br />
making an swf file from it; Now be my guest and write me a short (AIR?) tutorial please :).</p>
<p>This procedure is not super secure but discourages our fast'n easy decompiler friends.<br />
Still better then posting the data over http.<br />
If the process is not clear by now, please let me know, so I can improve above instructions.</p>
<p>Here you can see the transformation <a href="http://greencollective.nl/blog/wp-content/uploads/2009/09/binhex.as" title="View BinHex.as">class</a> that contains the two static functions binToHex() and hexToBin();</p>
<p>
And here you can see BinHex.as:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="600" height="675" id="ftf_wp" align="middle">
		  <param name="movie" value="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noscale" />
		  <param name="bgcolor" value="#ffffff" />
		  <param name="flashvars" value="w=600&h=675&file=index.php&ftf=true&postID=28&no=2&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		  <embed src="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" quality="high" scale="noscale" bgcolor="#ffffff" width="600" height="675" name="ftf_wp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="w=600&h=675&file=index.php&ftf=true&postID=28&no=2&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		</object></p>
<p><a href="http://greencollective.nl/blog/wp-content/uploads/2009/09/binhex.as" title="Download/View BinHex.as">Download BinHex.as</a></li>
<p>Ciao !</p>
<p><a href="http://greencollective.nl/blog/wp-content/uploads/2009/09/swfembedashexadecimalstring_post.txt" title="Swf">See this post as raw text</a></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=28</wfw:commentRss>
		</item>
		<item>
		<title>FlashDevelop: duplicate a text selection block with a shortcut</title>
		<link>http://greencollective.nl/blog/?p=24</link>
		<comments>http://greencollective.nl/blog/?p=24#comments</comments>
		<pubDate>Tue, 18 Aug 2009 19:14:10 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[flashdevelop]]></category>

		<category><![CDATA[block]]></category>

		<category><![CDATA[duplication]]></category>

		<category><![CDATA[macro]]></category>

		<category><![CDATA[selection]]></category>

		<category><![CDATA[shortcut]]></category>

		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=24</guid>
		<description><![CDATA[Want to duplicate multiple lines of code with a keyboard shortcut in flashdevelop ?
FlashDevelop-&#62;Tools-&#62;Macros-&#62;Add-&#62; Entries-&#62;... :

ScintillaCommand&#124;SelectionDuplicate
Label: &#38;BlockDupe
Shortcut: Alt+DOWN (my own choice)


Dupe'm 
Cheers to Joel Stransky 
]]></description>
			<content:encoded><![CDATA[<p>Want to duplicate multiple lines of code with a keyboard shortcut in flashdevelop ?<br />
FlashDevelop-&gt;Tools-&gt;Macros-&gt;Add-&gt; <strong>Entries-&gt;... </strong>:</p>
<pre></pre>
<pre><font color="#339966"><strong>ScintillaCommand|SelectionDuplicate</strong></font></pre>
<p><strong>Label: </strong>&amp;BlockDupe<br />
<strong>Shortcut:</strong> Alt+DOWN (my own choice)</p>
<pre></pre>
<p><a href="http://greencollective.nl/blog/wp-content/uploads/2009/08/dupeme.gif" title="text block duplication trough flashdevelop macro"><img src="http://greencollective.nl/blog/wp-content/uploads/2009/08/dupeme.gif" alt="text block duplication trough flashdevelop macro" /></a></p>
<p>Dupe'm <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Cheers to Joel Stransky <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=24</wfw:commentRss>
		</item>
		<item>
		<title>FlashDevelop Syntax Coloring: Dark Theme</title>
		<link>http://greencollective.nl/blog/?p=19</link>
		<comments>http://greencollective.nl/blog/?p=19#comments</comments>
		<pubDate>Sat, 15 Aug 2009 00:47:38 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[flashdevelop]]></category>

		<category><![CDATA[fd]]></category>

		<category><![CDATA[flahdevelop]]></category>

		<category><![CDATA[inconsolata]]></category>

		<category><![CDATA[syntax coloring]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=19</guid>
		<description><![CDATA[Back in time I used Sepy as a texteditor as an alternative to the Flash IDE Non-Code-Editor.
Now my snappy editor of choice is FlashDevelop, totally tailored towards Flex SDK publishing.
In Sepy I had a nice dark background theme, but since the switch to FD I never took the time to configure colors in FD.
It really [...]]]></description>
			<content:encoded><![CDATA[<p>Back in time I used Sepy as a texteditor as an alternative to the Flash IDE Non-Code-Editor.<br />
Now my snappy editor of choice is FlashDevelop, totally tailored towards Flex SDK publishing.</p>
<p>In Sepy I had a nice dark background theme, but since the switch to FD I never took the time to configure colors in FD.<br />
It really can make a difference for your eyes, a darker background; Less radiation or flickerHz effects I 'd say.</p>
<p>For everybody who wants to get AS3 coding  'darker', here is my theme for you to grab. It's a flash develop zip file, and should install by just running it after download and answer the dialog with..YES! . <em>(  A restart of FD might be necessary ? )<br />
</em>If you're not sure yet, backup your current brightwhite scheme first.<em><br />
</em> <strong>Grab here</strong>: <strong><a href="http://greencollective.nl/blog/wp-content/uploads/2009/08/syntaxcoloras3_fd_latcho.fdz" title="SyntaxColorAS3_FD_Latcho.fdz">SyntaxColorAS3_FD_Latcho.fdz</a></strong></p>
<p>You can alter and save your settings by opening the menu Tools&gt;Syntax Coloring:AS3.</p>
<p>The font I just started using is named 'Inconsolata'  (as seen in the screenshot);<br />
Seems to be  a 1st choice of a bunch-a-folks. Looks peacefull to me on first sight.<br />
The original Inconsolata Open Type font wasn't received by FD's font enumerator, but I found a ported TTF that does well.<br />
<strong>Grab here:  <a href="http://greencollective.nl/blog/wp-content/uploads/2009/08/inconsolata.ttf" title="Inconsolata.ttf">Inconsolata.ttf</a></strong></p>
<p>Enjoy.</p>
<p><img src="http://greencollective.nl/blog/wp-content/uploads/2009/08/colorscheme.png" alt="preview SyntaxColorAS3_FD_Latcho" /></p>
<p>Why wouldn't I be a</p>
<p><a href="http://www.flashdevelop.org/wikidocs/index.php?title=FlashDevelop:Site_support" title="and you ?"><img src="http://www.flashdevelop.org/downloads/support/flashdevelop_sponsor.png" alt="sponsor" align="left" height="50" hspace="2" width="120" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=19</wfw:commentRss>
		</item>
		<item>
		<title>setting breakpoints, debug swf via console / terminal /prompt with fdb</title>
		<link>http://greencollective.nl/blog/?p=18</link>
		<comments>http://greencollective.nl/blog/?p=18#comments</comments>
		<pubDate>Wed, 12 Aug 2009 23:00:35 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[mxmlc - flex sdk]]></category>

		<category><![CDATA[breakpoint]]></category>

		<category><![CDATA[debug]]></category>

		<category><![CDATA[fdb]]></category>

		<category><![CDATA[prompt]]></category>

		<category><![CDATA[step]]></category>

		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=18</guid>
		<description><![CDATA[Finally found a nice article that explains how flex sdk's fdb command line debug tool works  
Reminder for myself:
http://installingcats.com/2007/12/07/how-to-use-command-line-debugger-fdb-to-debug-flex-flash-on-mac-os-x/
Got into it for a moment ----&#62; this will be a messy post  
found some extra info / commands within fdb now:
New to fdb? Do 'tutorial' for basic info.
List of fdb commands:
bt (bt)             Print backtrace [...]]]></description>
			<content:encoded><![CDATA[<p>Finally found a nice article that explains how flex sdk's fdb command line debug tool works <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Reminder for myself:</p>
<p><a href="http://installingcats.com/2007/12/07/how-to-use-command-line-debugger-fdb-to-debug-flex-flash-on-mac-os-x/" title="http://installingcats.com/2007/12/07/how-to-use-command-line-debugger-fdb-to-debug-flex-flash-on-mac-os-x/">http://installingcats.com/2007/12/07/how-to-use-command-line-debugger-fdb-to-debug-flex-flash-on-mac-os-x/</a></p>
<p>Got into it for a moment ----&gt; this will be a messy post <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>found some extra info / commands within fdb now:</p>
<p>New to fdb? Do 'tutorial' for basic info.<br />
List of fdb commands:<br />
bt (bt)             Print backtrace of all stack frames<br />
break (b)           Set breakpoint at specified line or function<br />
cf (cf)             Display the name and number of the current file<br />
clear (cl)          Clear breakpoint at specified line or function<br />
condition (cond)    Apply/remove conditional expression to a breakpoint<br />
continue (c)        Continue execution after stopping at breakpoint<br />
commands (com)      Sets commands to execute when breakpoint hit<br />
delete (d)          Delete breakpoints or auto-display expressions<br />
directory (dir)     Add a directory to the search path for source files<br />
disable (disab)     Disable breakpoints or auto-display expressions<br />
disassemble (disas) Disassemble source lines or functions<br />
display (disp)      Add an auto-display expressions<br />
enable (e)          Enable breakpoints or auto-display expressions<br />
file (fil)          Specify application to be debugged.<br />
finish (f)          Execute until current function returns<br />
handle (han)        Specify how to handle a fault<br />
help (h)            Display help on fdb commands<br />
home (ho)           Set listing location to where execution is halted<br />
info (i)            Display information about the program being debugged<br />
kill (k)            Kill execution of program being debugged<br />
list (l)            List specified function or line<br />
next (n)            Step program<br />
print (p)           Print value of variable EXP<br />
pwd (pw)            Print working directory<br />
quit (q)            Exit fdb<br />
run (r)             Start debugged program<br />
set (se)            Set the value of a variable<br />
source (so)         Read fdb commands from a file<br />
step (s)            Step program until it reaches a different source line<br />
tutorial (t)        Display a tutorial on how to use fdb<br />
undisplay (u)       Remove an auto-display expression<br />
viewswf (v)         Set or clear filter for file listing based on swf<br />
what (wh)           Displays the context of a variable<br />
where (w)           Same as bt<br />
Type 'help' followed by command name for full documentation.<br />
(fdb)</p>
<p>Start an application with 'run'.<br />
View file names with 'info sources'.<br />
List a file with 'list'.<br />
Set breakpoints with 'break'.<br />
Execute program with 'continue' until a breakpoint is hit.<br />
Examine state of program with 'where', 'print', 'info locals'.<br />
Execute individual statements with 'next', 'step', and 'finish'.<br />
Resume execution with 'continue'.<br />
Quit fdb with 'quit'.</p>
<p>It boils down to launching FDB.EXE in your flexsdk's 'bin' dir.<br />
- Typing run:<br />
(fdb) <strong>run</strong></p>
<p>- Open a debug-enabled swf (preferably on http in your browser since that ads-in network access if you don't have security configured for that local swf path)<br />
- set a breakpoint via a functionname (even if it is in another file, the name will match when fdb hits it), so for example type:<br />
(fdb) <strong>b registerModule</strong><strong>&lt;enter&gt;</strong><br />
<em>You have now set a breakpoint for that function name that will be resolved later, linenumbers / filenames must be possible too.</em><br />
And then type <strong>continue + &lt;enter&gt;</strong> ( add more breakpoints if you like) and again<strong> continue + &lt;enter&gt;<br />
</strong><em>The swf will now run until it hits the breakpoint marked functionname 'registerModule':</em><strong><br />
Resolved breakpoint 1 to registerModule() at ModuleManager.as:23<br />
</strong>(fdb) <strong>continue + &lt;enter&gt;</strong><br />
<strong>Breakpoint 1, registerModule() at ModuleManager.as:23   (yeahaa!)<br />
23             public function registerModule(modRegName:String,instance:IModule):void {<br />
</strong>now by command <strong>p</strong> we want to know what the variable  'instance' holds<br />
<em>( note (!) if you end the variable name with  a dot (<strong>.</strong>) you get more info) !</em>:<br />
(fdb) <strong>p instance.</strong></p>
<p>outputs:<strong><br />
$7 = instance = [Object 758409729, class='nl.greenberry.gogeo.app::App']<br />
_appController = [Object 757300145, class='nl.greenberry.gogeo.app::AppController']<br />
_appDisplayModel = null<br />
_appEventModel = null<br />
_appModuleManager = null<br />
_appSoundModel = null<br />
_eventModel = [Object 758625729, class='nl.greenberry.gogeo.app::EventModel']<br />
_modelLocator = [Object 758703937, class='nl.greenberry.gogeo.app::ModelLocator']<br />
_moduleManager = [Object 760443361, class='nl.greenberry.gogeo.app::ModuleManager']<br />
_moduleName = null<br />
_stage = [Object 756722513, class='flash.display::Stage']<br />
displayModel = [Object 757301009, class='nl.greenberry.gogeo.app::DisplayModel']<br />
eventModel = [Object 758625729, class='nl.greenberry.gogeo.app::EventModel']<br />
moduleManager = [Object 760443361, class='nl.greenberry.gogeo.app::ModuleManager']<br />
moduleName = null<br />
NAME = "Go-Geo"<br />
soundModel = [Object 758409793, class='nl.greenberry.gogeo.app::SoundModel']<br />
stage = [Object 756722513, class='flash.display::Stage']<br />
VERSION = "0.0.1"</strong></p>
<p>and the rest you will find out !</p>
<p>by the way<strong> you can alter variables</strong> realtime, and it displays your traces too:<br />
<strong>[trace] sayHello</strong></p>
<p>cheers !<br />
Flashdevelop now complete for me <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=18</wfw:commentRss>
		</item>
		<item>
		<title>flex sdk compile time variables, switches and resources Hacks</title>
		<link>http://greencollective.nl/blog/?p=17</link>
		<comments>http://greencollective.nl/blog/?p=17#comments</comments>
		<pubDate>Tue, 09 Dec 2008 01:51:27 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[mxmlc - flex sdk]]></category>

		<category><![CDATA[flex sdk]]></category>

		<category><![CDATA[mxmlc]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=17</guid>
		<description><![CDATA[Super nice article on how to create a compiletime conditional switch for for ex. calling an alternate version of the same function or adding compiletime var-values at  with the flex sdk command line
http://code.awenmedia.com/node/34
Code examples from his site:
ADDING COMPILETIME VARS:


mxmlc MyConfigClass.as -define+=CONFIG::someSetting,true
or
...-define+=CONFIG::myString,"'Hello!'" -define+=CONFIG::myNumber,"7"
for someSetting the AS3 class would be:

package {
public class MyConfigClass
{
   public static [...]]]></description>
			<content:encoded><![CDATA[<p>Super nice article on how to create a compiletime conditional switch for for ex. calling an alternate version of the same function or adding compiletime var-values at  with the flex sdk command line<br />
http://code.awenmedia.com/node/34</p>
<p>Code examples from his site:</p>
<pre class="geshifilter-javascript"><strong><strong>ADDING COMPILETIME VARS:

</strong></strong></pre>
<pre class="geshifilter-actionscript"><strong>mxmlc MyConfigClass.<span style="color: #006600">as</span> -define+=CONFIG::someSetting,<span style="color: #000000; font-weight: bold">true
or
</span>...-define+=CONFIG::myString,<span style="color: #ff0000">"'Hello!'"</span> -define+=CONFIG::myNumber,<span style="color: #ff0000">"7"</span></strong></pre>
<p>for someSetting the AS3 class would be:</p>
<p class="geshifilter">
<pre class="geshifilter-javascript"><span style="color: #003366; font-weight: bold">package</span> <span style="color: #66cc66">{</span>
<span style="color: #003366; font-weight: bold">public</span> <span style="color: #003366; font-weight: bold">class</span> MyConfigClass
<span style="color: #66cc66">{</span>
   <span style="color: #003366; font-weight: bold">public</span> static <span style="color: #003366; font-weight: bold">const</span> SOME_SETTING:Boolean=CONFIG::someSetting;  <span style="color: #009900; font-style: italic">// Actual AS3 this time</span>

   <span style="color: #003366; font-weight: bold">public</span> <span style="color: #003366; font-weight: bold">function</span> doSomething<span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>:<span style="color: #000066; font-weight: bold">void</span>
   <span style="color: #66cc66">{</span>
      <span style="color: #000066; font-weight: bold">if</span> <span style="color: #66cc66">(</span>SOME_SETTING<span style="color: #66cc66">)</span>
      <span style="color: #66cc66">{</span>
          <span style="color: #009900; font-style: italic">// Do it!</span>
      <span style="color: #66cc66">}</span>
   <span style="color: #66cc66">}</span>
<span style="color: #66cc66">}</span>
<span style="color: #66cc66">}</span></pre>
<pre class="geshifilter-javascript"></pre>
<pre class="geshifilter-javascript"><strong>CONDITIONAL FUNCTION SWITCH:
</strong>
mxmlc MyClass.<span style="color: #006600">as</span> -define+=CONFIG::isDebug,<span style="color: #000000; font-weight: bold">true</span>  -define+=CONFIG::isRelease,<span style="color: #000000; font-weight: bold">false

</span>//AS3
package
<span style="color: #66cc66">{</span>
<span style="color: #0066cc">public</span> <span style="color: #000000; font-weight: bold">class</span> MyClass
<span style="color: #66cc66">{</span>
    CONFIG::isDebug
    <span style="color: #0066cc">public</span> <span style="color: #000000; font-weight: bold">function</span> doSomething<span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>:<span style="color: #0066cc">void</span>
    <span style="color: #66cc66">{</span>
        <span style="color: #0066cc">trace</span><span style="color: #66cc66">(</span><span style="color: #ff0000">"This is a debug build!"</span><span style="color: #66cc66">)</span>;
    <span style="color: #66cc66">}</span>

    CONFIG::isRelease
    <span style="color: #0066cc">public</span> <span style="color: #000000; font-weight: bold">function</span> doSomething<span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>:<span style="color: #0066cc">void</span>
    <span style="color: #66cc66">{</span>
        <span style="color: #0066cc">trace</span><span style="color: #66cc66">(</span><span style="color: #ff0000">"This is a release build!"</span><span style="color: #66cc66">)</span>;
    <span style="color: #66cc66">}</span>
<span style="color: #66cc66">}</span>
<span style="color: #66cc66">}</span></pre>
<pre class="geshifilter-javascript"></pre>
<pre class="geshifilter-javascript"></pre>
<p>Another from usefull tip-set from awen on adding resources and css files at compiletime by abusing some flex buildin hacks:</p>
<p>http://code.awenmedia.com/node/33</p>
<pre class="geshifilter-actionscript">
<strong>
</strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=17</wfw:commentRss>
		</item>
		<item>
		<title>AS3 textfield blinking caret after textfield focus / tabbing ? Solved!</title>
		<link>http://greencollective.nl/blog/?p=16</link>
		<comments>http://greencollective.nl/blog/?p=16#comments</comments>
		<pubDate>Sat, 19 Jul 2008 01:21:05 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=16</guid>
		<description><![CDATA[To obtain focus on a textfield with a custom textformat on it can give you headaches:
From wrong caret color to disapaering textcontent when you use tab button  to unselectable text content.
You just keep fumbling around with _Textfield.stage.focus = _Textfield without joy.
I lost several hours to get the caret blinking where I wanted it.
It is [...]]]></description>
			<content:encoded><![CDATA[<p>To obtain focus on a textfield with a custom textformat on it can give you headaches:<br />
From wrong caret color to disapaering textcontent when you use tab button  to unselectable text content.<br />
You just keep fumbling around with _Textfield.stage.focus = _Textfield without joy.<br />
I lost several hours to get the caret blinking where I wanted it.</p>
<p>It is so simple if you just had known that you NEED TO SET THE<br />
<code>Textfield.<strong>defaultText<font color="#008000">F</font>ormat </strong>= myFormat </code>wright before you had the line <code>textfield.setTextformat(myFormat)</code>.</p>
<p>It seems that focussing or unfocussing or tabbbing resets your textformat with the default textformat,<br />
and since that didn't exist... flash defaults to a STATIC textfield. YipiYoYO....<br />
Figure that, especially after the tab first killed your textcontent and then makes your field unselectable.</p>
<p>But hey when you apply the defaulTextformat wright before you start playing,<br />
suddenly the focussing and caret'ing works like a charm.<br />
Hope you are happy to find this post ! I would have been <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Here a little helper boyie class :</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="700" height="1150" id="ftf_wp" align="middle">
		  <param name="movie" value="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noscale" />
		  <param name="bgcolor" value="#ffffff" />
		  <param name="flashvars" value="w=700&h=1150&file=index.php&ftf=true&postID=16&no=0&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		  <embed src="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" quality="high" scale="noscale" bgcolor="#ffffff" width="700" height="1150" name="ftf_wp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="w=700&h=1150&file=index.php&ftf=true&postID=16&no=0&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		</object></p>
<p>use it like this after import CaretFocus;<br />
<code>CaretFocus.atBegin(TField)<br />
CaretFocus.atEnd(TField)<br />
CaretFocus.atIndex(TField,5)<br />
CaretFocus.unfocus(TField)<br />
CaretFocus.focus(TField)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=16</wfw:commentRss>
		</item>
		<item>
		<title>usefull eclipse configuration for ANT + flex</title>
		<link>http://greencollective.nl/blog/?p=15</link>
		<comments>http://greencollective.nl/blog/?p=15#comments</comments>
		<pubDate>Thu, 22 May 2008 20:41:23 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[FLEX]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=15</guid>
		<description><![CDATA[Step 1: Create ant-build Folder in your project

 Right click on your project name and click New.. Folder...
 For the sake of the example, call the folder "ant-build".
 Copy the lib folder from Adobe's flex_ant_tasks_mmddyy.zip to this new folder. The jar file in this lib directory can really go anywhere on your file system, but [...]]]></description>
			<content:encoded><![CDATA[<p>Step 1: Create ant-build Folder in your project</p>
<ol>
<li> Right click on your project name and click New.. Folder...</li>
<li> For the sake of the example, call the folder "ant-build".</li>
<li> Copy the lib folder from Adobe's flex_ant_tasks_mmddyy.zip to this new folder. The jar file in this lib directory can really go anywhere on your file system, but this is a good enough place for it while getting started.</li>
</ol>
<p>Step 2: Update Ant Runtime Preferences in Eclipse</p>
<ol>
<li> Update the Ant classpath.
<ol>
<li> Go to Window... Preferences.... Expand the Ant entry on the left and click Runtime.</li>
<li> Under the Classpath tab, click Global Entries. Then click Add External jars and add the flexTasks.jar file in the ant-build/lib folder created in Step 1.</li>
<li> If Eclipse gives you a warning about missing a tools.jar file, refer to this site for guidance: <a href="http://www.dynamicobjects.com/d2r/archives/002591.html" class="external" rel="nofollow" target="_blank">http://www.dynamicobjects.com/d2r/archives/002591.html</a></li>
</ol>
</li>
<li> Map the Flex Tasks to the correct class. In this step, you are essentially configuring Eclipse with the mappings from the flexTasks.tasks file.
<ol>
<li> Under the Tasks tab, click Add Task...</li>
<li> In the name field, enter "mxmlc" (without the quotes).</li>
<li> In the location dropdown, select the flexTasks.jar file from Step 1, #3.</li>
<li> In the directory tree that appears, select /flex2/ant, and then select MxmlcTask.class.</li>
<li> Click OK to add the Flex task.</li>
<li> Repeat for "compc" and "html-wrapper", if you plan to use these tasks.</li>
</ol>
</li>
<li> Click OK to apply and exit the Preferences window.</li>
</ol>
<p>Step 3: Customizing the build.xml</p>
<ol>
<li> Under the "ant-build" folder, create a build.xml file.</li>
<li> Copy the sample build file below into this file:</li>
<li> Make sure the FLEX_HOME property points to the Flex SDK on your machine. If you installed the Flex Builder plugin, by default, it is located in C:\Program Files\Adobe\Flex Builder 2 Plug-in\Flex SDK 2\</li>
<li> PROJECT_HOME should point to your Flex project on the file system.</li>
<li> MAIN_SOURCE_FOLDER should be the location of your source files. And OUTPUT_FOLDER should be where the swf files are created when you run a build. These 2 properties correspond to the entries of the same name, under the Flex Build Path section of the project properties.</li>
</ol>
<p><code> 	 &lt;?xml version="1.0" encoding="utf-8"?&gt; </code></p>
<pre>&lt;project name="My App Builder" basedir="."&gt;     &lt;property name="FLEX_HOME" value="C:/flex/sdk"/&gt;

&lt;property name="PROJECT_HOME" value="C:/flex/workspace/MyFlexProject"/&gt;
&lt;property name="MAIN_SOURCE_FOLDER" value="${PROJECT_HOME}/src"/&gt;
&lt;property name="OUTPUT_FOLDER" value="${PROJECT_HOME}/bin"/&gt;

&lt;target name="main"&gt;
&lt;mxmlc file="${MAIN_SOURCE_FOLDER}/Main.mxml" output="${OUTPUT_FOLDER}/Main.swf" keep-generated-actionscript="true"&gt;
&lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/&gt;
&lt;source-path path-element="${MAIN_SOURCE_FOLDER"/&gt;
&lt;/mxmlc&gt;
&lt;/target&gt;</pre>
<pre>
&lt;/project&gt;</pre>
<p>I hope that helps someone.</p>
<p>------</p>
<p>Or a bigger one build.xml:</p>
<pre>
&lt;?xml version="1.0"?&gt;
&lt;project name="statistics" default="production" basedir="."&gt;

&lt;description&gt;tatistics module&lt;/description&gt;

&lt;!--// # # # # # # # # # # # # DEFINE YOUR RESOURCES # # # # # # # # # # # # //--&gt;
&lt;property name="FLEX_HOME"     location="${basedir}/dependencies/flex_sdk_3.0.0.477/" /&gt;
&lt;property name="FLEX_TASKS"     location="${basedir}/dependencies/flex_sdk_3.0.0.477/ant" /&gt;

&lt;!--// # # # # # see folder 'dependencies' for archived resources # # # # # //--&gt;

&lt;!--// properties //--&gt;

&lt;property name="build.classpath"                 location="${basedir}/src"  /&gt;
&lt;property name="build.extraclasspath"             location="${basedir}/classes"  /&gt;

&lt;property name="build.assets"                    location="${basedir}/assets" /&gt;
&lt;property name="build.version"                   value="0.99"/&gt;
&lt;property name="build.width"                       value="471"/&gt;
&lt;property name="build.height"                   value="455"/&gt;
&lt;property name="build.documentation.exec"         value="${FLEX_HOME}/bin/asdoc" /&gt;

&lt;property name="build.bin.production"  location="${basedir}/bin/main.swf" /&gt;
&lt;property name="build.bin.development" location="${basedir}/bin/dev.swf" /&gt;

&lt;property name="build.main.production" value="${build.classpath}/Main.as"/&gt;

&lt;property name="build.version.path"    location="${build.classpath}/Build.as"/&gt;
&lt;property name="build.version.package" value=""/&gt;
&lt;property name="build.copyright"       value="Copyright(c) myteam"/&gt;
&lt;property name="build.owner"           value="http://mylink.com"/&gt;

&lt;!--// misc //--&gt;

&lt;taskdef file="${FLEX_TASKS}/flexTasks.tasks" classpath="${FLEX_TASKS}/lib/flexTasks.jar" /&gt;

&lt;tstamp&gt;
&lt;format property="build.time" pattern="dd-MM-yyyy" unit="day" /&gt;
&lt;/tstamp&gt;

&lt;buildnumber /&gt;

&lt;echo&gt;${ant.project.name}
==========================
Version: ${build.version}
Build number: ${build.number}
Build Time: ${build.time}&lt;/echo&gt;

&lt;condition property="isWindows"&gt;
&lt;os family="windows" /&gt;

&lt;/condition&gt;

&lt;!-- builds //--&gt;</pre>
<pre>&lt;target name="production" depends="version" description="Compile production release"&gt;</pre>
<pre>&lt;echo&gt;Building project
main:  ${build.main.production}
output:${build.bin.production}&lt;/echo&gt;
&lt;mxmlc file="${build.main.production}" output="${build.bin.production}"
keep-generated-actionscript="false" actionscript-file-encoding="UTF-8"
use-network="true" debug="false" optimize="true" incremental="false"&gt;

&lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" /&gt;
&lt;default-size width="${build.width}" height="${build.height}" /&gt;

&lt;source-path path-element="${FLEX_HOME}/frameworks" /&gt;
&lt;source-path path-element="${build.classpath}" /&gt;
&lt;source-path path-element="${build.extraclasspath}" /&gt;
&lt;/mxmlc&gt;
&lt;/target&gt;

&lt;target name="development" description="Compile development basic"&gt;

&lt;echo&gt;Building project [development]&lt;/echo&gt;
&lt;mxmlc file="${build.main.production}" output="${build.bin.development}"
keep-generated-actionscript="false" actionscript-file-encoding="UTF-8"
use-network="true" debug="true" optimize="true" incremental="false"&gt;

&lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" /&gt;

&lt;default-size width="${build.width}" height="${build.height}" /&gt;

&lt;source-path path-element="${FLEX_HOME}/frameworks" /&gt;
&lt;source-path path-element="${build.classpath}" /&gt;

&lt;source-path path-element="${build.classpath.bulk_loader}" /&gt;
&lt;source-path path-element="${build.classpath.nono_toolkit}" /&gt;

&lt;source-path path-element="${build.classpath.mc_toolkit}" /&gt;
&lt;source-path path-element="${build.classpath.tweener}" /&gt;
&lt;/mxmlc&gt;
&lt;/target&gt;

&lt;target name="correctIfWindows" if="isWindows"&gt;
&lt;property name="build.documentation.exec" value="${build.documentation.exec}.exe" /&gt;
&lt;/target&gt;

&lt;target name="version" description="Write version class"&gt;
&lt;echo&gt;Create Version class&lt;/echo&gt;
&lt;echo file="${build.version.path}" append="false"&gt;/**
* Build class
* machine generated class holding build info
* please use 'Build.makeContextMenu(mySprite.stage);' to add build info to context menu
* this will enable you to verify deployed versions by right-mouse-clicking on the swf at any time!
**/
package ${build.version.package}{
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.events.ContextMenuEvent;
import flash.net.URLRequest;
import flash.net.navigateToURL;
import flash.display.DisplayObjectContainer;
//import com.mediacatalyst.error.StaticClassError;

public final class Build {
public static const product:String = "${ant.project.name}";
public static const version:String = "${build.version}";
public static const time:String = "${build.time}";
public static const number:Number = ${build.number};
public static const copyright:String = "${build.copyright}";
public static const owner:String = "${build.owner}";

public static function makeContextMenu(obj:DisplayObjectContainer,useSeperator:Boolean=true):void{
var menu:ContextMenu = new ContextMenu();
menu.hideBuiltInItems();
menu.builtInItems.print = true;
var name:ContextMenuItem = new ContextMenuItem(product,useSeperator);
menu.customItems.push(name);
var version:ContextMenuItem = new ContextMenuItem("Version "+version+".b"+number+" ("+time+")",true);
menu.customItems.push(version);
var copy:ContextMenuItem = new ContextMenuItem(copyright);
menu.customItems.push(copy);
obj.contextMenu = menu;
copy.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, _goOwner);
}

private static function _goOwner(e:ContextMenuEvent):void{
navigateToURL(new URLRequest(owner),"owner");
}

public function Build(){
//throw new StaticClassError("Build");
}
}
}&lt;/echo&gt;
&lt;/target&gt;
&lt;/project&gt;</pre>
<p>if you don't use eclipse you can still build by downloading ANT, add it to you system PATH<br />
and from the commandline use command ANT <buildfile> <target></target></buildfile></p>
<p>ant build.xml production<br />
ant build.xml development</p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=15</wfw:commentRss>
		</item>
		<item>
		<title>Easy Favourite Folder Access with SHORTY !</title>
		<link>http://greencollective.nl/blog/?p=11</link>
		<comments>http://greencollective.nl/blog/?p=11#comments</comments>
		<pubDate>Sun, 16 Mar 2008 18:41:13 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[utilities]]></category>

		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=11</guid>
		<description><![CDATA[Do you often have to save or open files from the same project folder?
Do you hate programs forgetting your last accessed folder?
Do you browse your filesystem more then you want ?
Well then here come's SHORTY !
Stijn De Ryck from Green Collective together with Virgil from Datadarling.com develloped this great mini utility that makes your life [...]]]></description>
			<content:encoded><![CDATA[<p>Do you often have to save or open files from the <strong>same project folder</strong>?<br />
Do you hate programs forgetting your last accessed folder?<br />
Do you browse your filesystem more then you want ?</p>
<p>Well then here come's <strong>SHORTY</strong> !<br />
Stijn De Ryck from Green Collective together with Virgil from Datadarling.com develloped this great mini utility that makes your life just more profitable <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Shorty gives you easy acces to a max of 5 favourite (project)folders from within ANY program.</p>
<p>Simply asign a folder from within explorer to Shorty 1 to 5:</p>
<p><img src="http://greencollective.nl/blog/wp-content/uploads/2008/03/shorty_assign.png" alt="assign a folder to shorty 1-5" /></p>
<p>- Right click folder in explorer or from within the file open/save dialog.<br />
- Select Shorty 1,2,3,4 or 5 and you're set.</p>
<p>Now when you want to save or open a file yto/from your favourite shorty folder ou can jump to that folder with only 1 click;<br />
The folder you assigned to "Shorty 1" will appear on the left in the vertical places bar.</p>
<p><a href="http://greencollective.nl/blog/wp-content/uploads/2008/03/shorty_file_open.png" title="easy folder access with shorty shortcuts"><img src="http://greencollective.nl/blog/wp-content/uploads/2008/03/shorty_file_open.png" alt="easy folder access with shorty shortcuts" /></a></p>
<p>To reset back to the default windows places, just uninstall shorty.<br />
It is also possible to ad My Computer, Desktop, The Root of a drive or a network share to a Shorty Shortcut.</p>
<p>We created it for ourselves but we love to share it because we want you ...<br />
to stop useless folder browsing NOW !</p>
<p>Download our clean <strong>Short </strong>here:<br />
<a href="http://greencollective.nl/blog/wp-content/uploads/2008/03/shorty-v100.zip" title="SHORTY V1.00 Installer (ZIP,Win32)">SHORTY V1.00 Installer (ZIP,Win32)</a></p>
<p>That said:<br />
Another "little great" tool elsewhere on 'ze internetz' is Clippath, which enables you to easily copy a path to a folder or file. Extremely handy when you want for ex a path to paste in a dos-box or target a folder to unzip to:<br />
<a href="http://personal.vsnl.com/sureshms/utilities.html">check here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=11</wfw:commentRss>
		</item>
		<item>
		<title>phi, the golden ratio: 1.61803399</title>
		<link>http://greencollective.nl/blog/?p=8</link>
		<comments>http://greencollective.nl/blog/?p=8#comments</comments>
		<pubDate>Mon, 18 Feb 2008 09:55:55 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[Math]]></category>

		<category><![CDATA[Phi]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=8</guid>
		<description><![CDATA[Nature, art, your body, ... everything  and the whole world is interwoven with this number :
the so called golden ratio = 1.61803399.
for any mathematician this might be ordinary playground,
For me it's still a miracle  Try to achieve this similar math outcomes with any other number !
Whenever you play with this number, you're up [...]]]></description>
			<content:encoded><![CDATA[<p>Nature, art, your body, ... everything  and the whole world is interwoven with this number :</p>
<p>the so called <font><strong><font size="+1"><strong>golden ratio = 1.61803399.</strong></font></strong></font></p>
<p>for any mathematician this might be ordinary playground,</p>
<p>For me it's still a miracle <img src='http://greencollective.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Try to achieve this similar math outcomes with any other number !</p>
<p>Whenever you play with this number, you're up for a good time.</p>
<p>I did some color calculations in a flash app long time ago and will post it soon.</p>
<p align="center"><a href="http://greencollective.nl/blog/wp-content/uploads/2008/02/phi-calculations.jpg" title="phi, the golden ratio: 1.61803399"><img src="http://greencollective.nl/blog/wp-content/uploads/2008/02/phi-calculations.jpg" alt="phi, the golden ratio: 1.61803399" /></a></p>
<p align="center"><em>by the way the image width/height ratio is phi'd;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=8</wfw:commentRss>
		</item>
		<item>
		<title>loadBitmap &#038; external pixel peace</title>
		<link>http://greencollective.nl/blog/?p=6</link>
		<comments>http://greencollective.nl/blog/?p=6#comments</comments>
		<pubDate>Sun, 17 Feb 2008 15:18:54 +0000</pubDate>
		<dc:creator>latcho</dc:creator>
		
		<category><![CDATA[AS2]]></category>

		<category><![CDATA[All Flash]]></category>

		<guid isPermaLink="false">http://greencollective.nl/blog/?p=6</guid>
		<description><![CDATA[Darn,
Why can't we straightaway do a loadBitmap targetting a bitmap item in the library from a loaded external swf (within our own domain!) ?
There must be some flashgod that sees evil in external pixels.
Anyways here is a workaround (AS2).
If we have a canvas.swf that wants to load external.swf
and wants to peek in that external library [...]]]></description>
			<content:encoded><![CDATA[<p>Darn,<br />
Why can't we straightaway do a loadBitmap targetting a bitmap item in the library from a loaded external swf (within our own domain!) ?<br />
There must be some flashgod that sees evil in external pixels.<br />
Anyways here is a workaround (AS2).<br />
If we have a canvas.swf that wants to load external.swf<br />
and wants to peek in that external library for linked bitmaps we could have this:</p>
<p><strong>[canvas.swf]<br />
</strong><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="615" height="520" id="ftf_wp" align="middle">
		  <param name="movie" value="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noscale" />
		  <param name="bgcolor" value="#ffffff" />
		  <param name="flashvars" value="h=520&file=index.php&ftf=true&postID=6&no=0&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		  <embed src="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" quality="high" scale="noscale" bgcolor="#ffffff" width="615" height="520" name="ftf_wp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="h=520&file=index.php&ftf=true&postID=6&no=0&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		</object></p>
<p>our web-cuisine solution to get to that external.swf's  <em>mybitmap_linkage_id</em> is<br />
putting this code in in the root of the swf we are going to load:<br />
don't forget about the</p>
<ul>import flash.display.BitmapData</ul>
<p>!</p>
<p><strong>[external.swf]</strong></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="615" height="150" id="ftf_wp" align="middle">
		  <param name="movie" value="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noscale" />
		  <param name="bgcolor" value="#ffffff" />
		  <param name="flashvars" value="h=150&file=index.php&ftf=true&postID=6&no=1&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		  <embed src="/blog/wp-content/plugins/FlashTextFormatter/ftf_wp.swf" quality="high" scale="noscale" bgcolor="#ffffff" width="615" height="150" name="ftf_wp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="h=150&file=index.php&ftf=true&postID=6&no=1&def=/blog/wp-content/plugins/FlashTextFormatter/definitions/as2.xml&auto=true&" />
		</object></p>
<p>Offcourse there's other ways.<br />
But there all against Flashgod's intentions.<br />
External Pixel Peace, that's where we shall stand for.<br />
Join us;)</p>
<p><strong>Download: </strong><a href="http://greencollective.nl/blog/wp-content/uploads/2008/02/loadexternalbitmap_as2.zip" title="loadExternalBitmap AS2 example FLA’s">loadExternalBitmap AS2 example FLA’s</a></p>
]]></content:encoded>
			<wfw:commentRss>http://greencollective.nl/blog/?feed=rss2&amp;p=6</wfw:commentRss>
		</item>
	</channel>
</rss>
