WTF won't work in html page

Howdy,
Have this Flash app that uses remoting.
Now why does it work when I use test movie but…
when I publish it or even use publish preview HTML within the Flash IDE it doesn’t work?
Extremely confused!!!
Any pointers appreciated!
cheers
jax