dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Mouse coordinates + rgb

  1. #1
    Member
    Join Date
    Oct 2000
    Posts
    78
    I have found a couple .fla's that used "tricks" to grab the rgb of the pixel the mouse was currently on (a bit to confusing for me). is there a simple way to grab the rgb of where the mouse resides?

  2. #2
    Member
    Join Date
    Nov 2000
    Posts
    78
    Depends on the usage...in short, no. Flash can only detect the RGB value of a movie clip. I've not checked but you'd need to think about the following things:

    1) Does the RGB value come from the color of the items in the movie clip, or from the RGB transform value you set it (I'm not sure, but I think that a red movie clip with a 0,0,0 transform value will always return a 0,0,0 for RGB - try it out)?

    2) Can you cheat by giving a 'fake' value to each movie clip that you want the user to 'touch' (e.g. if you are doing a limited palette, just create the variables Red Green and Blue in each clip and get this when you want the RGB values)

    It really does depend on what application you want to put this to...but as I said, if what you want is flash to detect a color under the mouse pointer for ANY situation, then there is no way. You gotta work around it!

    Hope that helps

  3. #3
    Member
    Join Date
    Oct 2000
    Posts
    78
    my intent was to take a picture of anything, but for the sake of argument, lets say a sexy Carme Electra picture (kidding, lets say a pic of the Flashkit logo).

    The effect I was looking for was:

    1. grab the rgb of where the mouse resides on the picture. 2. have a line drawn at a random angle and a random length and angle, with the line being the rgb value i captured in step 1

    what i had hoped to have in the end is an effect that resembles a sparkler. random lines being drawn in all degrees with different colored lines.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center