最近拿FLASH做课件,复习下AS.

上一篇 / 下一篇  2008-08-17 18:24:03 / 个人分类:玩FLASH的

本次制作记录下来的文档:

鼠标移进移出:
on (rollOver){
 button2.play();
}
on (rollOut)
{
    button2.onEnterFrame. = function ()
    {
        this.prevFrame();
        if (this._currentframe. == 1)
        {
            this.onEnterFrame. = null;
        } // end if
 };
}

当前MC深度为最顶层:
this.swapDepths(_root.getNextHighestDepth());

on (rollOver) {
 this.swapDepths(_root.getNextHighestDepth());
 _root.tt.swapDepths(_root.getNextHighestDepth());
}

阴影反方向移动:
onClipEvent (enterFrame) {
 ax=125+(500-_root._xmouse)/4
 ay=125+(350-_root._ymouse)/4
 _x+=(ax-_x)/5
 _y+=(ay-_y)/5
 for(i=0;i<4;i++){
  eval("mc0"+i)._y=50-(_y-(i-2)*25)%100
  eval("mc1"+i)._x=50-(_x-(i-2)*25)%100
  eval("mc0"+i)._yscale=(25-Math.abs(25-Math.abs(eval("mc0"+i)._y)))*4*(Math.abs(eval("mc0"+i)._y)/eval("mc0"+i)._y)
  eval("mc1"+i)._yscale=(25-Math.abs(25-Math.abs(eval("mc1"+i)._x)))*4*(Math.abs(eval("mc1"+i)._x)/eval("mc1"+i)._x)
 }
}

改变大小和位置:
 bb._xscale=400;    //倍率
 bb._yscale=600;
 bb._x=680;    //坐标
 bb._y=30;

缓冲语句,以x方向运动为例:
mc._x+=(目标坐标值-mc._x)/缓冲系数,比如2或者10

更改透明度:
this.onEnterFrame. = function() {
 if(ts._alpha<=50){
  ts._alpha+=5
 }
}

当然,我写文档的格式相当的不好...


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2009-01-05  
    123
45678910
11121314151617
18192021222324
25262728293031

数据统计

  • 访问量: 5207
  • 日志数: 17
  • 建立时间: 2008-03-27
  • 更新时间: 2008-12-25

RSS订阅

Open Toolbar