There are options for cross domain assets:
// SWF inbound scripting policy: page domains that the SWF should trust. (single string or array of strings)
trustedDomains: [window.location.host],
See:
https://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md
Also: The current master branch (2.x) logs the cross domains to console if you set debug to true in config.
I had some success using a cdn hosted version of the swf file. But after making some edits this mysteriously stopped working locally but did work on my staging server.
This is my config:
ZeroClipboard.config({
moviePath: '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/1.3.2/ZeroClipboard.swf',
forceHandCursor: true,
debug: true
});
Also see this jsfiddle:
http://jsfiddle.net/rimian/45Nnv/
If you're still having trouble, you can log from the swf to console. For this, you need to be able to compile the flash, from zeroclipboard source into a swf using grunt mxmlc
. Simply dispatch a log event in the action script (compile and copy it into your project) and respond to it in your js:
For example, in ZeroClipboard.as
:
// constructor, setup event listeners and external interfaces
public function ZeroClipboard() {
...
// Get the flashvars
var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters;
dispatch("log", flashvars);
...
}
Then in your js:
zeroclipboard = new ZeroClipboard($('.mybuttons'))
zeroclipboard.on('log', function(client, args) { console.log('log:', args)});