Using loadMovie method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atlkhan
    New Member
    • Apr 2007
    • 39

    Using loadMovie method

    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/


    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;
    
    }
  • endline
    New Member
    • Jun 2007
    • 10

    #2
    do you get any errors traced? what does happen? but i think its because the linkage id is incorrect due to it being loaded instead of taken out of the library.

    Comment

    • atlkhan
      New Member
      • Apr 2007
      • 39

      #3
      No I don't get any errors , just the color which is picked is black all the time instead of the right color.

      Originally posted by endline
      do you get any errors traced? what does happen? but i think its because the linkage id is incorrect due to it being loaded instead of taken out of the library.

      Comment

      Working...