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 8173655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:14:29+00:00 2026-06-06T22:14:29+00:00

i have drawed some figure(circle, rectangle or just a line) and after that i

  • 0

i have drawed some figure(circle, rectangle or just a line) and after that i want to change they color without drawing another figure overlaying those, is that possible?

graphics.beginFill(0x000000, 1);
graphics.drawCircle(70, 67, 2);
graphics.drawCircle(90, 67, 2);
graphics.endFill();

after this code is possible to change the color of those circles? lets say some time later…

  • 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-06-06T22:14:31+00:00Added an answer on June 6, 2026 at 10:14 pm

    It is and it isn’t. Once you draw that shape it becomes baked into the draw buffer for that frame. If you’ve drawn it to the main frame-buffer, that’s it, no changies. What you CAN do is draw it to a separate instance of a Sprite or MovieClip and use ColorTransform.

    var mc:MovieClip=new MovieClip();
    
    mc.graphics.beginFill(0x000000, 1);
    mc.graphics.drawCircle(70, 67, 2);
    mc.graphics.drawCircle(90, 67, 2);
    mc.graphics.endFill();
    

    and later:

    var c:ColorTransform = new ColorTransform();
    c.color = (Math.random() * 0xFFFFFF);
    mc.transform.colorTransform = c;
    

    Putting your shape in a MovieClip also has the advantage of not having to redraw it on every frame manually (clearing the normal frame-buffer won’t clear the MovieClip‘s) and also means you can move it around easily with mc.x and mc.y.

    Just out of curiosity, why can’t you set the color when it’s drawn?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to render a colored cube after rendering other cubes that have textures.
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
Have a matrix report now that has Position, Hours and Wages for a location
I know there are already some questions about this, but not that specific. I
Normally an applet will call different methods that will have a Graphics2D-object that ends
I have the datalist = 62, 76, 80, 72, 71, 75, 77 that i
I have a big UIimage (2000x2000). Image drawed every time on app start, and
I have some problems using wamp, when i edit (in an external program) an
I have an activity that consists of textviews. I have made the activity compatible
That is what I suppose to have. UIViewController with a dynamic number of draggable

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.