I have some external swf's that I am loading in, but when they are loaded in, I can see things that are "off stage" in the loaded swf.
Anyone know of any solutions to this?
Thanks!
Printable View
I have some external swf's that I am loading in, but when they are loaded in, I can see things that are "off stage" in the loaded swf.
Anyone know of any solutions to this?
Thanks!
Get rid of the items off stage, or set them to invisible. Or use a setMask filter.
I can't really set them to invisible because they are used in the movies. They are brought in at some point.
Okay, can't you just set them to visible when they come in?
Not really, because the way they are set up. I just need to figure out a way to either not show what is offstage in the loaded swfs, or a way to mask them out.
By the way I don't think setmask is still used in as3. I gave it a try, but didn't seem to work.
My mistake, it's mask, not setmask. Anyway, here's a code snippet from the help file. Try it and see if it helps.
import flash.display.Shape;
// Draw a square and add it to the display list.
var square:Shape = new Shape();
square.graphics.lineStyle(1, 0x000000);
square.graphics.beginFill(0xff0000);
square.graphics.drawRect(0, 0, 100, 100);
square.graphics.endFill();
this.addChild(square);
// Draw a circle and add it to the display list.
var circle:Sprite = new Sprite();
circle.graphics.lineStyle(1, 0x000000);
circle.graphics.beginFill(0x0000ff);
circle.graphics.drawCircle(25, 25, 25);
circle.graphics.endFill();
this.addChild(circle);
function maskSquare(event:MouseEvent):void
{
square.mask = circle;
circle.removeEventListener(MouseEvent.CLICK, maskSquare);
}
circle.addEventListener(MouseEvent.CLICK, maskSquare);
Hmm doesn't seem to work with externally loaded swfs.
hmm...How are you loading the swfs? Could you try loading them at a different level, say you load it then you say something like:
stage.addChild(swf1);
stage.swapChildren(swf1,cover1);
Where as your cover is a concealer?
Why don't you just try putting a rectangle that covers basically everything, from top to bottom and left to right, zoomed out all the way, of course, and cut a hole out for the stage?