SherWood
SherWood

Reputation: 91

AS3 BlendMode ADD

I could use some help about applying changes to symbols. I can see in the hints stuff like display/BlendMode/Properties/ADD for example, same things can be changed directly, in symbol properties. I don't really know the rules, which one to type where. I tried "Object01.display.BlendMode.Properties.ADD = true" and "Object01.draw(BlendMode.ADD)"... I've only found examples where people used it during drawing things using AS3. And I need to apply it to an existing symbol(instance). Via function, of course. Please.

if(myWill = true){ "change_blending_properties_code" }

^_^

Upvotes: 0

Views: 2989

Answers (1)

Chunky Chunk
Chunky Chunk

Reputation: 17217

You can assign any DisplayObject's flash.display.DisplayObject.blendMode quite easily in code:

import flash.display.BlendMode;

myDisplayObject.blendMode = BlendMode.ADD;

flash.display.BlendMode is simply a class of constants, like BlendMode.ADD. Alternatively, you could write the following, but I don't recommend it:

myDisplayObject.blendMode = "add";

Upvotes: 3

Related Questions