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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:25:18+00:00 2026-05-24T03:25:18+00:00

I have a number of objects (represented as DisplayObjects) that i wish to blend

  • 0

I have a number of objects (represented as DisplayObjects) that i wish to blend with eachother.

However behind these objects there is a background that i do not want to involve in the blending.

So basically i want to blend these objects with eachother and afterwards use the result of this blending as a new DisplayObject (for example to put it on top of a randomly colored background).

So what i have is:

var obj1:DisplayObject = getFirstObj();
var obj2:DisplayObject = getSecObj();
var background:DisplayObject = getBackground();

obj1.blendMode = BlendMode.ADD;
obj2.blendMode = BlendMode.ADD;

A first attempt i tried was putting these objects into a common DisplayObjectContainer hoping that blending mode would only be relative to all objects contained by the same DisplayObjectContainer, but this does not seem to be the case.

var objectsPool:Sprite = new Sprite();
objectsPool.addChild( obj1 );
objectsPool.addChild( obj2 );

addChild( background );
addchild( objectsPool );

So that diddent get me anywhere.
Any help is appreciated.

EDIT: changed DisplayObjectContainer to Sprite in the last code snippet

  • 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-24T03:25:19+00:00Added an answer on May 24, 2026 at 3:25 am

    If you put the objects into a container, and remove it from the stage, you can then draw it with the BitmapData class and create a new Bitmap object representing the combination. This will have a transparent background, and it’s blendMode will be normal, allowing you to use it on the background.

    var obj1:DisplayObject = getFirstObj();
    var obj2:DisplayObject = getSecObj();
    var background:DisplayObject = getBackground();
    
    obj1.blendMode = BlendMode.ADD;
    obj2.blendMode = BlendMode.ADD;
    
    var objectsPool:DisplayObjectContainer = new DisplayObjectContainer();
    objectsPool.addChild( obj1 );
    objectsPool.addChild( obj2 );
    
    var bmd:BitmapData = new BitmapData(objectsPool.width,objectsPool.height,true,0);
    bmd.draw(objectsPool);
    
    var drawnObject:Bitmap = new Bitmap(bmd);
    
    addChild( background );
    addchild( drawnObject );
    

    (untested code, good luck)

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

Sidebar

Related Questions

I have a situation where I'm starting a number of objects that, when they
I have a single NSDictionary object which contains a large number of custom objects.
I have a python module that defines a number of classes: class A(object): def
I have a number of code value tables that contain a code and a
I have a number of C# custom events that are associated with items being
I have a number of classes that are decorated with DebuggerDisplayAttribute. I want to
I have a number of value objects and I want to be able to
I have an odd problem. I have a number of C# apps that utilize
I'm working on a project were we have number (5 at the moment) of
I have a number of macros written for Visual Studio 2005, but they have

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.