Are you using the same browser in standalone as when deployed? And the same
SWF? Release build SWFs don't have as much information, and non-debug
players don't support sampling.
I am using the same browser and i took the same swf(from bin-debug) which I run in the standalone mode and my browser has debug version of flash player.
I have no clue why its not working.. Could this be some problem with the security?
I don't think security matters. What do you mean by standalone mode? What
does flashplayerversion.com say about your browser player?
By standalone I meant running locally(contents are in my local file system) and not deployed in any server.
My flash player version is 10,3,181,34 and debugger version is yes.
Try using the Flash Builder profiler and see if it works.
Sorry my flash builder does not have a profiler(not a full version).
Did you verify that startSampling was called?
This is the sample code which I have written in my application's button click handler
trace(getSampleCount() > 0);
When I run this locally, the alert always shows some number greater than 1000. When I run this from my tomcat server, the alert always shows zero.
Can you debug the app when deployed to the server?
Try tracing out Capabilities.version and Capabilities.isDebugger.
Yes I am able to debug the app deployed in server.
I printed out the version and isDebugger and it is WIN 10,3,181,340 and true resp.
Which browser? Have you tried different browsers?
I tried it in Mozilla and IE. It's not working in both.
I got the problem here, flash.sampler.getSamples() works only when the application is launched from IDE. When i run it directly in the browser also it is not working.
Is there something that I need to include while launching the app.
I don't know what that would be. I use flash.sampler without the IDE quite
often. You can configure a run configuration to launch your server-based
SWF from the IDE.