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

  • Home
  • SEARCH
  • 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 6724593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:42:29+00:00 2026-05-26T09:42:29+00:00

I would like to know why does AS3 colorTransform only transforms the border of

  • 0

I would like to know why does AS3 colorTransform only transforms the border of a shape?

Similar question is posted however I do not think that such a massive workaround needs to be done in order to do so.

I have something like:

var sh:Shape = new Shape();
sh.graphics.lineStyle(4, 0x000000);
sh.graphics.beginFill(0xFFFF00);
sh.graphics.drawRect(0, 0, 200, 200);
sh.graphics.endFill();
addChild(sh);

Ye I know we can use with(sh.graphics) do here, however if I make a color transform like:

sh.transform.colorTransform = new ColorTransform(1, 1, 1, 1, red_offset, green_ofs, b_off, 0);

Only the border of a shape is transformed.
I’ve tried to redraw on everyframe the object with different fill but it’s an overkill in performance, about 10 3d planes were performance killers.

I can only think of that because beginFill() does not use a pen set by lineStyle() and that may be causing the problem, however I would really like to know the problem as I need my uber-super-semi3d-spinner to spin while changing colors and not his borders! 🙂

Thanks in advance!

  • 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-26T09:42:30+00:00Added an answer on May 26, 2026 at 9:42 am

    I don’t know why ColorTransform affects only line color (seems just design decision), but ColorMatrixFilter will transform entire shape (tested). Don’t be afraid of it – it’s quite simple. First four columns of matrix are multipliers (1.0 is 100%) and fifth column is added to result.

            var sht:Shape = new Shape();
            sht.graphics.lineStyle(4, 0x7F7FFF);
            sht.graphics.beginFill(0xFFFFFF);
            sht.graphics.drawRect(0, 0, 200, 200);
            sht.graphics.endFill();
            sht.x = 300;
            sht.y = 100;
            sht.filters = [ new ColorMatrixFilter(
                [   0.5, 0.0, 0.0, 0.0, 0.0,
                    0.0, 1.0, 0.0, 0.0, 0.0,
                    0.0, 0.0, 0.7, 0.0, 0.0,
                    0.0, 0.0, 0.0, 1.0, 0.0
                ])];
            addChild(sht);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know how much time (in percent) does JavaScript development takes
I would like to know how Gmail (or anyone else) does comet on Opera.
Does anyone here use Spec# regularly? I would like to know if it is
Does anyone know of a good alternative to cron? I would like something that
Does anyone know of an equivalent to FxCop/StyleCop for Delphi? I would really like
Would like to know what does Drupal 7 and Acquia have in common? I
I would like to know what does .do webpages stand for ( as .php
I would like to know does Android caches an application preference? I have an
I would like to know how does autocompleteextender retrieve data using webservice. Does it
i would like to know where does eclipse save entered args?(in which file?) because

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.