_root["text"+i]._x=275+d*Math.cos(anglestep*i*rad);
_root["text"+i]._y=200+d*Math.sin(anglestep*i*rad);
_root["text"+i]._alpha=a;
}
a=a+astep;
d=d+astep;
if(a>50||a<-5)
{
astep=astep*-1;
dstep=dstep*-1;
}
}
漩涡
for(i=0;i<60;i++){
duplicateMovieClip("/mc","mc"+i,i);
setProperty("/mc"+i,_xscale,i*2);
setProperty("/mc"+i,_yscale,i*2);
setProperty("/mc"+i,_rotation,i*-10);
}
水晶效果
functionscaleMe()
{
this.angle=this.degrees*0.017453;
this.degrees=this.degrees+(this._parent._parent._xmouse-300)/30;
this.xpos=this._parent._parent.radius*Math.cos(this.angle);
this.xpos=this._parent._parent.radius*Math.sin(this.angle)+60;
this.depth=1/(1-this.xpos/this._parent._parent.perspective);
this._x=this.xpos*this.depth+this._parent._parent.centrepointx;
this._y=this._parent._parent.centrepointy;
this._xscale=this.zpos;
this._yscale=this.depth*93;
this._alpha=this.zpos+150;
this.swapDepths(this.depth*500);
}
fscommand("allowscale","false");
numbers_as_words=["1","2","3","4","5","6","7"];
perspective=500;
centrepointx=300;
centrepointy=100;
radius=180;
numSections=7;
spacing=360/numSections;
this.createEmptyMovieClip("c_mc",1);
for(s=1;s<=numSections;s++){
_root.c_mc.attachMovie(numbers_as_words[s-1],"section"+s,s);
_root.c_mc["section"+s].degrees=(s-1)*spacing;
_root.c_mc["section"+s].onEnterFrame=scaleMe;
}
c_mc.onEnterFrame=function(){
var_12=newflash.filters.BlurFilter();
_12.quality=3;
_12.blurx=Math.abs((this._parent._xmouse-300)/9);
_12.blury=0;
this.filters=[_12];
}
stop();
动态打字效果
functiontypetext(str:
String,speed:
Number){
vari=0;
varttext=newObject();
varIS_type_txt:
Boolean=true;
ttext.interval=function(){
vartype_txt_move=newString(str);
textcontent.htmlText=type_txt_move.substring(0,i+1);
if(IS_type_txt){
i++;
}else{
clearInterval(ttext_ID);
}
if(i>=type_txt_move.length){
IS_type_txt=false;
}elseif(i<=0){
IS_type_txt=true;
}
}
varttext_ID=setInterval(ttext,"interval",speed);
}
typetext("【一剪梅】
李清照
红藕香残玉簟秋。
轻解罗裳,
独上兰舟。
云中谁寄锦书来?
雁字回时,
月满西楼。
花自飘零水自流。
一种相思,
两处闲愁。
此情无计可消除,
才下眉头,
却上心头。
",150);
图片查看_root.createEmptyMovieClip("slide",1);
_root.next.onRelease=function(){
a=1;
i++;
num++;
if(num>=12){
num=1;
}
_root.slide.createEmptyMovieClip(["CM"+i],i);
_root.slide.loadMovie("image/0"+num+".jpg","CM"+i);
_root.slide._alpha=0;
_root.slide._x=-300;
_root.slide._y=36;
_root.name="image/photo0"+num+".jpg";
_root.onEnterFrame=function(){
a++;
_root.slide.setMask(mask);
_root.slide._alpha+=5;
_root.slide._x+=(50-_root.slide._x)/5;
_root.slide["CM"+(i-1)]._x=a*3;
_root.slide["CM"+(i-2)].removeMovieClip();
}
}
_root.back.onRelease=function(){
a=1;
i++;
num--;
if(num<=0){
num=12;
}
_root.slide.createEmptyMovieClip("CM"+i,i);
_root.slide.loadMovie("image/0"+num+".jpg");
_root.slide._alpha=0;
_root.slide._x=300;
_root.slide._y=36;
_root.name="image/photo0"+num+".jpg";
_root.onEnterFrame=function(){
a++;
_root.slide.setMask(mask);
_root.slide._alpha+=3;
_root.slide._x+=(50-_root.slide._x)/5;
_root.slide["CM"+(i-1)]._x-=a*3;
_root.slide["CM"+(i-2)].removeMovieClip();
}
}
图片轮换
functionrun(){
if(myMovieClip0._currentframe>4){
myMovieClip0.gotoAndStop
(1);
}
myBitmapData.noise(Math.floor(1000*Math.random()),0,255,15,false);
myMovieClip2._alpha=myMovieClip2._alpha-2;
if(myMovieClip2._alpha<=1){
k++;
myMovieClip2._alpha=100;
myMovieClip0.nextFrame();
var_12=1;
while(_12<=4){
if(_12==k){
this["m"+_12].mm.gotoAndStop
(2);
}
_12++;
}
if(k>4){
k=1;
m1.mm.gotoAndStop
(2);
myMovieClip0.gotoAndStop
(1);
}
}
}
varmyBitmapData=newflash.display.BitmapData(400,300);
this.createEmptyMovieClip("myMovieClip2",1);
myMovieClip2._x=myMovieClip0._x;
myMovieClip2._y=myMovieClip0._y;
myMovieClip2.attachBitmap(myBitmapData,1);
_global.k=1;
vari=1;
while(i<=4){
this["m"+i].gotoAndStop(i);
this["m"+i].mm.gotoAndStop
(1);
i++;
}
myMovieClip0.gotoAndStop
(1);
m1.mm.gotoAndStop
(2);
_root.onEnterFrame=run;
vari=1;
while(i<=4){
this["m"+i].no=i;
this["m"+i].onPress=function(){
delete_root["onEnterFrame"];
_root.onEnterFrame=run;
var_13=1;
while(_13<=4){
if(_13==this.no){
k=_13;
_root.myMovieClip0.gotoAndStop(_13);
_root["m"+_13].mm.gotoAndStop
(2);
}
else{
_root["m"+_13].mm.gotoAndStop
(1);
}
_13++;
}
}
i++;
}
注释
stop();
varsz=127;
varsd=3;
vartemp=1;
tempT=temp;
mcX=mc_x;
xfmc._visible=false;
functionxfmchs(){
xfmc._visible=true;
xfmc.onEnterFrame=function(){
xfmc._x=xf