Triggering movement with java?

Is it possible to trigger a flash file with Java. i need have created a plant with random motion, a need the other object on my page to trigger it using java if possible. Can this be done? also instead of triggering everything in the flash, can i set it to trigger seperate layers? (poss using action script?)