当前位置: > 谁能帮我解释下这段AS代码:急...
题目
谁能帮我解释下这段AS代码:急
onClipEvent (load)
{
function speed(num)
{
speedX = -(_root._xmouse - hx) / num / 2;
return (speedX);
} // End of the function
function trans()
{
p = p + speed(100);
range = (p + 291) * 3.141593E+000 / 180;
re1 = Math.sin(range) * r;
re2 = Math.cos(range) * a;
} // End of the function
function property()
{
trans();
setProperty("",_x,hx + re1);
setProperty("",_alpha,re2 + 70);
setProperty("",_yscale,re2 + 70);
setProperty("",_xscale,re2 + 70);
this.swapDepths(_alpha);
} // End of the function
hx = this._parent.stageWidth / 2;
hy = this._parent.stageHeight / 2;
r = 100;
a = 30;
}
onClipEvent (enterFrame)
{
property();
}

提问时间:2021-12-26

答案
这是 VB写的 调用Word 填充数据的.
On Error Resume Next
Dim ex As Application '声明
Set ex = CreateObject("word.application") '创建Word对象
ex.Visible = True '让Word可见
Set woreddoc = ex.Documents.Add '添加一个新文档
ex.Caption = "数据库原理概论试卷" '文档标题名
ex.Application.Selection.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter '字体居中
ex.Application.Selection.Font.Size = 14
ex.Application.Selection.Font.Spacing = 1
ex.Application.Selection.Font.Bold = 20 '上面设置字体字号的
ex.Application.Selection.Range.Text = Text.Item(1).Text '从text的项目1获取数据 text 应该是个 combo 或listbox
ex.Application.Selection.EndKey '移到结尾
ex.Application.Selection.Range.InsertAfter (Text2.Item(1).Text) + Chr(13) '再填充 加个回车
ex.Application.Selection.Range.InsertParagraphAfter
ex.Application.Selection.EndKey
ex.Application.Selection.MoveDown
ex.Application.Selection.EndKey
ex.Application.Selection.Range.InsertParagraphAfter
ex.Application.Selection.MoveDown
ex.Application.Selection.MoveDown '下跳
ex.Application.Selection.Paragraphs.Last.Range.Font.Size = 12
ex.Application.Selection.Paragraphs.Last.Range.Font.Bold = 0 '再设置字体 字号
k = ex.Application.Selection.Tables.Add(ex.Application.Selection.Range,2,8,0,0) '这里画了个两行 8列的 表
ex.Application.Selection.Tables.Item(1).Columns.Item(1).Cells.Item(1).Range.InsertAfter ("题型") '1行1列 填充
ex.Application.Selection.Tables.Item(1).Columns.Item(1).Cells.Item(2).Range.InsertAfter ("分数") '1行2列填充
ex.Application.Selection.MoveDown
ex.Application.Selection.Tables.Item(1).Columns.Item(2).Cells.Item(1).Range.InsertAfter ("一")
ex.Application.Selection.Tables.Item(1).Columns.Item(3).Cells.Item(1).Range.InsertAfter ("二")
ex.Application.Selection.Tables.Item(1).Columns.Item(4).Cells.Item(1).Range.InsertAfter ("三")
ex.Application.Selection.Tables.Item(1).Columns.Item(5).Cells.Item(1).Range.InsertAfter ("四")
ex.Application.Selection.Tables.Item(1).Columns.Item(6).Cells.Item(1).Range.InsertAfter ("五")
ex.Application.Selection.Tables.Item(1).Columns.Item(7).Cells.Item(1).Range.InsertAfter ("六")
ex.Application.Selection.Tables.Item(1).Columns.Item(8).Cells.Item(1).Range.InsertAfter ("总分") '这里添完
ex.Application.Selection.MoveDown
ex.Application.Selection.MoveDown '下条
ex.Application.Selection.Range.InsertParagraphAfter
ex.Application.Selection.MoveDown
ex.Application.Selection.Range.ParagraphFormat.Alignment = wdAlignParagraphLeft
ex.Application.Selection.Paragraphs.Last.Range.Font.Size = 10
ex.Application.Selection.Paragraphs.Last.Range.Font.Bold = 10 '设置字体字号
ex.Application.Selection.Range.InsertParagraphAfter
ex.Application.Selection.Range.InsertAfter ("填空(20分)") '再填充
ex.Application.Selection.MoveDown
ex.Application.Selection.Range.InsertParagraphAfter
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.