<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>undefined-type &#187; Flash</title>
	<atom:link href="http://undefined-type.com/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://undefined-type.com</link>
	<description>Flex,Flash &#38; AIR</description>
	<lastBuildDate>Wed, 18 Nov 2009 09:48:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Screendump my Stage</title>
		<link>http://undefined-type.com/2009/11/screendump-my-stage/</link>
		<comments>http://undefined-type.com/2009/11/screendump-my-stage/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 09:48:23 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[screendump]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=601</guid>
		<description><![CDATA[Often in bug testing phase or just to show something it&#8217;s a tideus work to screendump your screen and it get as well a problem if you are dependent by the transparency.
Wrote a small debug class that takes a screen dump of the stage and puts the file on a server (PHP).
So put this PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Often in bug testing phase or just to show something it&#8217;s a tideus work to screendump your screen and it get as well a problem if you are dependent by the transparency.</p>
<p>Wrote a small debug class that takes a screen dump of the stage and puts the file on a server (PHP).</p>
<p>So put this PHP on a server somewhere.<br />
<code><br />
&lt;?php<br />
$png = $GLOBALS["HTTP_RAW_POST_DATA"];<br />
$name = date('Y-m-d H.i.s');<br />
$filename = $name.'.png';<br />
file_put_contents($filename, $png);<br />
?&gt;<br />
</code></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$name = date(&#8216;Y-m-d H.i.s&#8217;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$filename = $name.&#8217;.png&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file_put_contents($filename, $jpg);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">?&gt;</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$name = date(&#8216;Y-m-d H.i.s&#8217;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$filename = $name.&#8217;.png&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file_put_contents($filename, $jpg);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">?&gt;</div>
</div>
<p>Then you can add this class to you project, required is the adobe core package (<a href="http://code.google.com/p/as3corelib/" target="_blank">http://code.google.com/p/as3corelib/</a>).<br />
<a href="http://undefined-type.com/wp-content/uploads/2009/11/Screendump.as">Download Screendump.as</a></p>
<p>To use it first set the URI and stage<br />
<span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 11px;">Screendump.stage = <span style="color: #2529fd;">this</span>.stage;<br />
<span style="color: #b20000;"><span style="color: #000000;">Screendump.URI = </span>&#8220;http://localhost:8888/screendump/dump.php&#8221;<span style="color: #000000;">;</span></span></span></p>
<p>After that whenever you need to take a dump, run<br />
<span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 11px;">Screendump.takeDump();</span></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/11/screendump-my-stage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Runtime Dynamic Fonts for CS4 (fp9), next-gen</title>
		<link>http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/</link>
		<comments>http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 13:35:04 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[cs4]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[runtime]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=440</guid>
		<description><![CDATA[Runtime Fonts for Flash is a wonderful way when building apps, even better if you are as me and creating international apps for a lot of countries, you have the language supports and the problem with characters in fonts when staring to look at Greek, Japanese, Korea, Chinese and so on.  I have a [...]]]></description>
			<content:encoded><![CDATA[<p>Runtime Fonts for Flash is a wonderful way when building apps, even better if you are as me and creating international apps for a lot of countries, you have the language supports and the problem with characters in fonts when staring to look at Greek, Japanese, Korea, Chinese and so on.  I have a old <a href="http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/">Runtime font for CS3</a> that works pretty well. But when starting to use CS4 I wanted to improve the loading and sharing. </p>
<p>So the idea was to use Flex to compile Font SWF files, a big problem when I use Flash CS4 (fp9) and Flex 3. Flex will not recognize my font SWF file, it will also not recognize my local fonts to embed bold/italic font sets. Using an exported CS3 (fp9) file it works just fine.<br />
Note; fp9 = Flash Player 9.</p>
<p>So lets look of how to do this.<br />
First we need to create our font file.<br />
1.) Create an Flex ActionScript project (I use framework 3.2)<br />
2.) The Class name will be something that we will get later so I renamed my as file to FontHolder.as<br />
3.) Remove the constructor and add the embed tags, example below. Note the unicodeRange tag, these are used to select characters to be embedded, remove to embed the entire font.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FontHolder <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>systemFont=<span style="color: #ff0000;">'Verdana'</span>, fontFamily=<span style="color: #ff0000;">'Verdana'</span>, mimeType=<span style="color: #ff0000;">'application/x-font'</span>, unicodeRange=<span style="color: #ff0000;">'U+0061-U+0074'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const verdana_regular:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>systemFont=<span style="color: #ff0000;">'Verdana'</span>, fontFamily=<span style="color: #ff0000;">'Verdana'</span>, mimeType=<span style="color: #ff0000;">'application/x-font'</span>, fontWeight=<span style="color: #ff0000;">'bold'</span>, unicodeRange=<span style="color: #ff0000;">'U+0061-U+0074'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const verdana_bold:<span style="color: #000000; font-weight: bold;">Class</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>4.) Now you have your font SWF file to use for the project.</p>
<p>So with your font file it&#8217;s time to use it in the project. In this example I use my <a href="http://undefined-type.com/2008/07/122/">Flex 3 as CS3 development tool.</a>, this is because I create Flash Player 9 project. You can of course use only Flash IDE or any other kind of code editor.<br />
1.) Create a new ActionScript project, change the SDK to CS3.<br />
2.) Click next, &#8220;Main source folder&#8221;, type &#8220;src&#8221;, this is just to put the files more pretty =), Click Finish.<br />
3.) Create a CSS file that will control the fonts. &#8220;default.css&#8221;. Just add two classes that we can work with.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">h1<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Verdana<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">24px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
body<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Verdana<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>5.) Download the <a href="http://undefined-type.com/wp-content/uploads/2009/02/fontmanager.swc">FontManager.swc</a> file and add it to your project.</p>
<p>Add SWC <strong>HowTo</strong> for <strong>Flex</strong><br />
6.1.) Create a folder called swc in project folder.<br />
6.2.) Place the FontManager.swc file into the created folder.<br />
6.3.) Right-Click on project folder and select properties<br />
6.4.) In menu choose &#8220;ActionScript Build Path&#8221;, Choose the tab &#8220;Library path&#8221;<br />
6.5.) Click on &#8220;Add SWC Folder&#8221;,  Select the created swc folder and close the windows, all done.</p>
<p>Add SWC <strong>HowTo</strong> for <strong>Flash</strong><br />
7.1.) Create a folder called swc in project folder.<br />
7.2.) Place the FontManager.swc file into the created folder.<br />
7.3.) Open Flash and Publish Settings.<br />
7.4.) Choose the Flash tab and click on Settings next to the script combobox.<br />
7.5.) Choose the &#8220;Library Path&#8221; tab and add the swc file to the list, all done. </p>
<p>So, everything is there. How am I using it? Well, this is a dump on the project playground.<br />
<a href="http://undefined-type.com/wp-content/uploads/2009/02/dynamic_files1.png" rel="lightbox[440]"><img class="alignleft size-full wp-image-454" title="dynamic_files1" src="http://undefined-type.com/wp-content/uploads/2009/02/dynamic_files1.png" alt="dynamic_files1" width="192" height="218" /></a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>To be able to use the fonts they are needed first to be loaded. By default this is the structure for font swf and css file named default. They can be changed by FontManager.name = &#8216;default&#8217; (the name) and the path with FontManager.path = &#8216;fonts/&#8217;.</p>
<p>The easiest way is to just get the singleton and load it.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> manager:FontManager=FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
manager.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, onManagerComplete<span style="color: #66cc66;">&#41;</span>;
manager.<span style="color: #006600;">loadStandalone</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>When it&#8217;s loading just send the textfield, style and text to the FontManager, you can add only textfield and text if you want to add e.g. multiple styles to one textfield.<br />
Here&#8217;s some examples.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onManagerComplete<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> tf:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	tf.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
	tf.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	tf.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">6</span>;
	FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span>tf, <span style="color: #ff0000;">&quot;h1&quot;</span>, <span style="color: #ff0000;">&quot;abc&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>tf<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> tf1:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	tf1.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
	tf1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">150</span>;
	tf1.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	tf1.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">6</span>;
	FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">register</span><span style="color: #66cc66;">&#40;</span>tf1, <span style="color: #ff0000;">&quot;body&quot;</span>, <span style="color: #ff0000;">&quot;abc&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>tf1<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> tf2:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	tf2.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;
	tf2.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">300</span>;
	tf2.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	tf2.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">6</span>;
	FontManager.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#40;</span>tf2, <span style="color: #ff0000;">&quot;&lt;h1&gt;abc&lt;/h1&gt;<span style="color: #000099; font-weight: bold;">\n</span>abc&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>tf2<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/02/runtime-dynamic-fonts-for-cs4-fp9-next-gen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Encode to FLV</title>
		<link>http://undefined-type.com/2009/02/encode-to-flv/</link>
		<comments>http://undefined-type.com/2009/02/encode-to-flv/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 12:10:13 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[f4v]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=397</guid>
		<description><![CDATA[This is a quick help for how to Encode/Convert movies to the Flash FLV format. There are a couple of general encoding features that could be good to know. The key is to find a good balance of frame rate, data rate and keyframe.
When working with digitally compressed video in a format such as Flash [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick help for how to Encode/Convert movies to the Flash FLV format. There are a couple of general encoding features that could be good to know. The key is to find a good balance of frame rate, data rate and keyframe.</p>
<p>When working with digitally compressed video in a format such as Flash Video, the higher the frame rate, the larger the file size. To reduce the file size, you must lower either the frame rate or the data rate If you lower the data rate and leave the frame rate unchanged, the image quality is reduced. If you lower the frame rate and leave the data rate unchanged, the video motion may look less smooth than desired. Something to remember here as well is that you can never gain quality when encoding, so if you have a bad video to start with it will not get any more pleasant to look at just because you boost the data rate.</p>
<p><strong>For short;</strong><br />
<strong>Frame rate (fps); </strong>The less, the more jumpy.<br />
<strong>Data rate (bitrate); </strong>The less, the more pixels/blur.<br />
<strong>Keyframe;</strong> The less, smaller file size.</p>
<p>Since Flash Player 9<em>,0,115,0</em> there is now the possibility to convert <a href="http://www.adobe.com/products/hdvideo/" target="_blank">HD quality</a>, so i brief version list of the codecs;<br />
Flash 6-7; Sorenson Video<br />
Flash 8-9; On2<br />
Flash 9-10; On2 (new <a href="http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v10.pdf" target="_blank">F4V open format</a> since 9,0,115,0)</p>
<p>There is a really good convert guide to get some help on the export settings;<br />
<a href="http://www.adobe.com/devnet/flash/apps/flv_bitrate_calculator/" target="_blank">http://www.adobe.com/devnet/flash/apps/flv_bitrate_calculator/</a></p>
<p><strong>How to work out the best video compression for me?</strong><br />
This is the hard bit, for short I would recommend these steps.<br />
1.) Figure out a compression that you guess would be the perfect one (get help from calculator).<br />
2.) Setup 4 more compressions, 2 that has higher quality than your (1.) setting and 2 that are below.<br />
3.) Line up all the videos and find the video with the lowest quality settings but that you find is still good. Now from this go back to step 2.<br />
4.) After a couple of rounds this way you should have found a compression for your video.</p>
<p>Remember that all videos are different, so there is no magic setting that will work on all your videos. Also when choosing the &#8220;best&#8221; video you need to keep track on the file size and what the target is going to be.<br />
<span id="more-397"></span></p>
<p>&nbsp;</p>
<h2><strong>Frame rate (fps)</strong></h2>
<p>Video is a sequence of images that appear on the screen in rapid succession, giving the illusion of motion. The number of frames that appear every second is known as the frame rate, and it is measured in frames per second (fps). The higher the frame rate, the more frames per second are used to display the sequence of images, resulting in smoother motion. The trade-off forhigher quality, however, is that higher frame rates require a larger amount of data to display the video, which uses more bandwidth.</p>
<p>Video looks much better at native frame rates so it&#8217;s recommended to keep it if possible. For full-motion NTSC (National Television System Committee in the U.S.), use 29.97 fps.  For PAL (Phase Alternating Line in Europe), use 25 fps.</p>
<p>If you lower the frame rate to lower file size the Flash Video Encoder drops frames at a linear rate to achieve the new fps rate. However, if you need to reduce the frame rate, the best results come from dividing evenly. For example, if your source has a frame rate of 24 fps, then reduce the frame rate to 12 fps, 8 fps, 6 fps, 4 fps, 3 fps, or 2 fps. If the source frame rate is 30 fps, in most cases you can adjust the frame rate to 15 fps, 10 fps, 6 fps, and so on.</p>
<p>If a video clip is longer than 10 minutes, the audio will drift noticeably out of sync if you do not adhere to the 29.97 fps rate or an accurate even division for lower frame rates (such as 14.98 fps, which is half of 29.97).</p>
<p><strong>For short;</strong><br />
<strong>NTSC (u.s);</strong> 29.97 fps<br />
<strong>PAL (Europe);</strong> 25 fps<br />
<strong>Dropping frames;</strong> Reduce by 2 (e.g. 24, 12, 8, 6, 4, 3, 2 fps)</p>
<p>&nbsp;</p>
<h2><strong>Data rate (bitrate)<br />
</strong></h2>
<p>The data rate affects the quality of a video clip. When you deliver video using the Internet, you should produce files using lower data rates. Users with fast Internet connections can view the files with little or no delay, but dial-up users must wait for files to download. If you anticipate an audience of dial-up users, you should make short video clips to keep the download times within acceptable limits. There are a couple of presets when encoding but it&#8217;s as well possible to set your custom data rate.</p>
<p>When converting you can choose the bitrate encoding from CBR (Constant Bitrate) to VBR (Variable Bitrate). When using CBR it will hold the same bitrate constant over the whole video, the VBR will analyze the video and where there is not a lot of movement it will lower the data rate, on the other hand where it&#8217;s a lot of movement it will set a higher data rate. You can also change the Encoding passes from One to Two, when doing so it will first analyze the video before encode, use this as a default for professional videos.</p>
<p><strong>For short;</strong><br />
<strong>Data rate;</strong> Keep as low as possible without losing your &#8220;maximum quality&#8221;.<br />
<strong>CBR;</strong> Constant bitrate, same data rate over whole movie<br />
<strong>VBR;</strong> Variable bitrate, changes data rate by analyzing movements</p>
<p>&nbsp;</p>
<h2><strong>Keyframes</strong></h2>
<p>Keyframes are complete video frames (or images) that are inserted at consistent intervals in a video clip. The frames between the keyframes contain information on movement and scene changes that occurs between keyframes. For example, if a video depicts a person walking past a doorway, the keyframes contain the complete image of the person and the door in the background, and the interval frames contain information describing the person’s movement as they walk in front of the door.</p>
<p>The keyframe interval value tells the encoder how often to re-evaluate the video image and record a full frame/keyframe. The keyframe interval value can be any number up to 100. When you select Automatic as an interval setting, Flash Video Encoder places a keyframe every two seconds of playback time.</p>
<p>For example, if the video you’re encoding has a frame rate of 30 fps, a keyframe will be inserted every 60 frames. In general, the default keyframe interval value provides a reasonable level of control when seeking within a video clip. If you need to select a custom keyframe placement value, be aware that the smaller the keyframe interval, the larger the file size. If your footage has a lot of scene changes or rapidly moving motion or animation, then the overall image quality may benefit from a lower keyframe interval. In general, a higher keyframe interval produces better image quality because data is not wasted describing the areas of an image that remain unchanged from frame to frame.</p>
<p>An important dependency of the keyframe interval is that it affects the ability of Flash Player to seek (fast-forward or rewind) through an FLV file. Flash Player can only advance from keyframe to keyframe, so if you want to skip to different places and pause the frames, you must use a lower keyframe interval value. If you want to advance to every frame in an FLV file, use a keyframe interval value of 1. When you reduce the keyframe interval value, you must raise the data rate for the Flash video to maintain comparable image quality.</p>
<p><strong>For short;</strong><br />
<strong>Keyframe low number; </strong>Good for &#8220;moving&#8221; in video timeline, file size is bigger and need higher data rate.<br />
<strong>Keyframe high </strong><strong>number</strong><strong>;</strong> Lower file size, Good &#8220;standard&#8221; rule is (frame rate * 2), doesn&#8217;t work good for something that changes scene or moves fast.</p>
<p>&nbsp;</p>
<h2><strong>Aspect ratio</strong></h2>
<p>The most commonly used aspect ratio is 4:3, 16:9 and 2:1. As a rule you should use the same aspect ratio as the original video, else the video will look distorted. An exception is when converting form DV formats that uses rectangular pixels (non-square pixels).</p>
<p>There are some easy formulas to use if you want to resize the video, first decide your locked side (height or width).</p>
<p><strong>Height is master; </strong><br />
<a href="http://undefined-type.com/wp-content/uploads/2009/02/calc011.png" rel="lightbox[397]"><img class="alignleft size-medium wp-image-402" title="calc011" src="http://undefined-type.com/wp-content/uploads/2009/02/calc011-300x53.png" alt="calc011" width="300" height="53" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Height with 4:3 as example;</strong><br />
<a href="http://undefined-type.com/wp-content/uploads/2009/02/calc02.png" rel="lightbox[397]"><img class="alignleft size-full wp-image-403" title="calc02" src="http://undefined-type.com/wp-content/uploads/2009/02/calc02.png" alt="calc02" width="205" height="60" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Width is master;</strong><br />
<a href="http://undefined-type.com/wp-content/uploads/2009/02/calc03.png" rel="lightbox[397]"><img class="alignleft size-medium wp-image-404" title="calc03" src="http://undefined-type.com/wp-content/uploads/2009/02/calc03-300x48.png" alt="calc03" width="300" height="48" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Width with 4:3 as example;</strong><br />
<a href="http://undefined-type.com/wp-content/uploads/2009/02/calc04.png" rel="lightbox[397]"><img class="alignleft size-full wp-image-405" title="calc04" src="http://undefined-type.com/wp-content/uploads/2009/02/calc04.png" alt="calc04" width="204" height="59" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Example;</strong> if your video is 720&#215;480 and want to change it to a 4:3 format. We use the height formula and lock 480. This will give us the new video size of 640&#215;480.<br />
<a href="http://undefined-type.com/wp-content/uploads/2009/02/calc05.png" rel="lightbox[397]"><img class="alignleft size-full wp-image-406" title="calc05" src="http://undefined-type.com/wp-content/uploads/2009/02/calc05.png" alt="calc05" width="154" height="66" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>For short;</strong><br />
<strong>Ratio;</strong> Try to keep original ratio, when changing video size, use formulas.</p>
<p>&nbsp;</p>
<h2>Interlaced / Non-Interlaced</h2>
<p>Most broadcast video is interlaced, though emerging high-definition television standards have interlaced and noninterlaced variants. Interlaced video consists of two fields that make up each video frame. Each field contains half the number of horizontal lines in the frame; the upper field (or Field 1) contains all of the odd-numbered lines, and the lower field (or Field 2) contains all of the even-numbered lines. This actually means that a NTSC 30 fps TV is displaying 60 fps.</p>
<p>Noninterlaced video frames are not separated into fields. A progressive-scan monitor displays a noninterlaced video frame by drawing all of the horizontal lines, from top to bottom, in one pass. Because of this, both fields that make up a video frame are shown simultaneously. Thus, a computer monitor displays video at 30 fps, and most video displayed on computer monitors is noninterlaced.</p>
<p><strong>For short;</strong><br />
<strong>Interlaced;</strong> TV (uses 2 fields)<br />
<strong>Non-Interlaced;</strong> Computer (uses 1 field)</p>
<p>&nbsp;</p>
<h2>Audio</h2>
<p>The audio settings are often the simplest ones. You can select Mono/Stereo channels, if you don&#8217;t need Stereo so select Mono to save some file size. You have as well the bitrate (kbps) for the sound, standard music cd-rom has 128kbps, try to go as low as possible without getting strange noises.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/02/encode-to-flv/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cairngorm and Flash</title>
		<link>http://undefined-type.com/2008/10/cairngorm-and-flash/</link>
		<comments>http://undefined-type.com/2008/10/cairngorm-and-flash/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 18:14:36 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[cairngorm]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=188</guid>
		<description><![CDATA[When developing Flash Applications I like to use the Cairngorm micro-architecture as I do in Flex. Without all the nice Flex Framework classes it takes a little more work. Iteration Two did a Cairngorm Flash 0.95 package but that seems to have fallen of the web.
So I took the Flex Open-Source 2.1 Cairngorm classes and [...]]]></description>
			<content:encoded><![CDATA[<p>When developing Flash Applications I like to use the Cairngorm micro-architecture as I do in Flex. Without all the nice Flex Framework classes it takes a little more work. Iteration Two did a Cairngorm Flash 0.95 package but that seems to have fallen of the web.<br />
So I took the Flex Open-Source 2.1 Cairngorm classes and removed everything until it started to work.</p>
<p>You can download the <a href="http://undefined-type.com/wp-content/flash_cairngorm.zip">Cairngorm to Flash code here.</a></p>
<p>To think about is that;<br />
- Delegates needs to handle the creation and sending of external services<br />
- Bindable does not exist so instead dispatch when data is updated<br />
There are probably a lot of more things here.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/10/cairngorm-and-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 3 as CS3 development tool</title>
		<link>http://undefined-type.com/2008/07/122/</link>
		<comments>http://undefined-type.com/2008/07/122/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 17:09:32 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=122</guid>
		<description><![CDATA[I&#8217;ve played around a little with Flex 3 Builder. I love the FDT plugin to Eclipse. But I think it&#8217;s a little to expensive and for having a use for it I need the enterprise to get debugger functionality.
So I started to search and to play around with my Flex 3 Builder, why can&#8217;t I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve played around a little with <a href="http://www.adobe.com/products/flex/">Flex 3 Builder</a>. I love the <a href="http://fdt.powerflasher.com/">FDT plugin</a> to <a href="http://www.eclipse.org/">Eclipse</a>. But I think it&#8217;s a little to expensive and for having a use for it I need the enterprise to get debugger functionality.</p>
<p>So I started to search and to play around with my Flex 3 Builder, why can&#8217;t I use this??? Well, as it looks like it&#8217;s actually possible.</p>
<p>I created a little video tutorial how to set it up. This is my first video tutorial so sorry if it&#8217;s a little strange. If anyone got some good tips of how to create video tutorials please let me know because this was harder than I thought. The files are very big so will try to record them all over.</p>
<p><span id="more-122"></span></p>
<p><strong>1.) Compile CS3 core library</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step1.swf">Watch the video (3.6mb)</a><br />
1.1) Create Flex Library Project.<br />
1.2) Copy the Flash CS3 fl.* package to project folder.<br />
1.3) Go into Project Properties -&gt; Flex Library Build Path<br />
1.4) Mark the fl.* package to be build, then close window.<br />
1.5) Done, now the Flex Builder compiles the SWC file.<br />
&#8211; UPDATE &#8211;<br />
You can <a href="http://undefined-type.com/wp-content/uploads/2008/07/flash_cs3_core_components.swc">download swc file</a> from here</p>
<p><strong>2.) Change Flex framework</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step2.swf">Watch the video (19.2mb)</a><br />
2.1) Find the Flex 3.0.0 SDK (inside Flex Application folder) and make a copy<br />
2.2) In your copy change the name of the SDK inside flex-sdk-description.xml<br />
2.3) Remove all files except the &#8220;player&#8221; folder in framework/lib<br />
2.4) Inside the &#8220;player&#8221; folder, remove the swc file.<br />
2.5) Copy the &#8220;playerglobal.swc&#8221; file from &#8220;Flash CS3/Configuration/ActionScript 3.0/Classes/&#8221; into the &#8220;player&#8221; folder.<br />
&#8211; UPDATE &#8211;<br />
Place the created/downloaded SWC file in same folder<br />
&#8212;&#8212;&#8212;&#8212;<br />
2.6) Open Flex Builder 3 and open Preferences-&gt;Flex-Installed Flex SDKs.<br />
2.7) Add new SDK and point to your SDK folder. Then click OK and close.<br />
2.8) All done, you have a new SDK CS3 and Flash CS3 compiled fl.* package, start to work!</p>
<p><strong>3.) Create a Project</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step3.swf">Watch the video (11.0mb)</a><br />
3.1) Create a ActionScript project.<br />
3.2) Change the SDK to the one created in Step 2. Then hit next (NOT Finished)<br />
3.3) Change tab to &#8220;Library Path&#8221; and add the SWC file created in step 1. Then hit Finished.<br />
3.4) Create FLA file and save to project, add the Flex class as Document Class.<br />
3.5) Open &#8220;Publish Settings&#8221; and Check &#8220;Permit debugging&#8221;.<br />
3.6) Open Settings for ActionScript version. Unmark &#8220;Automatically declare stage instances&#8221;.<br />
3.7) Now you all good to go. Example, add Textarea to stage and declare instance.<br />
&#8211; UPDATED &#8211;<br />
If you doing the updated tags, skip 3.3</p>
<p><strong>4.) Debug a Project</strong><br />
<a href="http://undefined-type.com/wp-content/flex3_cs3_step4.swf">Watch the video (9.4mb)</a><a href="http://undefined-type.com/media/blogs/a/swf/Flex3_cs3_step4.swf" target="_blank"></a><br />
3.1) Flash CS3: Export your flash project with Debug -&gt; Debug Movie<br />
3.2) Flex: In the menu open debugger profile.<br />
3.3) In URL;s remove default settings and point Debug to your exported SWF file.<br />
3.4) Add a breakpoint in the code and run from flex debugger.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/07/122/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Flash 9.0.115 update crash XMLSocket; Socket Security</title>
		<link>http://undefined-type.com/2008/05/flash-90115-update-crash-xmlsocket-socket-security/</link>
		<comments>http://undefined-type.com/2008/05/flash-90115-update-crash-xmlsocket-socket-security/#comments</comments>
		<pubDate>Fri, 23 May 2008 16:56:42 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[9.0.115]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[socket]]></category>
		<category><![CDATA[xmlsocket]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=104</guid>
		<description><![CDATA[When Flash 9 update came all XMLSockets stopped working. This is for the sandbox security update for XMLSocket and ONLY XMLSocket. Took me a while to understand the problem and how to solve it.
Before:
XMLSocket goes and checks the sandbox security (crossdomain.xml) as all other security related flash things.
Now:
XMLSocket wants to check port 843 (default) for [...]]]></description>
			<content:encoded><![CDATA[<p>When Flash 9 update came all XMLSockets stopped working. This is for the sandbox security update for XMLSocket and ONLY XMLSocket. Took me a while to understand the problem and how to solve it.</p>
<p><strong>Before:</strong><br />
XMLSocket goes and checks the sandbox security (crossdomain.xml) as all other security related flash things.</p>
<p><strong>Now:</strong><br />
XMLSocket wants to check port 843 (default) for a security crossdomain file. This is NOT same file as the crossdomain that is on the web server port 80.</p>
<p><strong>Solution:</strong><br />
After long searching and reading it’s really 2 things you need to do.<br />
1.) The server must feed client with a special XMLSocket crossdomain file. Download the zip from <a title="Socket Security" href="http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html" target="_blank">http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html</a> and read the article, could also be good to read <a title="Player 9 Security" href="http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html" target="_blank">http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html</a> so you know what is going on.<br />
I don’t know so much about servers so on my ubuntu machine i just typed in the terminal.<br />
./flashpolicyd.pl &#8211;file=../policyfile.xml &#8211;port=843</p>
<p>2.) Flash Client; make sure to run loadPolicyFile(&#8220;xmlsocket://mysite.com:843&#8243;) or change port number to what you have in #1. When it’s loaded it should all work.<br />
It’s simple as that,,,</p>
<p>Why most people always write lite, I know this but not, This is how you doing it&#8230;. Flash Blogs, shape up. =)</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/05/flash-90115-update-crash-xmlsocket-socket-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developer kit 2.0.8</title>
		<link>http://undefined-type.com/2008/03/developer-kit-208/</link>
		<comments>http://undefined-type.com/2008/03/developer-kit-208/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 16:54:49 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[kit]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=101</guid>
		<description><![CDATA[Released an update to my “Flash Developer Kit” today.
My devkit basically contains eclipse with the wonderful FDT Professional, some Java installs, Perl, Flex compiler files.
Because I have 8 developers to handle I’ve made some rules on what software to use, code rules, architecture and so on. After a lot of hard work it finally pays [...]]]></description>
			<content:encoded><![CDATA[<p>Released an update to my “Flash Developer Kit” today.<br />
My devkit basically contains eclipse with the wonderful <a href="http://fdt.powerflasher.com/">FDT Professional</a>, some Java installs, Perl, Flex compiler files.</p>
<p>Because I have 8 developers to handle I’ve made some rules on what software to use, code rules, architecture and so on. After a lot of hard work it finally pays of. We can now easily get into a projects SVN (using <a href="http://tortoisesvn.tigris.org/">tortoise</a>) and instantly know where to start looking for code when something needs to be done.</p>
<p>I have as well setup a big SVN library with our whole framework, so when starting a new project an ANT script is building up the architecture with files and everything we need to get started fast.</p>
<p>As a general working architecture for the code we are following <a href="http://labs.adobe.com/wiki/index.php/Cairngorm">Adobes Cairngorm</a> (<a href="http://www.cairngormdocs.org/">some good docs</a>). Was created for Flex applications, but with some refactorying I got it to work very nice with AS3 projects and is now porting the major functionality to AS2. This makes us be able to work with the same architecture in all projects and does not have to care if it’s Flash 6 or 9 projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/03/developer-kit-208/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guitar Hero &#8220;in&#8221; Flash</title>
		<link>http://undefined-type.com/2008/02/guitar-hero-in-flash/</link>
		<comments>http://undefined-type.com/2008/02/guitar-hero-in-flash/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 16:49:10 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[guitar hero]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=88</guid>
		<description><![CDATA[I was writing a new Audio Sync Engine for AS3. The idea is that our Sound Manager is working in Sound Forge, by setting markers he can export an xml file with markers data and positions. I wrote the plug-in in c++ by mashing up some existing plugs.
Then the Flash developers can use the Sync [...]]]></description>
			<content:encoded><![CDATA[<p>I was writing a new Audio Sync Engine for AS3. The idea is that our Sound Manager is working in Sound Forge, by setting markers he can export an xml file with markers data and positions. I wrote the plug-in in c++ by mashing up some existing plugs.</p>
<p>Then the Flash developers can use the Sync Engine to connect markers to changes for example lip sync, character moods and so much more.</p>
<p>When drinking some beer with the colleges we decided to make our own Guitar Hero game.</p>
<p>By connecting the XBOX 360 Guitar Hero control I could with JavaScript find the control, its movement in X,Y (up and sideways). The only thing that I couldn&#8217;t get hold of was the Z (pin to pitch audio).<br />
After getting the JavaScript API to work it is easy to push the data to flash. By ExternalInterface its easier to handle JavaScript handling when not needed to put all handling in root.</p>
<p><a href="http://undefined-type.com/wp-content/uploads/2008/02/hiqhero1.jpg" rel="lightbox[88]"><img class="alignnone size-full wp-image-288" title="hiqhero1" src="http://undefined-type.com/wp-content/uploads/2008/02/hiqhero1.jpg" alt="hiqhero1" width="456" height="763" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/02/guitar-hero-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wii game in Flash</title>
		<link>http://undefined-type.com/2008/02/wii-game-in-flash/</link>
		<comments>http://undefined-type.com/2008/02/wii-game-in-flash/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 16:46:43 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=85</guid>
		<description><![CDATA[My company had a recruitment fair in Finland. So for dragging people to the &#8220;booth&#8221; we created a Flash game for the Wii.
HiQ core business is consulting with advanced developers (flash/flex/c++/java and so on).
We created the game &#8220;Monkey goes to Work&#8221;. A quick game based from the idea &#8220;Wario Ware &#8211; Smooth Moves&#8221;.
By using the [...]]]></description>
			<content:encoded><![CDATA[<p>My company had a recruitment fair in Finland. So for dragging people to the &#8220;booth&#8221; we created a Flash game for the Wii.</p>
<p>HiQ core business is consulting with advanced developers (flash/flex/c++/java and so on).</p>
<p>We created the game &#8220;Monkey goes to Work&#8221;. A quick game based from the idea &#8220;Wario Ware &#8211; Smooth Moves&#8221;.</p>
<p>By using the WiFi-USB adapter on a laptop and a simple web server I could easily use the Wii Opera browser to get access to our own application.<br />
Some problem with the connection because Wii console needs internet connection to be able to find the computer. It works so long you don&#8217;t try to test the connection again, could help to restart the Wii console a couple of times.</p>
<p>Wii Opera supports Flash Player 7. One big problem could we the performance, just having some moving animations and transparency making the application slow.</p>
<p>To control the Flash it&#8217;s possible to use remote 1 as a ordinary mouse. But to really get something out of it I used JavaScript to connect to the browser API, possible to get all 4 remotes.<br />
I extracted control 2 and push changes into flash player. Some things for example that I could control is X,Y,Z (distance), Roll (rotating remote), Connection status.<br />
Couldn&#8217;t get the gyro to work, probably because all the browser movement is based on the IR. So moving remote outside screen will loose updated. But the buttons is going through wiresless.<br />
Possible to get hold of all buttons on the remote and on the nunchuck. But the nunchuck joystick doesn&#8217;t respond.</p>

<a href='http://undefined-type.com/2008/02/wii-game-in-flash/monkey1/' title='monkey1'><img width="150" height="150" src="http://undefined-type.com/wp-content/uploads/2008/02/monkey1-150x150.jpg" class="attachment-thumbnail" alt="" title="monkey1" /></a>
<a href='http://undefined-type.com/2008/02/wii-game-in-flash/monkey2/' title='monkey2'><img width="150" height="150" src="http://undefined-type.com/wp-content/uploads/2008/02/monkey2-150x150.jpg" class="attachment-thumbnail" alt="" title="monkey2" /></a>
<a href='http://undefined-type.com/2008/02/wii-game-in-flash/monkey3/' title='monkey3'><img width="150" height="150" src="http://undefined-type.com/wp-content/uploads/2008/02/monkey3-150x150.jpg" class="attachment-thumbnail" alt="" title="monkey3" /></a>
<a href='http://undefined-type.com/2008/02/wii-game-in-flash/monkey4/' title='monkey4'><img width="150" height="150" src="http://undefined-type.com/wp-content/uploads/2008/02/monkey4-150x150.jpg" class="attachment-thumbnail" alt="" title="monkey4" /></a>

]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/02/wii-game-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Runtime Dynamic fonts Flash CS3</title>
		<link>http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/</link>
		<comments>http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 16:37:13 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[runtime font]]></category>

		<guid isPermaLink="false">http://localhost/undefined_type_/?p=61</guid>
		<description><![CDATA[All the examples showing runtime dynamic fonts for flash cs3 includes that you export swf file with a class that contains embedded font [Embed ??my font??].
This doesn’t really works for me because I need specified characters for a lot of different countrys. Usually when developing a flash application I have to handle between 15-50 countrys.

So [...]]]></description>
			<content:encoded><![CDATA[<p>All the examples showing runtime dynamic fonts for flash cs3 includes that you export swf file with a class that contains embedded font [Embed ??my font??].</p>
<p>This doesn’t really works for me because I need specified characters for a lot of different countrys. Usually when developing a flash application I have to handle between 15-50 countrys.</p>
<p><a href="http://undefined-type.com/wp-content/uploads/2008/01/embed01.jpg" rel="lightbox[61]"><img class="alignnone size-full wp-image-300" title="embed01" src="http://undefined-type.com/wp-content/uploads/2008/01/embed01.jpg" alt="embed01" width="310" height="201" /></a></p>
<p>So I made my own little solution, made one of these for flash 6 for a couple of years ago and the trick still works. It basiclly works by loading shared runtime librarys and then embedded fonts will be shared cross the application when using a lot of swf files.</p>
<p>Making it a static class it’s easy to use.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">CSS.<span style="color: #006600;">loadStyleName</span> = <span style="color: #ff0000;">&quot;default&quot;</span>;CSS.<span style="color: #006600;">loadStylePath</span> = <span style="color: #ff0000;">&quot;css/&quot;</span>;CSS.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>IOErrorEvent.<span style="color: #006600;">IO_ERROR</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onError</span><span style="color: #66cc66;">&#41;</span>;CSS.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onComplete</span><span style="color: #66cc66;">&#41;</span>;CSS.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">this</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>And then to use it on textfields.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">txtField.<span style="color: #006600;">styleSheet</span> = CSS.<span style="color: #006600;">styleSheet</span>;txtField.<span style="color: #0066CC;">embedFonts</span> = <span style="color: #000000; font-weight: bold;">true</span>;txtField.<span style="color: #0066CC;">htmlText</span> = <span style="color: #ff0000;">&quot;&amp;amp;lt;span class='subTest'&amp;amp;gt;Embed Arial&amp;amp;lt;/span&amp;amp;gt;&quot;</span>;txtField.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;">5</span>;
&nbsp;
txtField2.<span style="color: #006600;">styleSheet</span> = CSS.<span style="color: #006600;">styleSheet</span>;txtField2.<span style="color: #0066CC;">embedFonts</span> = <span style="color: #000000; font-weight: bold;">true</span>;txtField2.<span style="color: #0066CC;">htmlText</span> = <span style="color: #ff0000;">&quot;&amp;amp;lt;span class='subTest'&amp;amp;gt;Try embed Arial Black&amp;amp;lt;/span&amp;amp;gt;&quot;</span>;txtField2.<span style="color: #006600;">rotation</span> = -<span style="color: #cc66cc;">5</span>;</pre></div></div>

<p>To make this work.</p>
<p>1.1) Create your shared library file (example: default_lib.fla)</p>
<p>1.2) Create MovieClip on stage and export it for runtime.</p>
<p>1.3) In the MovieClip create a textfield for each font you need, embedd all the characters needed.<br />
<a href="http://undefined-type.com/wp-content/uploads/2008/01/embed02.jpg" rel="lightbox[61]"><img class="alignnone size-medium wp-image-301" title="embed02" src="http://undefined-type.com/wp-content/uploads/2008/01/embed02-300x241.jpg" alt="embed02" width="300" height="241" /></a></p>
<p>2.1) Create your shared library holder file (example: default.fla)</p>
<p>2.2) On the stage add the runtime MovieClip and give it instance name mcFont</p>
<p>3.1) Create your css file (example: default.css)</p>
<p>3.2) Add the styles that your need<br />
<a href="http://undefined-type.com/wp-content/uploads/2008/01/embed03.jpg" rel="lightbox[61]"><img class="alignnone size-full wp-image-302" title="embed03" src="http://undefined-type.com/wp-content/uploads/2008/01/embed03.jpg" alt="embed03" width="292" height="462" /></a></p>
<p>4.1) In the Application file add the following load code (look at example in top)</p>
<p>You can download example files here: <a href="http://undefined-type.com/wp-content/uploads/2008/01/runtimefonts_as3.zip">runtimefonts_as3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2008/01/runtime-dynamic-fonts-flash-cs3/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

