Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reset bitmap colorTransform to its original.

Status
Not open for further replies.

deluxmilkman

Programmer
Sep 26, 2007
17
0
0
JP
I am trying to reset the state of a bitmap back to its original state
after I transformed its color.

HTML:
import flash.display.BitmapData;
import flash.geom.ColorTransform;
import flash.geom.Rectangle;
_bmd = BitmapData.loadBitmap("photo");
_mc = this.createEmptyMovieClip("bm_mc", 10);
_mc.attachBitmap(_bmd, 10);
_mc._x = 0;
_mc._y = 0;
_mc.onPress = function() {
	var _ctf = new ColorTransform(1, 1, 1, 1, 0, 0, 100, 0);
   	_bmd.colorTransform(_bmd.rectangle, _ctf);
	delete this.onPress;
};

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top