Uncategorized

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 [...]

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 [...]