纯脚本语句软翻书相册——制作教程

FLAS初级教程

 按住页角拖拽或点击
由于电脑问题不能截图暂时只能文字表达,以后再添加图片说明 
 
http://yy.2000y.net/20130920s/201311/2013111001385897721.swf
 
本相册制作简单。在软件场景里只有一个图层而且在舞台画布里没有任何图片 
 
   1.打开Flash软件,点“文件”-“导入”-“导入到库”,要求是偶数,在本例中共50张。最好是100张以内)导入到库中。(用PS将图片处理成大小为330*400)
  2.点“文件”-“发布设置”,“动画播放器”为“Flash Player 6”、脚本语句(AS)为“Action Script 2”,确定。
 
 3.导入之后处理图片的属性 :右点库图片点属性。(所有图片如此处理一次123456………) 如下图
图片图片
 
  4. 点工具栏里的“矩形工具”画一个350*440的框,点“对齐”面板然后全居中,再“剪切”(剪切的框留着以后备用)图片
  5.从库中拖入“1”图片到舞台,点对齐面板“全居中”再点“修收”——“分离” 再把刚才剪切的框“粘贴到当前位子”调好框和需要的图片的位子再在图片的外围 点一下,再点框的外(框的 成麻点状)之后点删除键(DELETE 键)如下图
 
                  
   6.右点转换为元件,类型“图形”
 


 7.插入“图1”影片剪辑(方法是:点“插入”-“新建元件”,在“创建新元件”对话框中输入名称为“图1”,点选类型为“影片剪辑”,确定)。点图层1第1帧,从库中拖“照片1”位图到工作区,全中齐(方法是:用黑箭头工具点工作区中的图片,然后在对齐面板中点“水平中齐”、“垂直中齐”)。

  8。在库中右击“图1”-“直接复制”,名称为“图2”,确定。双击库中的“图2”,进入“图2”的编辑区,点编辑区中的图片,点属性面板中的“交换”-点选“照片2”,确定。

      9.在库中右击“图1”-“链接”-在“链接属性”中用纯英文小写输入“标识符”为“print1”,在“链接”选项中勾选第1、2项 
  10.用上面相同的方法分别为库中的“图2,3 4 5 6”、......输入链接标识符为“print2”、“print3”...... 
11.插入一个名为“按钮”的影片剪辑元件,在其“点击”帧插入空白关键帧,选用矩形工具,设置笔触颜色禁止,填充颜色任意,在工作区画正方形,在属性面板上改长=宽=200,全中齐,在库中右击“按钮”,-“链接”-在“链接属性”中用纯英文大写输入“标识符”为“CB”,在“链接”选项中勾选第1、2项。 

 12.插入一个名为“AS”的影片剪辑元件,点图层1第1帧,右键打开“动作”面板,将下列语句复制、粘贴:

function hero() {
 PW = 320;
 PH = 466;
 PC = 16777215;
 MP = 50;
 AS = 8.000000E-002;
 SN = 2.000000E-003;
 DR = 4.000000E-001;
 DA = 20;
 SY = _y;
 PWH = PW+PH;
 PY = PH/2+PW;
 
DD = 1;
 VR = -1;
 ENP = 2.500000E+000;
 CP = 5.000000E-001;
 DRG = false;
 attachMovie("CB","BRB",110);
 attachMovie("CB","TRB",111);
 attachMovie("CB","BLB",120);
 attachMovie("CB","TLB",121);
 BLB._xscale = TLB._xscale=-100;
 TLB._yscale = TRB._yscale=-100;
 BRB._x = TRB._x=PW;
 BLB._x = TLB._x=-PW;
 BLB._visible = TLB._visible=false;
 PI(ENP,DD,VR);
}// End of the function
function MM() {
 this.createEmptyMovieClip("FBPM",70);
 with (FBPM) {
  beginFill(21760,100);
  lineto(PWH,-VR*PWH);
 
curveto(0,-VR*2*PWH,-PWH,-VR*PWH);
  lineTo(0,0);
  endFill();
 }// End of with
 FBPM.duplicateMovieClip("FTPM",80);
 this.createEmptyMovieClip("FSM",90);
 DP(FSM,-DD,VR);
 FSM._rotation = VR*DD*90;
 this.createEmptyMovieClip("SSM",100);
 DP(SSM,DD,VR);
 FBP.setMask(FBPM);
 FTP.setMask(FTPM);
 FS.setMask(FSM);
 SS.setMask(SSM);
}// End of the function
function L01(rrr) {
 
var _loc1 = rrr;
 return (_loc1>1 ? (1) : (_loc1<0 ? (0) : (_loc1)));
}// End of the function
function MSE(t, xq, yq) {
 with (t) {
  var c = [0, 0, 0, 0, 0, 0, 0];
  var a = [30, 25, 15, 5, 0, 1, 6];
  var ra = [0, 1, 17, 51, 89, 132, 255];
  var m = {matrixType:"box", x:0, y:-yq*PW, w:xq*PW, h:-yq*PH, r:0};
  beginGradientFill("linear",c,a,ra,m);
  moveTo(0,-PW*yq);
  lineTo(0,-PWH*yq);
  lineTo(xq*PW,-PWH*yq);
  lineTo(xq*PW,-PW*yq);
  lineTo(0,-PW*yq);
  endFill();
 }// End of with
}// End of the function
function GGR() {
 
if (DRG) {
  MRO = -DD*(_xmouse-startX-DD*DA)/(2*PW);
 } else {
  MRO>6.666667E-001 ? (MRO=MRO+AS) : (MRO=MRO-AS);
 }// end else if
 return (L01(MRO));
}// End of the function
function SAFP(ENP, DD) {
 PI(ENP,DD,VR);
 startX = DD*PW;
 BRB._visible = BLB._visible=TRB._visible=TLB._visible=0;
 PRO = 0;
 FFF(ODR);
 onEnterFrame = function () {
  FA(L01(PRO=PRO+AS));
 };
 CP = ENP;
}// End of the function
function SB() {
 var _loc2 = -VR*(PW+PH/2);
 var _loc1 = PH/2;
 BRB._y = BLB._y=_loc2+_loc1;
 
TRB._y = TLB._y=_loc2-_loc1;
}// End of the function
function FA(goalR) {
 step = (goalR-ODR)*DR;
 ODR = ODR+step;
 FFF(ODR);
 if (ODR>1-SN) {
  FFF(1);
  FD();
  if (AFG) {
   if (CP != EAFP) {
    SAFP(CP+DAF*2,DAF);
   } else {
    AFG = false;
   }// end if
  }
  // end if 
 }
 // end else if 
 
}// End of the function
function turnTo(ENP) {
 var _loc2 = ENP;
 if (_loc2 != CP) {
  if (!onEnterFrame) {
   var _loc1 = _loc2>CP ? (1) : (-1);
   SAFP(_loc2,_loc1);
  }
  // end if 
 }
 // end if 
}// End of the function
function flipTo(targPage) {
 var _loc1 = targPage;
 if (_loc1>CP) {
  DAF = 1;
 } else if (_loc1<CP) {
  DAF = -1;
 } else {
  return;
 }// end else if
 AFG = true;
 EAFP = _loc1;
 
SAFP(CP+DAF*2,DAF);
 return;
}// End of the function
function DP(t, xq, yq) {
 with (t) {
  beginFill(PC,100);
  moveto(0,-yq*PW);
  lineto(0,-yq*PWH);
  lineTo(xq*PW,-yq*PWH);
  lineTo(xq*PW,-yq*PW);
  endFill();
 }// End of with
}// End of the function
function FFF(CV) {
 var _loc1 = VR*DD*45*CV;
 FBPM._rotation = FTPM._rotation=-_loc1;
 FBP._rotation = FSM._rotation=VR*(DD*90)-_loc1*2;
 FS._rotation = SS._rotation=VR*(DD*45)-_loc1;
}// End of the function
function FD() {
 onEnterFrame = null;
 ODR = 0;
 BRB._alpha = BLB._alpha=TRB._alpha=TLB._alpha=100;
 if (CP != 5.000000E-001) {
 
BLB._visible = TLB._visible=true;
 } else {
  BLB._visible = TLB._visible=false;
 }// end else if
 if (CP != MP+5.000000E-001) {
  BRB._visible = TRB._visible=true;
 } else {
  BRB._visible = TRB._visible=false;
 }// end else if
 if (PRO == 0) {
  FS.removeMovieClip();
  FSM.removeMovieClip();
  SS.removeMovieClip();
  SSM.removeMovieClip();
  FBP.removeMovieClip();
  FBPM.removeMovieClip();
  if (DD == 1) {
   SRP.removeMovieClip();
  } else {
   SLP.removeMovieClip();
  }// end else if
 } else {
  FTP.removeMovieClip();
  if (DD == -1) {
 
SRP.removeMovieClip();
  } else {
   SLP.removeMovieClip();
  }// end else if
 }// end else if
 FTPM.removeMovieClip();
}// End of the function
function SSW() {
 this.createEmptyMovieClip("FS",50);
 MSW(FS,-DD,VR);
 FS._rotation = VR*DD*45;
 this.createEmptyMovieClip("SS",60);
 MSW(SS,DD,VR);
 SS._rotation = VR*DD*45;
}// End of the function
function LB() {
 if (CP == 5.000000E-001) {
  SLP._visible = 0;
  FTP.Shade._alpha = 67;
 } else if (CP == MP+5.000000E-001) {
  SRP._visible = 0;
  FTP.Shade._alpha = 67;
 
}
 // end else if 
 if (ENP == 5.000000E-001) {
  FS._alpha = 67;
  SS._visible = 0;
 } else if (ENP == MP+5.000000E-001) {
  FS._alpha = 67;
  SS._visible = 0;
 }
 // end else if 
}// End of the function
function SFG() {
 this.createEmptyMovieClip("FTP",30);
 DP(FTP,DD,VR);
 var PN = DD == 1 ? (CP+5.000000E-001) : (CP-5.000000E-001);
 with (FTP) {
  attachMovie("print"+PN,"Print",10);
  with (Print) {
   _x = DD*PW/2;
   _y = -VR*PY;
 
 }// End of with
 }// End of with
 FTP.createEmptyMovieClip("Shade",20);
 MSE(FTP.Shade,DD,VR);
 this.createEmptyMovieClip("FBP",40);
 DP(FBP,-DD,VR);
 var PN = DD == 1 ? (ENP-5.000000E-001) : (ENP+5.000000E-001);
 FBP.attachMovie("print"+PN,"Print",10);
 with (FBP.Print) {
  _x = -DD*PW/2;
  _y = -VR*PY;
 }// End of with
 FBP._rotation = DD*VR*90;
}// End of the function
function MSW(t, xq) {
 with (t) {
  var c;
  var a;
  var ra;
  var mxl;
  var m;
  c = [0, 0, 0, 0, 0, 0, 0];
  a = [30, 25, 15, 5, 0, 1, 6];
 
 }// End of with
 }// End of with
 FTP.createEmptyMovieClip("Shade",20);
 MSE(FTP.Shade,DD,VR);
 this.createEmptyMovieClip("FBP",40);
 DP(FBP,-DD,VR);
 var PN = DD == 1 ? (ENP-5.000000E-001) : (ENP+5.000000E-001);
 FBP.attachMovie("print"+PN,"Print",10);
 with (FBP.Print) {
  _x = -DD*PW/2;
  _y = -VR*PY;
 }// End of with
 FBP._rotation = DD*VR*90;
}// End of the function
function MSW(t, xq) {
 with (t) {
  var c;
  var a;
  var ra;
  var mxl;
  var m;
  c = [0, 0, 0, 0, 0, 0, 0];
  a = [30, 25, 15, 5, 0, 1, 6];
 
ra = [0, 1, 17, 51, 89, 132, 255];
  mxl = Math.sqrt(PW*PW+PWH*PWH);
  m = {matrixType:"box", x:0, y:-VR*mxl, w:xq*PW, h:VR*(mxl-PW), r:0};
  beginGradientFill("linear",c,a,ra,m);
  moveto(0,-VR*PW);
  lineto(0,-VR*mxl);
  lineto(xq*PW,-VR*mxl);
  lineTo(xq*PW,-VR*PW);
  endFill();
 }// End of with
}// End of the function
function SMF(DD, VR) {
 var _loc1 = DD;
 PI(CP+_loc1*2,_loc1,VR);
 startX = _loc1*PW;
 DRG = true;
 BRB._alpha = BLB._alpha=TLB._alpha=TRB._alpha=0;
 ODR = 0;
 onEnterFrame = function () {
  var _loc1 = GGR();
  step = (_loc1-ODR)*DR;
 
ODR = ODR+step;
  FFF(ODR);
  if (!DRG) {
   if (ODR<SN) {
    FFF(0);
    PRO = 0;
    FD();
    return;
   }
   // end if 
   if (ODR>1-SN) {
    FFF(1);
    PRO = 1;
    FD();
   }
   // end if 
  }
  // end if 
 };
}// End of the function
function PI(ep, d, v) {
 ENP = ep;
 
 DD = d;
 VR = v;
 setProperty("", _y, SY+v*(PY*_yscale/100));
 SST();
 SFG();
 SSW();
 MM();
 LB();
 SB();
}// End of the function
function SST() {
 this.createEmptyMovieClip("SLP",10);
 if (ENP != 5.000000E-001) {
  DP(SLP,-1,VR);
  var PN = DD == 1 ? (CP-5.000000E-001) : (ENP-5.000000E-001);
  var _loc2 = SLP.attachMovie("print"+PN, "Print", 1);
  _loc2._x = -PW/2;
  _loc2._y = -VR*PY;
 }
 // end if 
 this.createEmptyMovieClip("SRP",20);
 if (ENP != MP+5.000000E-001) {
 
DP(SRP,1,VR);
  var PN = DD == 1 ? (ENP+5.000000E-001) : (CP+5.000000E-001);
  var _loc3 = SRP.attachMovie("print"+PN, "Print", 1);
  _loc3._x = PW/2;
  _loc3._y = -VR*PY;
 }
 // end if 
 var _loc1 = DD>0 ? (SLP) : (SRP);
 _loc1.createEmptyMovieClip("Shade",2);
 MSE(_loc1.Shade,-DD,VR);
}// End of the function
function DRRS() {
 if (MRO>6.666667E-001) {
  CP = CP+2*DD;
 }
 // end if 
 PD = DRG=false;
 BRB._visible = BLB._visible=TLB._visible=TRB._visible=false;
}// End of the function
function PSRS(side) {
 if (PD) {
 
 PD = false;
 } else {
  flipTo(CP+side*2);
 }// end else if
}// End of the function
stop();
hero();
BLB.onRollOver = function() {
 SMF(-1,1);
};
TLB.onRollOver = function() {
 SMF(-1,-1);
};
BRB.onRollOver = function() {
 SMF(1,1);
};
TRB.onRollOver = function() {
 SMF(1,-1);
};
BLB.onRollOut = BRB.onRollOut=TRB.onRollOut=TLB.onRollOut=function () {
 DRG = false;
};
BLB.onRelease = TLB.onRelease=function () {
 
PSRS(-1);
};
BRB.onRelease = TRB.onRelease=function () {
 PSRS(1);
};
BLB.onDragOut = TLB.onDragOut=function () {
 PD = true;
 BRB._visible = TRB._visible=false;
};
BRB.onDragOut = TRB.onDragOut=function () {
 PD = true;
 BLB._visible = TLB._visible=false;
};
BLB.onReleaseOutside = BRB.onReleaseOutside=TLB.onReleaseOutside=TRB.onReleaseOutside=function () {
 DRRS();
};
 
 13. 自动套用格式后,找到代码“红色”的,将“MP=50中的50改成你的照片的张数(连封面和封底), PW = 320;”——片宽度  “PH = 466;”——图片高度。关闭动作面板。
  14.回到“场景1”,点图层1第1帧,从库中拖“AS”影片剪辑到工作区,全中齐。测试保存。
           
 可以加上一个背景和音乐。不过要添加两个图层







文章评论

馨香一洁

相册中的女主人公胖的跟猪一样。[em]e144[/em]

无痕

制作精美 坐沙发慢慢看美女

无痕

[url=http://soso6.gtimg.cn/sosopic_f/0/11036033473303504696/100][img,42,48]http://soso6.gtimg.cn/sosopic_f/0/11036033473303504696/100?pt=3&ek=1&kp=1&sce=0-12-12[/img][/url]

√ 葒塵絕戀℡[em]e257912[/em]

代码音画代码:<CENTER><BR>&nbsp<WBR></CENTER> <CENTER> <TABLE borderColor=#ff0033 height=10 cellSpacing=5 borderColorDark=#ff0033 cellPadding=0 width=30 borderColorLight=#ff0033 background=底图[url=http://s6.sinaimg.cn/orignal/5e1a7abfg6ca7a45a2145&amp690]地址[/url]border=5> <TBODY> <TR> <TD> <TABLE height=399 cellPadding=0 width=600 align=center background=移动[url=http://s1.sinaimg.cn/orignal/5e1a7abfg6ca0abcc99a0&ampamp690]地址[/url]1 border=0> <TBODY> <TR> <TD> <DIV align=center> <MARQUEE scrollAmount=4 direction=down width=600 height=399> <MARQUEE scrollAmount=4 direction=up width=600 height=475><IMG style="FILTER: alpha WiDTH: 600pxHEIGHT: 399px" height=399 src="移动地址2" width=600></MARQUEE></MARQUEE></DIV> <P style="MARGIN-TOP: -470pxMARGIN-LEFT: 10px">&nbsp<WBR></P><EMBED style="DISPLAY: block" pluginspage=http://www.macromedia.com/go/getflashplayer src=FLASH地址 width=600 height=399 type=application/x-shockwave-flash ALLOWSCRIPTACCESS="never" ALLOWNETWORKING="internal" QUALITY="high" WMODE="transparent"></EMBED></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></CENTER>

√ 葒塵絕戀℡[em]e257912[/em]

代码 <DIV align=center><EMBED src=动画地址 width=600 height=480 type=application!/x-shockwave-flash allowScriptAccess="never" allowNetworking="internal" wmode="transparent"><P style="MARGIN-TOP: -350pxMARGIN-LEFT: 10px" align=center><IMG style="FILTER: alpha(style=2,opacity=100,,$s:LF> finishopacity=0) WIDTH: 356pxCURSOR: handHEIGHT: 261px" height=280 src="[url=http://img.blog.163.com/photo/Qs3tOAZ2tWU_V81UH2Tpcg==/2019582957898969527.jpg]图片地址[/url]" width=300></P> </DIV> 说明:为了使动画在日志里居中,还可以在所有代码前加<DIV align=center> 在所有代码后加</DIV>

月亮

世界上最永恒的幸福就是平凡,人生中最长久的拥有就是珍惜。我珍惜雨后清新的天空,珍惜人与人之间的真情,珍惜苍天给予我厚爱,珍惜五彩缤纷的世界,更珍惜网络遇见的你。

月亮

世界上最永恒的幸福就是平凡,人生中最长久的拥有就是珍惜。我珍惜雨后清新的天空,珍惜人与人之间的真情,珍惜苍天给予我厚爱,珍惜五彩缤纷的世界,更珍惜网络遇见的你。