l = thisComp.layer("Island.psd"); //The 'island' layer w = l.width; //The island layer's width h = l.height; //The island layer's height thresh = 0.9; //Threshold for alpha value on the island layer seedRandom(index, true); //Seed our random numbers and don't update them based on time (timeless) p = random([0,0], [w,h]); //'p' is a random point in the layer space of the island layer alpha = l.sampleImage(p)[4]; //The alpha value at the point 'p' on the island layer (values range from 0-1) //While the alpha value is below our threshold... while(alpha < thresh){ p = random([0,0], [w,h]); //Pick a new random point on the island layer alpha = l.sampleImage(p)[4]; //Update the alpha value at the point } l.toWorld(p); //Transforms the point 'p' from layer space to world space