I had a conversation yesterday with a friend and colleague about how his company should standardise their development environment for all Flashers – be they contract or perm, junior to senior.
Tag Archives: howto
Dependency Injection by Extension pattern
The problem
You need to use some kind of Dependency Injection (DI for short) to provision some System Under Test (SUT for short) in tests you’re writing, but can’t or don’t want to use a DI framework to do so.
Alternative titles for this post include:
- Dependency Injection without a Dependency Injection framework
- Why misusing the default namespace for tests is evil
- Make code more testable without completely messing it up
How to embed an entire asset SWF and get symbols from it
The problem
You want to embed an entire SWF, full of assets, into a class and retrieve individual symbols from it – but you don’t want to have to embed each asset individually.
The solution
SWFAsset – a couple of lines of code and you’re away.
How to correct 3-D projection on stage resize
The problem:
You’re using Flash 10’s native 3-D API and notice the projection goes a little skewiff when resizing the window.
The solution:
You need to reset the stage’s projection centre on stage resize, like so…
var centre:Point = new Point(stage.stageWidth/2, stage.stageHeight/2); root.transform.perspectiveProjection.projectionCenter = centre;
You must be logged in to post a comment.