<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.8.5" -->
<rss version="0.92">
<channel>
	<title>Flash gotchas</title>
	<link>http://www.puckish.co.uk/gotchas</link>
	<description>Flash development time-wasters</description>
	<lastBuildDate>Fri, 02 Oct 2009 09:47:22 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>BitmapData draw() doesn&#8217;t work</title>
		<description>I was trying to draw a MovieClip into a BitmapData object and it just wasn't working. I turned on warning messages in FlashTracer and saw that there was a Security Violation. It turns out that a streaming FLV that played at the start of my movie wasn't being removed, and ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=32</link>
			</item>
	<item>
		<title>FLVs don&#8217;t play</title>
		<description>Spent ages trying to attach an FLV to a Video object - it just wouldn't play, or would flicker onto the screen.

Turned out to be exactly the same problem as for sound - if you try and attach an FLV to a Video object, the associated NetStream and NetConnection objects ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=29</link>
			</item>
	<item>
		<title>Warning: Stack overflow</title>
		<description>Spent half a day trying to identify the cause of this, in an AS2 project.

A stupid recursion problem caused by something similar to the following:
function getResult() : Boolean {
trace(getResult():" + getResult());
return value;
}

The Flash player just used to hang on error on problems like this, but now it fails silently (or ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=24</link>
			</item>
	<item>
		<title>Masks</title>
		<description>Sketchy details at present, but having keyframes in a mask layer seem to cause any masked movie clips to re-initialise. Solution at the moment is to move all the keyframes into a single layer movieclip and put that in the mask layer.... </description>
		<link>http://www.puckish.co.uk/gotchas/?p=23</link>
			</item>
	<item>
		<title>Runtime font swapping</title>
		<description>Based on Ivan Dembicki's work at http://www.sharedfonts.com/eng/index.html

For fonts, you need two SWFs
FONTID-lib.swf
- a textfield which embeds all glyphs needed, with bold/italic as necessary, inside a movieclip which is exported for runtime sharing. movieclip has script which registers the textformat of the field with a shared "font manager" object
FONTID.swf
- a practically ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=11</link>
			</item>
	<item>
		<title>Skewed text fields</title>
		<description>A couple of oddities about skewed dynamic text fields in Flash 8- they won't render with the "Anti-alias for readability" option- they don't appear to render if the bold or italic font option is set </description>
		<link>http://www.puckish.co.uk/gotchas/?p=10</link>
			</item>
	<item>
		<title>Math.floor() problem</title>
		<description>Spent ages yesterday struggling with Math.floor() giving me unexpected results - Math.floor(1) was coming at as 0, Math.floor(2) was coming out as 1.The problem arose when testing out a routine for getting the minimum number of coins to make up a value. Numbers that were tracing to the output window ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=9</link>
			</item>
	<item>
		<title>removeMovieClip() not working</title>
		<description>Haven't got a decent workaround for this yet. I'm having problems removing a movieclip and attaching one within a single frame refresh.The old clip is disappearing but the new one isn't being attached. There is still a reference hanging around, and whatever I do to it, it won't disappear. This ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=8</link>
			</item>
	<item>
		<title>The linkage identifier x was already assigned to the symbol x, and cannot be assigned</title>
		<description>Came across this error message last week when compiling in the Flash IDE"The linkage identifier 'BottomRightBetButtonSymbol' was already assigned to the symbol 'BottomRightBetButtonSymbol', and cannot be assigned"You'd think I had more than one item in the library with the same linkage ID, but it was in fact caused by a ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=7</link>
			</item>
	<item>
		<title>MTASC : Fatal error: exception IO.Bits_error</title>
		<description>I got this today when compiling an FLA into which I'd dropped some new assets. After much head scratching, it turns out that the problem was a movieclip which had a filter applied, wrapped in a Button symbol. I got around this by turning the button into a MovieClip symbol ...</description>
		<link>http://www.puckish.co.uk/gotchas/?p=6</link>
			</item>
</channel>
</rss>
