CGArt-中国CGer中的绿色家园
首页 信息动态 原创排行 互动教程 资源千寻 CG人才 CGArt杂志 艺术设计 CG画廊 CG论坛 酷站欣赏 CG搜索 会员中心
用Flash AS模拟声波振荡效果
来源:闪吧 作者:kingofkofs 编辑:浪漫的季节 发布时间:2007年08月03日 11:43:00

写着玩的,代码插入第一帧即可。

if (flag != 1) {
createEmptyMovieClip("ba", 9);
ba.lineStyle(1, 0xff0000, 100);
ba.lineTo(100, 0);
ba._y = Stage.width/1.5;
ba._x = Stage.height/2;
ba.createEmptyMovieClip("hk", 11);
ba.hk._x = 1;
ba.hk.lineStyle(10, 0x000ff, 100);
ba.hk.lineTo(0, 1);
ba.createTextField("txt", 100, 0, 10, 200, 50);
ba.txt.text = "调整波长";
var n:Number = 1;
var bochang:Number;
var zuo:Number = ba.hk._x;
var din:Number = ba.hk._y;
var you:Number = zuo+100;
var di = din;
_root.ba.hk.onPress = function() {
  this.startDrag(flase, zuo, din, you, di);
};
ba.hk.onRelease = function() {
  this.stopDrag();
};
ba.hk.onReleaseOutside = function() {
  this.stopDrag();
};
createEmptyMovieClip("a", 10);
a.lineStyle(6, 0xff0000, 100);
a.lineTo(1, 1);
a._x = 500;
a._y = 500;
var i = a._height;
var f = 1;
var v = 50;
flag = 1;
}
闪吧菜鸟kingofkofs = onEnterFrame=function () {
a._x += bochang;
_x -= bochang;
ba._x += bochang;
a._y += (Stage.height/2-a._y)/1.08*2.05;
lineStyle(1, 0x0055ff, 100);
lineTo(a._x, a._y);
bochang = (ba.hk._x)/10+1;
f++;
if (f == 30) {
  n += (300-n)/10;
  if (n>250) {
   n = 140;
  }
  a._y = n;
  f = 0;
}
};

共有评论0条
更多评论..
作者信息 详细信息
评论人:
验证码:
内容:
 
about us advertisement publish conformity service cooperate associate link site map contact us help jump to the top of page