Created virtual camera for use in some scenes. The issue is that when it is used on scenes that are not in 640x360 (hth2B default) subsequent calls of the _root.filename result in an offset of the _root stage. I messed around with some settings but I can't get anything to work. Here's what I did.
create a symbol with a rectangular bitmap, align to stage, set resolution to default.
insert action to frame 1 as follows:
import flash.geom.Matrix;
import flash.geom.Transform;
import flash.geom.ColorTransform;
var cameraTrans:Transform = new Transform(this);
var stageTrans:Transform = new Transform(this._parent);
var w:Number = Stage.width;
var h:Number = Stage.height;
this._visible = false;
this.onEnterFrame = function () {
this._parent.filters = this.filters;
stageTrans.colorTransform = cameraTrans.colorTransform;
var stageMatrix:Matrix = cameraTrans.matrix;
stageMatrix.invert();
stageMatrix.translate(w*.5, h*.5);
stageTrans.matrix = stageMatrix;
};
In most scenes when you move the symbol, it acts like a camera without lag that can be animated and have effects applied to it. I used the method on the cindy scene. It doesnt work on some scenes without breaking when loading another swf. That's my confusion