Random Movement

Hi there. Was just wondering how easy it is to get randon movement for different layer in a flash file? I saw the tutorial with the traffic cones but need it to be more controlled movement (supose its not really that random then!) Is there any code that i can use to randonly move each layer.

Also is there some way that i can trigger a flash file to play by using Javascript?