admin

BitmapData draw() doesn’t work

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 there’s a security feature not [...]

FLVs don’t play

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 will be garbage collected, unless [...]

Warning: Stack overflow

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 with a Stack Overflow warning [...]

Masks

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….

Runtime font swapping

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 empty movie which contains the [...]

Skewed text fields

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

Math.floor() problem

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 as integers were not being [...]

removeMovieClip() not working

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 may be due to the [...]

The linkage identifier x was already assigned to the symbol x, and cannot be assigned

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 MovieClip symbol with said ID [...]

MTASC : Fatal error: exception IO.Bits_error

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 (with _up, _over labels, etc). [...]