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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:39:09+00:00 2026-05-25T09:39:09+00:00

I would like to fade in and out and object with the colorTransform-method. When

  • 0

I would like to fade in and out and object with the colorTransform-method.

When I apply the colorTransform to my object it does fade out the thing but not fade in.
At first I set the alpha of the bitmapData to 0 (for the fade in-effect). After applying the colorTransform it does nothing. No fade in.
Otherwise when I set the alpha of the bitmapData to 100 and let it fade out it works.

I don’t know where the error might be so is there anyone who might help me with this problem? Or do you know another method for achieving the same goal? Thank you very much for your help.

BTW: My object (tempScore) is no display object. It is blitted onto a canvas.

This is the function that shall colorTransform my object:

private function setAlpha(setMode:int, bmd:BitmapData):BitmapData
{
var rec:Rectangle = new Rectangle(0, 0, bmd.width, bmd.height);
var ct:ColorTransform = new ColorTransform();

if (setMode == 1) {
    ct.alphaMultiplier = .95;
} else if (setMode == 2) {
    ct.alphaMultiplier = 1.05;
} else if (setMode == 3) {
    ct.alphaMultiplier = 0;
} else if (setMode == 4) {
    ct.alphaMultiplier = .5;
} else if (setMode == 5) {
    ct.alphaMultiplier = 1;
}

bmd.colorTransform(rec, ct);
return bmd;
}

This is the code where I’d like to change the alpha but the fade in doesn’t work:

setAlpha(2, tempScore.bitmapData);

This is the code where I set the alpha of the bitmapData to 0:

rec = new Rectangle(0, 0, $textWidth, $textHeight);
ct = new ColorTransform();
ct.alphaMultiplier = 0;

tempScore.bitmapData.colorTransform(rec, ct);
  • 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-25T09:39:09+00:00Added an answer on May 25, 2026 at 9:39 am

    Filters applied to a BitmapData are “destructive”, if you let its alpha go down to zero you will loose all image information along with it, so there’s nothing to fade back in.

    Apply a filter to the Bitmap container displaying the BitmapData instead.

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

Sidebar

Related Questions

I have a fixed-position image that I would like to fade out when scrolling
I have an object animating, which I would like to start fading out, after
I have one image button and I would like to fade out one image
I have a div called #top. I would like it to fade out when
If an item is being deleted then I would like to fade it out
I have a splash screen that I would like to fade in, while my
I would like the top_content function to cross fade with #test and #test1. Right
I would like to implement something similar to 37Signals's Yellow Fade effect. I am
This XAML makes text fade in when it appears. I would like to put
Would like to be able to set colors of headings and such, different font

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.