Jump to content
Search Community

removeChild help

retropunk test
Moderator Tag

Recommended Posts

Hey guys, I am stuck on a small bit of code and I'm hoping to get some help.

I am using the Transform Manager to create a Virtual Post card creator.

The problem happens when I try to create a screen shot of the postcard using draw()

I am able to snap the screenshot just fine but I am unable to remove the previous screen shot when a new one is created. Check the link below.

Maybe there is a better way to do it?


1. Add just one image to the stage from the right nav and click NEXT to see the screen shot

2. Then go back and move the image to another spot and click NEXT again

3. You'll see the updated screen shot but you'll also see the previous one. This is where the problem is. I need to remove the previous one.

You'll see how I am trying to use removeChild but maybe I am using it wrong?




var bmd:BitmapData;
bmd = new BitmapData( 800, 600, true, 0xF5780E );
var bitmap:Bitmap = new Bitmap( bmd );
var resetTheScreenShot = false;

function screenGrab():void {

	// this isn't working properly -- need to fix the screen shot grab
	MovieClip(parent).mcSelectFlavor.screengrab.removeChild( bitmap );
resetTheScreenShot = true;
MovieClip(parent).mcSelectFlavor.screengrab.addChild( bitmap );




btw - I realize that this problem has nothing to do with the Transform Manager... :)

Hopefully someone can still point me in the right direction.

Thanks guys

- Patrick

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...