have a look at tonypas tile based tutorial. I think he explain it there.

passing a vatiable into flash:
Code:
window.document.[name of movie].SetVariable("/mc/variable",value);