5D艺术网首页
商城
|
资讯
|
作品
|
博客
|
教程
|
论坛
登录
注册
加为好友
发短消息
来自:
性别:秘密
最后登录:2009-09-05
http://walktree.5d.cn/
首页
|
新闻
|
话题
|
博客
|
相册
|
艺术作品
|
社交关系
|
留言板
|
社交圈
2004/08/15 | 关于FLASH 中的System.setClipboard()
类别(:: Flash ::)
|
评论
(0)
|
阅读(159)
|
发表于 16:14
System.setClipboard()
Availability
SWF files published for Flash Player 6 or later, playing in Flash Player 7 or later.
Usage
System.setClipboard(string:String) : Boolean
Parameters
string A plain-text string of characters to place on the system Clipboard, replacing its current
contents (if any).
Returns
A Boolean value: true if the text is successfully placed on the Clipboard; false otherwise.
Description
Method; replaces the contents of the Clipboard with a specified text string.
//偶的英文不好,看个大概,有了一个复制的功能...
Example
The following example places the phrase "Hello World" onto the system Clipboard:
System.setClipboard("Hello world");
The following example creates two text fields at runtime, called in_txt and out_txt. When you
select text in the in_txt field, you can click the copy_btn to copy the data to the Clipboard.
Then you can paste the text into the out_txt field.
this.createTextField("in_txt", this.getNextHighestDepth(), 10, 10, 160, 120);
in_txt.multiline = true;
in_txt.border = true;
in_txt.text = "lorum ipsum...";
this.createTextField("out_txt", this.getNextHighestDepth(), 10, 140, 160,
120);
out_txt.multiline = true;
out_txt.border = true;
out_txt.type = "input";
copy_btn.onRelease = function() {
System.setClipboard(in_txt.text);//复制文字
Selection.setFocus("out_txt"); //将文字全选
};
0
评论
Comments
日志分类
首页
[226]
:: Flash ::
[87]
:: php ::
[8]
::眼睛和耳朵::
[36]
::键盘时代::
[73]
::水痕专栏::
[22]