Flash Action Script
I want to write an application in action script.
The application will appended with jQuery to the page and if it is appended, copy it immediately to the system clipboard. I have this code:
jQuery:
$(document).ready(function(){开发者_高级运维
$('#obsah').append('<object width="100" height="100" id="copysw" align="middle"><param name="movie" value="cp.swf" /><PARAM NAME=FlashVars VALUE="hodnota=something"></object>');
});
And Action Script
but.onRelease = function() {
System.setClipboard(hodnota);
};
but.onRelease();
But it's not working. I still must click on a flash window to do this operation. I also trying click on a flash via jQuery.
$(document).ready(function(){
$('#obsah').append('<object width="100" height="100" id="copysw" align="middle"><param name="movie" value="cp.swf" /><PARAM NAME=FlashVars VALUE="hodnota=something"></object>');
$('#copysw').click();
});
But nothing worked for me. Please give me some tips how to do this. Thank you very much.
You should check this link ZeroClipBoard for learning how to copy to clipboard.
Although it is limited,for good reasons, to only copy when the user trigger the action... such as click.
精彩评论