Route tracker

Hi guys,

here’s a challenga for y’all…

Create an object that follows an underlying image. This image must be random, gif, jpeg, whatever. If the image is totally black or totally white, then the image will not influence the movement but. The movement will then be random. If the image contains a line or anything that closely resembles it, then the goal of the object is to follow this line as closely as possible.

Any of you guys have an idea on how to accomplish this?
I can move objects, random or not, but I wouldn’t know how to make it follow a line. Can flash detect changes in color of an image?
e.g.:


xPos = my_object._x;//x coordinate of the object
yPos = my_object._y;//y coordinate of the object
my_color = getColor(xPos, yPos);//get the color of the pixel at these coordinates
//remember this is just example code, not actual functional code.

I’d love to hear some of your brainstorms…

Will

Djeez guys/gallz,
I thought we had some of the greatest flasharized minds in the internet community here. There must be someone out there that can help me.
I know that director CAN detect the RGB value of a specified pixel, but I prefer to do it is Flash, because my knowledge of Lingo is not as advanced as my knowledge of ActionScript.

Pleez help