Hi I want to use loadMovie function to load image into this movie which picks colors and display them in a small box. but when I do that using loadMovie it doesn't pick color as it does when I load image from the library
Example taken from here http://www.flashvalley .com/fv_tutorials/BitmapData_clas s_and_getPixel/
Example taken from here http://www.flashvalley .com/fv_tutorials/BitmapData_clas s_and_getPixel/
Code:
import flash.display.BitmapData;
linkageId = "landscape";
myBitmapData = BitmapData.loadBitmap(linkageId);
mc = this.createEmptyMovieClip("mc", 0);
mc.attachBitmap(myBitmapData, 0);
selectedColor.swapDepths(_root.getNextHighestDepth());
newColor = new Color(selectedColor.sample);
onMouseMove = function(){
myNewColor = "0x" + myBitmapData.getPixel(_xmouse,_ymouse).toString(16);
newColor.setRGB(myNewColor);
selectedColor.colorValue.text = myNewColor;
}
Comment