Problem with js call

HI
I am calling javascript from my flex application using externalInterface.call which is working fine when i run the application from within the eclipse but when i take generated swf and try running it independently its not able to make call to the javascript .What could be the problem.