Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 417837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:37:10+00:00 2026-05-12T18:37:10+00:00

I have a based image and some sprites on top of the basd image

  • 0

I have a based image and some sprites on top of the basd image movieclip… Some of the sprites can be drawn by the user using graphics api in actionscript 3. I can draw things on the sprites but I can’t create an eraser like brush that can remove part of the unwanted drawings. I try using Alpha but no it doesn’t work

I have googled about it and come up with the solution:

1) Linebitmapstyle… This solution is not the best one coz I my sprites can be moved so if I use linebitmapstyle, it does draw the pixel from the image to the sprite but if the sprite moved the drawn pixel won’t change.

2) Masking may not work for me either….

What is the best way of creating the eraser

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:37:10+00:00Added an answer on May 12, 2026 at 6:37 pm

    You may rather want to use a Bitmap to make such things easier to manipulate (unless you need to do scalable vector graphics of course!). To draw shapes you can still use the graphics API to create the shapes.

    To do so, instantiate a “dummy” sprite (or another IBitmapDrawable implementation) to create the graphics and then “copy” them to the BitmapData the bitmapData.draw() function. This way you can for instance draw with the option BlendMode.ERASE in order remove the pixels of the shape.

    Example (from the top of my mind) :

    // creates a bitmap data canvas
    var bitmapData:BitmapData = new BitmapData(500, 500);
    
    // creates a bitmap display object to contain the BitmapData
    addChild(new Bitmap(bitmapData));
    
    // creates a dummy object to draw and draws a 10px circle 
    var brush:Sprite = new Sprite(); // note this is not even added to the stage
    brush.graphics.beginFill(0xff0000);
    brush.graphics.drawCircle(10, 10, 10); 
    
    // the matrix will be used to position the "brush strokes" on the canvas
    var matrix:Matrix = new Matrix();
    
    // draws a circle in the middle of the canvas
    matrix.translate(250, 250);
    bitmapData.draw(brush, matrix
    
    // translates the position 5 pixels to the right to slightly erase the previously
    // drawn circle creating a half moon            
    matrix.translate(5, 0);
    bitmapData.draw(brush, matrix,null,BlendMode.ERASE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 sprites which when drawn together make up the correct image on
I have a application, which generate image dynamically (based on some data input) on
I have some images that need to change, based not only on hover, but
My site needs to have image based posts, meaning the post is only an
In my application,I have 4 ImageButtons and each ImageButton have different source image based
I have an image slider (CSS based) customised to my specifications (font styles, size
I have Fortran-based 3D column-major order array flattened into linear memory. What formula/algorithm can
All I need to do is download some basic text-based and image files from
I'm trying to build some image algebra code that can work with images (basically
I have a JPanel for which I set some image as the background. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.