<?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"
	>

<channel>
	<title>FLASHCROBAT</title>
	<atom:link href="http://flashcrobat.noesi.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://flashcrobat.noesi.co.uk</link>
	<description>Actionscript code dump</description>
	<pubDate>Wed, 09 Jul 2008 15:52:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>flash full browser with swfObject 2</title>
		<link>http://flashcrobat.noesi.co.uk/as3-code-dump/flash-full-browser-with-swfobject-2/</link>
		<comments>http://flashcrobat.noesi.co.uk/as3-code-dump/flash-full-browser-with-swfobject-2/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 15:41:30 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AS3]]></category>

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

		<category><![CDATA[full browser]]></category>

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

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/?p=29</guid>
		<description><![CDATA[Having had difficulties to find a rather complete description on this very common subject, I thought I might as well compile a selection of techniques necessary to accomplish this.
first, let's go through the requirements within the HTML page and the swfObject javascript, which comes into the head of the HTML page embedding the swf:
PLAIN TEXT
HTML:




&#60;script [...]]]></description>
			<content:encoded><![CDATA[<p>Having had difficulties to find a rather complete description on this very common subject, I thought I might as well compile a selection of techniques necessary to accomplish this.</p>
<p>first, let's go through the requirements within the HTML page and the swfObject javascript, which comes into the head of the HTML page embedding the swf:</p>
<div class="igBar"><span id="lhtml-3"><a href="#" onclick="javascript:showPlainTxt('html-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-3">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/javascript"</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"js/swfobject.js"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/javascript"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; //vars and parameters for embedded swf</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; var flashvars = { };</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; var params = { menu: &quot;false&quot;, allowScriptAccess:&quot;sameDomain&quot;, allowfullscreen :&quot;true&quot;};</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; var attributes = { id: &quot;main&quot;, name: &quot;main&quot; };</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; swfobject.embedSWF(&quot;flash/main.swf&quot;, &quot;mainFlash&quot;, &quot;100%&quot;, &quot;100%&quot;, &quot;9.0.0&quot;,&quot;expressInstall.swf&quot;, flashvars, params, attributes);&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">&lt;style</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/css"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; html, body, #mainFlash{ height:100%; width:100%;}</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; body { margin:0; padding:0; overflow:hidden; background-color:#A31724; text-align:center; }</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">--&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>	</p>
<ol>
Set both the width and height of your SWF to 100% in your SWFObject definition.</ol>
<ol>
Include CSS to get rid of any default margins/padding and set the height of the html element, the body element and the entire chain of block level HTML elements that your SWF will be nested in to 100%, because Firefox (or: any Gecko based browser) in standards compliant mode (or: using a valid DOCTYPE) interprets percentages in a very strict way (to be precise: the percentage of the height of its parent container, which has to be set explicitly)</ol>
<p>Now go to your flash movie, and manage the scaling and alignment of your SWF and the positioning of your SWF's elements, within your ActionScript code, e.g.:</p>
<div class="igBar"><span id="lactionscript-4"><a href="#" onclick="javascript:showPlainTxt('actionscript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-4">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP_LEFT</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">RESIZE</span>, resizeHandler<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> resizeHandler<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></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span> + <span style="color: #ff0000;">" x "</span> + <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">// center stuff</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/as3-code-dump/flash-full-browser-with-swfobject-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>looping video in AS3</title>
		<link>http://flashcrobat.noesi.co.uk/as3-code-dump/looping-video-in-as3/</link>
		<comments>http://flashcrobat.noesi.co.uk/as3-code-dump/looping-video-in-as3/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 18:41:51 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[looping video]]></category>

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/?p=24</guid>
		<description><![CDATA[PLAIN TEXT
Actionscript:




&#60;pre&#62;


package &#123; 


&#160;


&#160; &#160; import com.onebyonedesign.extras.VideoLoop;


&#160; &#160; import flash.display.Sprite;


&#160; &#160; import flash.events.AsyncErrorEvent;


&#160; &#160; import flash.events.Event;


&#160; &#160; import flash.events.MouseEvent;


&#160; &#160; import flash.text.AntiAliasType;


&#160; &#160; import flash.text.TextField;


&#160; &#160; import flash.text.TextFieldAutoSize;


&#160; &#160; import flash.text.TextFormat;


&#160; &#160; import flash.text.TextFormatAlign; 


&#160;


&#160; &#160; public class Main extends Sprite &#123; 


&#160;


&#160; &#160; &#160; &#160; private var isPlaying:Boolean = true;


&#160; &#160; &#160; &#160; private [...]]]></description>
			<content:encoded><![CDATA[<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showPlainTxt('actionscript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-6">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;pre&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">onebyonedesign</span>.<span style="color: #006600;">extras</span>.<span style="color: #006600;">VideoLoop</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">AsyncErrorEvent</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">AntiAliasType</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">TextFieldAutoSize</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">TextFormatAlign</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> isPlaying:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> videoLoop:VideoLoop; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; videoLoop = <span style="color: #000000; font-weight: bold;">new</span> VideoLoop<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"water.flv"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; videoLoop.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>AsyncErrorEvent.<span style="color: #006600;">ASYNC_ERROR</span>, onAsyncError<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>videoLoop<span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, adjustVideo<span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> info:<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>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #0066CC;">selectable</span> = <span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #0066CC;">autoSize</span> = TextFieldAutoSize.<span style="color: #0066CC;">LEFT</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006600;">antiAliasType</span> = AntiAliasType.<span style="color: #006600;">ADVANCED</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> fmt:<span style="color: #0066CC;">TextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"_sans"</span>, <span style="color: #cc66cc;color:#800000;">12</span>, 0x939393<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fmt.<span style="color: #0066CC;">align</span> = TextFormatAlign.<span style="color: #006600;">CENTER</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006600;">defaultTextFormat</span> = fmt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"Two second video looped.<span style="color: #000099; font-weight: bold;">\n</span>Click to pause/resume."</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;color:#800000;">95</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;color:#800000;">190</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>info<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onAsyncError<span style="color: #66cc66;">&#40;</span>aee:AsyncErrorEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//&nbsp; handle annoying async errors (such as the missing metadata property) here.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> adjustVideo<span style="color: #66cc66;">&#40;</span>me:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>isPlaying<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; videoLoop.<span style="color: #0066CC;">pause</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; videoLoop.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isPlaying = !isPlaying;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>&lt;/pre&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/as3-code-dump/looping-video-in-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>capture Jpeg live from webcam</title>
		<link>http://flashcrobat.noesi.co.uk/as3-code-dump/capture-jpeg-live-from-webcam/</link>
		<comments>http://flashcrobat.noesi.co.uk/as3-code-dump/capture-jpeg-live-from-webcam/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 18:43:20 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[jpeg encoding]]></category>

		<category><![CDATA[webcam image capture]]></category>

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/?p=23</guid>
		<description><![CDATA[For one of my projects that let's the user record a profile video through his webcam, I need to publish a JPEG from the recorded video to later display in an html video list.
After turning the web upside down, I found that byteArrays blog's approach seemed the most suitable one. But he works with AMFPHP, [...]]]></description>
			<content:encoded><![CDATA[<p>For one of my projects that let's the user record a profile video through his webcam, I need to publish a JPEG from the recorded video to later display in an html video list.<br />
After turning the web upside down, I found that <a href="http://www.bytearray.org/?p=90">byteArrays blog's</a> approach seemed the most suitable one. But he works with AMFPHP, which I did not want to add to the other frameworks already involved with this project, and therefor reconstructed it using a simple PHP solution.<br />
I will continue posting my progress here, and offer src files ASAP.</p>
<p>Another <a href="http://www.flash-db.com/Tutorials/snapshot/snapshot.php?page=1">source I found</a>, but haven't evaluated yet, because it is built in AS2, works with PHP's GD image library.</p>
<p>For more information on AMFPHP (aka flash remoting for PHP), which is a remoting service for flash applications, that basically allows flash movies to call remote server side applications.  <a href="http://www.flash-db.com/Tutorials/hello/flashamfphp.php">Here is an introduction,</a> but I think that it deserves it's own topic in flashcrobat. I hopefully will soon have time to look deeper into it.</p>
<p>&lt;update &gt;</p>
<p>Ok I have come closer :</p>
<p><a href="http://labs.findsubstance.com/2008/04/03/as3-upload-encode-images/">http://labs.findsubstance.com/2008/04/03/as3-upload-encode-images/</a></p>
<p>and :</p>
<p><a href="http://www.hackszine.com/blog/archive/2008/04/encoding_jpegs_clientside_in_a.html">http://www.hackszine.com/blog/archive/2008/04/encoding_jpegs_clientside_in_a.html</a></p>
<p><a href="http://henryjones.us/articles/using-the-as3-jpeg-encoder">http://henryjones.us/articles/using-the-as3-jpeg-encoder</a></p>
<p>I am going to try to combine the infos found on several resources, and hope that as an outcome we will have a nice reusable application with which you can make a thumbnail of a clip recorded through your webcam. So let's spit in our hands:</p>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/as3-code-dump/capture-jpeg-live-from-webcam/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AS3 clipboard functionality</title>
		<link>http://flashcrobat.noesi.co.uk/as3-code-dump/as3-clipboard-functionality/</link>
		<comments>http://flashcrobat.noesi.co.uk/as3-code-dump/as3-clipboard-functionality/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 11:36:14 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AS3]]></category>

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

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/?p=22</guid>
		<description><![CDATA[The System.setClipboard() method allows a SWF file to replace the contents of the clipboard with a plain-text string of characters. This poses no security risk. To protect against the risk posed by passwords and other sensitive data being cut or copied to clipboards, there is no corresponding "getClipboard" (read) method.
]]></description>
			<content:encoded><![CDATA[<p>The <code>System.setClipboard()</code> method allows a SWF file to replace the contents of the clipboard with a plain-text string of characters. This poses no security risk. To protect against the risk posed by passwords and other sensitive data being cut or copied to clipboards, there is no corresponding "getClipboard" (read) method.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/as3-code-dump/as3-clipboard-functionality/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash and JavaScript</title>
		<link>http://flashcrobat.noesi.co.uk/as3-code-dump/flash-and-javascript/</link>
		<comments>http://flashcrobat.noesi.co.uk/as3-code-dump/flash-and-javascript/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 16:26:53 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Add new tag]]></category>

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

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

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

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

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/?p=21</guid>
		<description><![CDATA[I will here collect a series of links of useful information on the interaction between flash and JavaScript, Until I have evaluated all relevant infos, to write a good summary on common practices.

SWFObject has grown up! version 2.0

static
dynamic


The famous SWFObject to easily embed flash content in html, that was previously hosted on deconcept.com has now [...]]]></description>
			<content:encoded><![CDATA[<p>I will here collect a series of links of useful information on the interaction between flash and JavaScript, Until I have evaluated all relevant infos, to write a good summary on common practices.</p>
<ol>
<li><strong>SWFObject has grown up! version 2.0</strong>
<ul>
<li>static</li>
<li>dynamic</li>
</ul>
</li>
<p>The famous SWFObject to easily embed flash content in html, that was previously hosted on <a href="http://blog.deconcept.com/swfobject/" target="_blank">deconcept.com</a> has now moved to <a title="code.google.com/swfobject" href="http://code.google.com/p/swfobject/" target="_blank">google.code</a> basically there are 2 ways to embed your swf into your HTML site:</p>
<p>more to come...<br />
her a basic code sample for the integration using swf object, including parameters, flashvars and attributes. (for many external interface interactions, you will need to give your swf an ID and a name)<br />
here the javascipt to embed:</p>
<pre>
<div class="igBar"><span id="ljavascript-8"><a href="#" onclick="javascript:showPlainTxt('javascript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script src=<span style="color: #3366CC;">"http://flashcrobat.noesi.co.uk/js/swfobject.js"</span> type=<span style="color: #3366CC;">"text/javascript"</span>&gt;&lt;!--mce:<span style="color: #CC0000;color:#800000;">0</span>--&gt;&lt;/script&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #3366CC;">"text/javascript"</span>&gt;&lt;!--mce:<span style="color: #CC0000;color:#800000;">1</span>--&gt;&lt;/script&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!-- later <span style="color: #000066; font-weight: bold;">in</span> the html page comes the div tag where you want your swf to be embedded where you can put <span style="color: #000066; font-weight: bold;">in</span> your alternative text, <span style="color: #000066; font-weight: bold;">in</span> <span style="color: #000066; font-weight: bold;">case</span> someone has javascript disabled, or no flash plugin installed.--&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div id=<span style="color: #3366CC;">"swf-div"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; You need Javascript activated and the flash player plugin installed to be able to view <span style="color: #000066; font-weight: bold;">this</span> content.</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #006600;">The</span> newest Flash Player can be downloaded here:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;a href=<span style="color: #3366CC;">"http://www.adobe.com/go/getflashplayer"</span>&gt;&lt;img src=<span style="color: #3366CC;">"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"</span> alt=<span style="color: #3366CC;">"Get Adobe Flash player"</span> <span style="color: #0066FF;">/&gt;&lt;/a&gt;&lt;/</span>div&gt; </div>
</li>
</ol>
</div>
</div>
</div>

</pre>
<p>Attention!!:<br />
giving the id or the name identical name to the swf file causes javascript errors on IE!! took me ages to find the reason for these. So just call your id and name differently than your swf is called.</p>
<li><strong>external interface approach</strong></li>
<p>this seems to be till now the best and easiest reference I found on smooth communicatin between Javascript and the swf in both directions. unfortunatley this only seems to work in AS2. The old fscommand now has been replaced with the externalInterface class. more to read in the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/" target="_blank">Adobe.liveDocs</a>. found on: <a href="http://flexion.wordpress.com/" target="_blank">http://flexion.wordpress.com/</a> source files: <a href="http://www.box.net/shared/ocq972d435">onBoxNet</a></p>
<li><strong>AS3 Script Injection</strong></li>
<p>Complete and unmodified JavaScript and/or VBScript functions, class objects and applications are stored inside AS3 files using XML, and are then parsed, sent to the browser, and executed. This is an ideal solution for Flash/Flex developers who need JavaScript to interact with the user's browser, but might not have full access to the webpage or server that their SWF application is actually hosted on. Flash Ads, YouTube-style video players, and games that may be hosted across multiple (and possibly unforeseen) webpages are the first things that come to mind. on: <a title="flash javascript tutorial" href="http://www.actionscript.org/resources/articles/745/1/JavaScript-and-VBScript-Injection-in-ActionScript-3/Page1.html" target="_blank">actionscript.org</a></p>
<li><strong>Passing variable from JavaScript To AS3</strong></li>
<p>A brief and basic recollection about passing vars from JS to AS3. found on: <a href="http://www.metah.ch/blog/2007/07/passing-variable-from-javascript-to-as3-flash-cs3/" target="_blank">metah.ch</a></p>
<li><strong>Local Connection Actionscript - Communicate between seperate Flash files</strong></li>
<p>Communication between two seperate flash files placed on the same page (or even running simultaneously on one machine) is a nice way to spread a project out. You can send variable, call functions, pretty much do anything in one swf from another. found on: <a href="http://blog.circlecube.com/2008/03/12/local-connection-actionscript-communicate-between-seperate-flash-files-tutorial/" target="_blank">blog.circlecube.com</a></p>
<li><strong>Flash and Google analytics</strong></li>
<p>This also fits in this cathegory, as most functionalities are handled by Javascript. I will update this entry after have=ing implemented the code on my current Project. found on: <a title="flash and googleAnalytics" href="http://flashenabledblog.com/2008/04/09/flash-cs3-tutorial-google-analytics-flash-content/" target="_blank">flashenabledblog.com</a></ol>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/as3-code-dump/flash-and-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Instance Class or Superclass name: getQualifiedClassName()</title>
		<link>http://flashcrobat.noesi.co.uk/as3-code-dump/determine-instance-class-or-superclass/</link>
		<comments>http://flashcrobat.noesi.co.uk/as3-code-dump/determine-instance-class-or-superclass/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 16:41:27 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[instance class name retrival]]></category>

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/as3-code-dump/determine-instance-class-or-superclass/</guid>
		<description><![CDATA[sometimes, you want to know the instances class name or the superclass's name. AS3 offers a new function called getQualifiedClassName (flash.utils.getQualifiedClassName) to do just that:
PLAIN TEXT
Actionscript:




var sprite:Sprite = new Sprite&#40;&#41;;


trace&#40;getQualifiedClassName&#40;sprite&#41;&#41;; // &#34;flash.display::Sprite&#34;


&#160;


//or to retrieve the name of the super class, use:


trace&#40;getQualifiedSuperclassName&#40;sprite&#41;&#41;; // &#34;flash.display::DisplayObjectContainer&#34; 






If you actually want to sieve through plenty of info about your [...]]]></description>
			<content:encoded><![CDATA[<p>sometimes, you want to know the instances class name or the superclass's name. AS3 offers a new function called getQualifiedClassName (<a href="http://livedocs.macromedia.com/flex/2/langref/flash/utils/package.html#getQualifiedClassName%28%29" target="_blank">flash.utils.getQualifiedClassName</a>) to do just that:</p>
<div class="igBar"><span id="lactionscript-11"><a href="#" onclick="javascript:showPlainTxt('actionscript-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-11">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> sprite:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>getQualifiedClassName<span style="color: #66cc66;">&#40;</span>sprite<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// &quot;flash.display::Sprite&quot;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//or to retrieve the name of the super class, use:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>getQualifiedSuperclassName<span style="color: #66cc66;">&#40;</span>sprite<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// &quot;flash.display::DisplayObjectContainer&quot; </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you actually want to sieve through plenty of info about your instance, try describeType() (flash.utils.describeType).</p>
<div class="igBar"><span id="lactionscript-12"><a href="#" onclick="javascript:showPlainTxt('actionscript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-12">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> sprite:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> spriteDescription:<span style="color: #0066CC;">XML</span> = describeType<span style="color: #66cc66;">&#40;</span>sprite<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span>spriteDescription<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
try to see....(loads of data coming out here...)</p>
<p>what also fits in here is the use of<code>getDefinitionByName()</code>(flash.utils.getDefinitionByName).</p>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/as3-code-dump/determine-instance-class-or-superclass/feed/</wfw:commentRss>
		</item>
		<item>
		<title>collection of AIR resources</title>
		<link>http://flashcrobat.noesi.co.uk/air/collection-of-air-resources/</link>
		<comments>http://flashcrobat.noesi.co.uk/air/collection-of-air-resources/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 01:31:20 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AIR]]></category>

		<category><![CDATA[link collection]]></category>

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/air/collection-of-air-resources/</guid>
		<description><![CDATA[An attempt to gather all the information I tumble accross while researching for other things, that I will most probably need the next day or so and never find again, is to collect them herein this Post:

AIRconditioning, a brilliant pdf summarising many of the most usefull and needed features of AIR.
Encrypted Local Data. by Kevin [...]]]></description>
			<content:encoded><![CDATA[<p>An attempt to gather all the information I tumble accross while researching for other things, that I will most probably need the next day or so and never find again, is to collect them herein this Post:</p>
<ol>
<li><a href="http://theflashblog.com/files/AIRConditioning.pdf">AIRconditioning</a>, a brilliant pdf summarising many of the most usefull and needed features of AIR.</li>
<li><a href="http://blog.kevinhoyt.org/2007/10/23/encrypted-local-store-in-air/" target="_blank">Encrypted Local Data</a>. by Kevin Hoyt</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/air/collection-of-air-resources/feed/</wfw:commentRss>
		</item>
		<item>
		<title>encrypted Local Data - local login</title>
		<link>http://flashcrobat.noesi.co.uk/air/encrypted-local-data-local-login/</link>
		<comments>http://flashcrobat.noesi.co.uk/air/encrypted-local-data-local-login/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 01:06:45 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AIR]]></category>

		<category><![CDATA[encrypted local store]]></category>

		<category><![CDATA[local login]]></category>

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/air/encrypted-local-data-local-login/</guid>
		<description><![CDATA[One of the first big challenges in building an Air application, that is supposed to be functional on and off line, is the entry point into the application, the login. In this Post, I will explain how I built the Login for an application, including use of shared local objects, that logs the user also [...]]]></description>
			<content:encoded><![CDATA[<p>One of the first big challenges in building an Air application, that is supposed to be functional on and off line, is the entry point into the application, the login. In this Post, I will explain how I built the Login for an application, including use of shared local objects, that logs the user also in, when he is offline. To give the user the minimum security, I will use for the  Login the<em><em> </em>encrypted local store</em> feature in Adobe AIR</p>
<div style="fontsize:9px;">derived from the article on <a href="http://www.adobe.com/devnet/air/ajax/articles/encrypted_local_store.html">Adobe.com from Kevin Hoyt</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/air/encrypted-local-data-local-login/feed/</wfw:commentRss>
		</item>
		<item>
		<title>avoid new window blocked by Firefox/IE</title>
		<link>http://flashcrobat.noesi.co.uk/as3-code-dump/avoid-new-window-blocked-by-firefoxie/</link>
		<comments>http://flashcrobat.noesi.co.uk/as3-code-dump/avoid-new-window-blocked-by-firefoxie/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 17:03:31 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[flash external link]]></category>

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

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/as3-code-dump/avoid-new-window-blocked-by-firefoxie/</guid>
		<description><![CDATA[How annoying! You have your flash application, make a normal external link (a good old www basic), and then the browsers block your external link!, well there seems to be a work around:
PLAIN TEXT
Actionscript:




function getURL&#40;url:String,window:String="_blank"&#41;:void&#123;


&#160; &#160; var broswer:String=ExternalInterface.call&#40;"function getBrowser(){return navigator.userAgent}"&#41; as String;


&#160; &#160; if&#40;broswer.indexOf&#40;"Firefox"&#41;!=-1 &#124;&#124; broswer.indexOf&#40;"MSIE 7.0"&#41;!=-1&#41;&#123;


&#160; &#160; &#160; &#160; ExternalInterface.call&#40;'window.open(&#34;'+url+'&#34;,&#34;'+window+'&#34;)'&#41;;


&#160; &#160; &#125;else&#123;


&#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>How annoying! You have your flash application, make a normal external link (a good old www basic), and then the browsers block your external link!, well there seems to be a work around:</p>
<div class="igBar"><span id="lactionscript-14"><a href="#" onclick="javascript:showPlainTxt('actionscript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-14">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span>,window:<span style="color: #0066CC;">String</span>=<span style="color: #ff0000;">"_blank"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> broswer:<span style="color: #0066CC;">String</span>=ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"function getBrowser(){return navigator.userAgent}"</span><span style="color: #66cc66;">&#41;</span> as <span style="color: #0066CC;">String</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>broswer.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Firefox"</span><span style="color: #66cc66;">&#41;</span>!=-<span style="color: #cc66cc;color:#800000;">1</span> || broswer.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"MSIE 7.0"</span><span style="color: #66cc66;">&#41;</span>!=-<span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'window.open(&quot;'</span>+<span style="color: #0066CC;">url</span>+<span style="color: #ff0000;">'&quot;,&quot;'</span>+window+<span style="color: #ff0000;">'&quot;)'</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; navigateToURL<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>,window<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and the most important is set the wmode property is opaque or transparent.</p>
<p>courtesy of:<br />
<a href="http://www.riaidea.com/article.asp?id=27" rel="nofollow">http://www.riaidea.com/article.asp?id=27</a>(chinese Blog)</p>
<p>Somehow getURL() survived the AS3 code cull, an interesting approach to make it reusable can be found here on <a href="http://www.stevensacks.net/2008/02/06/as3-geturl-solved/">Steven Sacks</a> blog. cheers for that one. Would be interesting to combine them to one. TODO:)</p>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/as3-code-dump/avoid-new-window-blocked-by-firefoxie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>issues when installing the AIR 1  plugin for Flash CS3</title>
		<link>http://flashcrobat.noesi.co.uk/air/issues-when-installing-the-air-1-plugin-for-flash-cs3/</link>
		<comments>http://flashcrobat.noesi.co.uk/air/issues-when-installing-the-air-1-plugin-for-flash-cs3/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 18:11:29 +0000</pubDate>
		<dc:creator>sortofme</dc:creator>
		
		<category><![CDATA[AIR]]></category>

		<category><![CDATA[AIR flash plugin]]></category>

		<guid isPermaLink="false">http://flashcrobat.noesi.co.uk/air/issues-when-installing-the-air-1-plugin-for-flash-cs3/</guid>
		<description><![CDATA[If Beta 1 is installed, there are some orphan files that needed to be removed.
(Windows) HD:\Program Files\Adobe\Adobe Flash CS3\&#60;lang&#62;\First Run\Commands\
(Mac) HD:/Applications/Adobe Flash CS3/First Run/Commands
AIR - Application and Package Settings.jsfl
AIR - Package AIR File.jsfl
(Windows) HD:\Document and Settings\&#60;username&#62;\Local Settings\Application Data\Adobe\Flash CS3\&#60;lang&#62;\Configuration\Commands\ or
(Mac) HD:/Users/&#60;username&#62;/Library/Application Support/Adobe/Flash CS3/&#60;lang&#62;/Configuration/Commands/
AIR - Application and Package Settings.jsfl
AIR - Package AIR File.jsfl
Further, according to the [...]]]></description>
			<content:encoded><![CDATA[<p>If Beta 1 is installed, there are some orphan files that needed to be removed.</p>
<p>(Windows) HD:\Program Files\Adobe\Adobe Flash CS3\&lt;lang&gt;\First Run\Commands\<br />
(Mac) HD:/Applications/Adobe Flash CS3/First Run/Commands<br />
AIR - Application and Package Settings.jsfl<br />
AIR - Package AIR File.jsfl</p>
<p>(Windows) HD:\Document and Settings\&lt;username&gt;\Local Settings\Application Data\Adobe\Flash CS3\&lt;lang&gt;\Configuration\Commands\ or<br />
(Mac) HD:/Users/&lt;username&gt;/Library/Application Support/Adobe/Flash CS3/&lt;lang&gt;/Configuration/Commands/<br />
AIR - Application and Package Settings.jsfl<br />
AIR - Package AIR File.jsfl</p>
<p>Further, according to the <a href="http://www.adobe.com/support/flash/downloads.html#902" target="_blank">Adobe website</a>,  you first have to install <a href="http://www.adobe.com/support/flash/downloads.html#902" target="_blank">plugin 9.0.2</a>, then the <a href="http://get.adobe.com/air/" target="_blank">AIR runtime</a>, and at last plugin 9.0.3.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashcrobat.noesi.co.uk/air/issues-when-installing-the-air-1-plugin-for-flash-cs3/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
