仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 770|回复: 8
打印 上一主题 下一主题

[学习教程] 来一发Flash AS实例教程:会眨眼的玉人-Flash actionscript

[复制链接]
小魔女 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-15 20:42:55 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
自从Macromedia在2005年8月发布MacromediaStudio8以来,我们一直在不停地探索关于它的新特性和新功能,因为这次软件升级给我们带来了太多的惊喜。
Poluoluo中心提醒:AS3.0纯剧本画会眨眼的女孩.
来看看会眨眼的玉人:


具体代码:400多行哦,要有耐烦的。
varthAStext:TextField=newTextField();

thAStext.autoSize="left";

thAStext.x=10;

thAStext.y=4;

thAStext.text="2009年9月21日AS3.0实例";

varthAS_fmt:TextFormat=newTextFormat();

thAS_fmt.bold=true;

thAS_fmt.color=0x990000;

thAS_fmt.font="Arial";

thAS_fmt.size=14;

thAStext.setTextFormat(thAS_fmt);

addChild(thAStext);

varemailtext:TextField=newTextField();

emailtext.autoSize="left";

emailtext.x=280;

emailtext.y=375;

emailtext.text="http://bbs.jcwcn.com/forum-93-1.html";

varemail_fmt:TextFormat=newTextFormat();

email_fmt.bold=true;

email_fmt.color=0x990000;

email_fmt.font="Arial";

email_fmt.size=14;

emailtext.setTextFormat(email_fmt);

addChild(emailtext);

varshadow:DropShadowFilter=newDropShadowFilter();

shadow.distance=5;

shadow.angle=45;

shadow.color=0x000066;

varslmtext:TextField=newTextField();

slmtext.autoSize="left";

slmtext.x=110;

slmtext.y=25;

slmtext.text="AS3.0纯剧本画眨眼女孩";

varslm_fmt:TextFormat=newTextFormat();

slm_fmt.bold=true;

slm_fmt.color=0xff0000;

slm_fmt.font="朴直行楷繁体";

slm_fmt.size=30;

slmtext.setTextFormat(slm_fmt);

slmtext.filters=[shadow];

addChild(slmtext);

varmyspe:Sprite=newSprite();

functioneye(){

myspe.graphics.clear();

myspe.graphics.lineStyle(2,0x000000,1);

myspe.graphics.moveTo(133,178);

myspe.graphics.curveTo(116,166,104,183);

myspe.graphics.moveTo(132,181);

myspe.graphics.curveTo(116,169,104,184);

myspe.graphics.moveTo(132,184);

myspe.graphics.curveTo(117,170,104,184);

myspe.graphics.moveTo(128,193);

myspe.graphics.curveTo(119,197,109,193);

myspe.graphics.moveTo(126,179);

myspe.graphics.curveTo(130,191,121,195);

myspe.graphics.moveTo(117,195);

myspe.graphics.curveTo(106,184,116,175);

myspe.graphics.lineStyle(0,0x000000,1);

myspe.graphics.moveTo(115,179);

myspe.graphics.curveTo(118,180,118,183);

myspe.graphics.curveTo(116,185,113,183);

myspe.graphics.curveTo(114,190,119,191);

myspe.graphics.curveTo(125,190,125,185);

myspe.graphics.curveTo(124,177,115,179);

myspe.graphics.lineStyle(2,0x000000,1);

myspe.graphics.moveTo(151,185);

myspe.graphics.curveTo(151,177,160,173);

myspe.graphics.curveTo(168,171,173,176);

myspe.graphics.moveTo(154,180);

myspe.graphics.curveTo(162,170,171,178);

myspe.graphics.moveTo(163,174);

myspe.graphics.curveTo(170,175,170,182);

myspe.graphics.moveTo(155,192);

myspe.graphics.curveTo(163,195,167,191);

myspe.graphics.moveTo(160,175);

myspe.graphics.curveTo(153,181,155,189);

myspe.graphics.curveTo(157,192,161,192);

myspe.graphics.curveTo(171,188,163,176);

myspe.graphics.lineStyle(0,0x000000,1);

myspe.graphics.moveTo(160,180);

myspe.graphics.curveTo(162,182,161,183);

myspe.graphics.curveTo(159,184,158,182);

myspe.graphics.curveTo(156,187,160,189);

myspe.graphics.curveTo(164,189,164,185);

myspe.graphics.curveTo(164,180,160,180);

addChild(myspe);

}

eye();

functioneyeB(){

myspe.graphics.clear();

myspe.graphics.lineStyle(3,0x000000,1);

myspe.graphics.moveTo(133,185);

myspe.graphics.curveTo(126,176,104,183);

myspe.graphics.moveTo(128,186);

myspe.graphics.curveTo(119,187,109,186);

myspe.graphics.lineStyle(3,0x000000,1);

myspe.graphics.moveTo(151,185);

myspe.graphics.curveTo(161,177,173,186);

myspe.graphics.moveTo(155,187);

myspe.graphics.curveTo(163,188,168,187);

addChild(myspe);

}

addEventListener(Event.ENTER_FRAME,ey);

vari:uint=0;

functioney(ev:Event){

i<1000?i++:i=0;

if(i%25<3){

eyeB();

}else{

eye();

}

}

varmysp:Sprite=newSprite();

mysp.graphics.lineStyle(0,0x000000,1);

mysp.graphics.beginFill(0x000000,1);

mysp.graphics.moveTo(138,164);

mysp.graphics.curveTo(119,160,98,165);

mysp.graphics.curveTo(120,155,138,164);

mysp.graphics.moveTo(156,166);

mysp.graphics.curveTo(166,162,174,164);

mysp.graphics.lineTo(174,161);

mysp.graphics.curveTo(164,160,156,166);

mysp.graphics.endFill();

mysp.graphics.lineStyle(2,0xcc6600,1);

mysp.graphics.moveTo(148,185);

mysp.graphics.curveTo(147,195,153,203);

mysp.graphics.curveTo(147,207,147,209);

mysp.graphics.moveTo(130,219);

mysp.graphics.lineTo(152,218);

mysp.graphics.lineStyle(3,0xcc6600,0.4);

mysp.graphics.moveTo(133,225);

mysp.graphics.lineTo(143,225);

mysp.graphics.lineStyle(1,0xcc6600,1);

mysp.graphics.moveTo(174,145);

mysp.graphics.curveTo(176,157,175,172);

mysp.graphics.curveTo(173,181,172,186);

mysp.graphics.lineTo(169,212);

mysp.graphics.curveTo(169,217,164,224);

mysp.graphics.lineTo(148,242);

mysp.graphics.curveTo(144,246,135,246);

mysp.graphics.curveTo(112,242,96,230);

mysp.graphics.moveTo(71,168);

mysp.graphics.curveTo(68,164,63,164);

mysp.graphics.curveTo(58,164,55,172);

mysp.graphics.curveTo(56,191,68,204);

mysp.graphics.lineTo(74,206);

mysp.graphics.lineStyle(1,0xcc6600,0.6);

mysp.graphics.moveTo(70,174);

mysp.graphics.curveTo(67,170,63,169);

mysp.graphics.curveTo(54,174,62,185);

mysp.graphics.curveTo(68,200,72,192);

mysp.graphics.moveTo(71,180);

mysp.graphics.curveTo(71,177,68,177);

mysp.graphics.curveTo(65,177,65,180);

mysp.graphics.curveTo(66,185,64,189);

mysp.graphics.curveTo(70,200,72,189);

mysp.graphics.curveTo(67,184,71,181);

mysp.graphics.lineStyle(1,0xffcc00,1);

mysp.graphics.moveTo(47,151);

mysp.graphics.curveTo(55,93,113,85);

mysp.graphics.lineTo(115,87);

mysp.graphics.lineTo(116,85);

mysp.graphics.curveTo(170,92,195,130);

mysp.graphics.curveTo(207,158,194,164);

mysp.graphics.curveTo(207,152,185,123);

mysp.graphics.curveTo(203,150,189,169);

mysp.graphics.curveTo(193,150,186,138);

mysp.graphics.curveTo(197,169,179,179);

mysp.graphics.curveTo(190,174,184,145);

mysp.graphics.moveTo(176,127);

mysp.graphics.curveTo(190,165,178,174);

mysp.graphics.curveTo(184,159,178,137);

mysp.graphics.curveTo(182,156,173,169);

mysp.graphics.curveTo(179,155,175,139);

mysp.graphics.moveTo(171,123);

mysp.graphics.curveTo(181,153,164,167);

mysp.graphics.curveTo(176,146,168,127);

mysp.graphics.curveTo(175,149,159,160);

mysp.graphics.curveTo(171,141,166,129);

mysp.graphics.moveTo(161,113);

mysp.graphics.curveTo(175,141,144,164);

mysp.graphics.curveTo(161,151,161,128);

mysp.graphics.moveTo(158,127);

mysp.graphics.curveTo(159,151,143,164);

mysp.graphics.curveTo(157,147,155,119);

mysp.graphics.curveTo(152,144,120,157);

mysp.graphics.curveTo(157,136,152,106);

mysp.graphics.moveTo(150,115);

mysp.graphics.curveTo(146,139,130,150);

mysp.graphics.curveTo(140,140,147,117);

mysp.graphics.curveTo(132,149,113,153);

mysp.graphics.moveTo(145,121);

mysp.graphics.curveTo(139,132,126,141);

mysp.graphics.curveTo(116,154,97,160);

mysp.graphics.moveTo(118,141);

mysp.graphics.curveTo(103,156,98,156);

mysp.graphics.moveTo(118,141);

mysp.graphics.curveTo(105,149,98,155);

mysp.graphics.curveTo(87,162,70,163);

mysp.graphics.moveTo(101,156);

mysp.graphics.curveTo(94,163,72,163);

mysp.graphics.moveTo(71,164);

mysp.graphics.curveTo(72,222,105,318);

mysp.graphics.moveTo(74,164);

mysp.graphics.curveTo(74,185,78,205);

mysp.graphics.moveTo(77,164);

mysp.graphics.curveTo(75,194,88,241);

mysp.graphics.moveTo(80,165);

mysp.graphics.curveTo(90,245,101,292);

mysp.graphics.moveTo(72,187);

mysp.graphics.curveTo(73,225,80,250);

mysp.graphics.moveTo(82,165);

mysp.graphics.curveTo(82,210,103,259);

mysp.graphics.moveTo(85,164);

mysp.graphics.lineTo(84,193);

mysp.graphics.moveTo(90,162);

mysp.graphics.lineTo(85,171);

mysp.graphics.moveTo(95,162);

mysp.graphics.lineTo(84,177);

mysp.graphics.moveTo(172,183);

mysp.graphics.curveTo(180,247,187,263);

mysp.graphics.curveTo(200,294,195,334);

mysp.graphics.moveTo(171,200);

mysp.graphics.curveTo(174,230,182,258);

mysp.graphics.moveTo(171,212);

mysp.graphics.curveTo(170,226,183,274);

mysp.graphics.curveTo(196,314,190,331);

mysp.graphics.moveTo(168,219);

mysp.graphics.curveTo(168,234,176,263);

mysp.graphics.moveTo(165,224);

mysp.graphics.lineTo(168,242);

mysp.graphics.moveTo(163,227);

mysp.graphics.curveTo(161,251,184,296);

mysp.graphics.moveTo(166,240);

mysp.graphics.curveTo(170,253,171,268);

mysp.graphics.moveTo(173,261);

mysp.graphics.curveTo(175,272,180,281);

mysp.graphics.curveTo(188,295,189,330);

mysp.graphics.lineStyle(2,0xff0000,1);

mysp.graphics.moveTo(68,165);

mysp.graphics.lineTo(75,154);

mysp.graphics.curveTo(68,155,62,150);

mysp.graphics.curveTo(60,150,55,154);

mysp.graphics.lineTo(50,155);

mysp.graphics.lineTo(46,163);

mysp.graphics.curveTo(49,163,50,161);

mysp.graphics.curveTo(55,162,57,166);

mysp.graphics.curveTo(62,162,68,165);

mysp.graphics.moveTo(47,159);

mysp.graphics.lineTo(58,159);

mysp.graphics.curveTo(58,156,55,157);

mysp.graphics.moveTo(44,154);

mysp.graphics.lineTo(39,148);

mysp.graphics.lineTo(18,153);

mysp.graphics.curveTo(20,160,14,167);

mysp.graphics.lineTo(30,161);

mysp.graphics.curveTo(38,164,43,163);

mysp.graphics.curveTo(40,156,44,154);

mysp.graphics.moveTo(42,157);

mysp.graphics.lineTo(36,159);

mysp.graphics.lineTo(30,157);

mysp.graphics.moveTo(44,154);

mysp.graphics.curveTo(50,150,52,153);

mysp.graphics.moveTo(44,164);

mysp.graphics.curveTo(38,167,32,166);

mysp.graphics.lineTo(22,170);

mysp.graphics.lineTo(14,170);

mysp.graphics.lineTo(4,177);

mysp.graphics.curveTo(15,179,13,191);

mysp.graphics.curveTo(22,173,43,166);

mysp.graphics.curveTo(53,182,41,203);

mysp.graphics.curveTo(53,195,62,209);

mysp.graphics.lineTo(61,196);

mysp.graphics.moveTo(57,168);

mysp.graphics.curveTo(50,169,48,163);

mysp.graphics.lineStyle(1,0x9900ff,1);

mysp.graphics.moveTo(31,171);

mysp.graphics.curveTo(13,201,21,210);

mysp.graphics.moveTo(37,168);

mysp.graphics.curveTo(15,204,24,214);

mysp.graphics.moveTo(31,187);

mysp.graphics.curveTo(20,213,31,218);

mysp.graphics.moveTo(35,195);

mysp.graphics.curveTo(27,225,37,224);

mysp.graphics.moveTo(34,206);

mysp.graphics.curveTo(35,224,40,222);

mysp.graphics.moveTo(44,167);

mysp.graphics.curveTo(33,221,44,225);

mysp.graphics.moveTo(41,209);

mysp.graphics.curveTo(42,228,52,228);

mysp.graphics.moveTo(47,199);

mysp.graphics.curveTo(43,228,57,227);

mysp.graphics.moveTo(49,199);

mysp.graphics.curveTo(50,226,60,228);

mysp.graphics.curveTo(71,227,66,202);

mysp.graphics.moveTo(64,200);

mysp.graphics.curveTo(62,244,54,201);

mysp.graphics.curveTo(61,240,60,204);

mysp.graphics.lineStyle(2,0xff0000,1);

mysp.graphics.moveTo(189,169);

mysp.graphics.curveTo(192,166,195,169);

mysp.graphics.curveTo(199,174,206,176);

mysp.graphics.curveTo(196,181,196,191);

mysp.graphics.curveTo(190,178,181,179);

mysp.graphics.curveTo(188,182,188,186);

mysp.graphics.curveTo(189,189,194,188);

mysp.graphics.moveTo(187,173);

mysp.graphics.lineTo(193,175);

mysp.graphics.moveTo(197,184);

mysp.graphics.lineTo(208,189);

mysp.graphics.lineTo(204,193);

mysp.graphics.curveTo(199,190,189,205);

mysp.graphics.curveTo(188,192,184,190);

mysp.graphics.curveTo(182,189,182,183);

mysp.graphics.curveTo(179,182,180,179);

mysp.graphics.lineStyle(1,0x9900ff,1);

mysp.graphics.moveTo(198,193);

mysp.graphics.curveTo(207,207,193,216);

mysp.graphics.moveTo(194,203);

mysp.graphics.curveTo(195,215,188,221);

mysp.graphics.moveTo(189,204);

mysp.graphics.curveTo(192,214,186,225);

mysp.graphics.curveTo(183,227,178,224);

mysp.graphics.moveTo(180,181);

mysp.graphics.curveTo(178,186,181,191);

mysp.graphics.curveTo(187,210,182,224);

mysp.graphics.moveTo(177,181);

mysp.graphics.curveTo(176,189,180,198);

mysp.graphics.curveTo(186,213,179,223);

mysp.graphics.moveTo(181,202);

mysp.graphics.curveTo(181,219,177,218);

mysp.graphics.moveTo(176,182);

mysp.graphics.curveTo(178,199,174,205);

mysp.graphics.lineStyle(2,0x000000,1);

mysp.graphics.moveTo(80,248);

mysp.graphics.curveTo(74,248,79,253);

mysp.graphics.lineTo(79,259);

mysp.graphics.lineTo(85,265);

mysp.graphics.moveTo(103,293);

mysp.graphics.curveTo(113,319,123,335);

mysp.graphics.moveTo(76,249);

mysp.graphics.curveTo(76,259,70,263);

mysp.graphics.curveTo(84,271,90,283);

mysp.graphics.moveTo(106,318);

mysp.graphics.lineTo(112,336);

mysp.graphics.moveTo(69,263);

mysp.graphics.curveTo(29,284,29,295);

mysp.graphics.curveTo(18,331,16,372);

mysp.graphics.curveTo(33,377,55,374);

mysp.graphics.curveTo(56,369,68,369);

mysp.graphics.curveTo(73,375,65,377);

mysp.graphics.moveTo(47,292);

mysp.graphics.curveTo(56,312,69,329);

mysp.graphics.curveTo(63,334,63,340);

mysp.graphics.moveTo(57,312);

mysp.graphics.curveTo(60,339,69,356);

mysp.graphics.lineTo(67,358);

mysp.graphics.moveTo(65,353);

mysp.graphics.lineTo(69,370);

mysp.graphics.lineStyle(1,0x000000,1);

mysp.graphics.moveTo(18,363);

mysp.graphics.curveTo(40,367,48,365);

mysp.graphics.curveTo(55,359,66,360);

mysp.graphics.moveTo(19,374);

mysp.graphics.curveTo(18,387,20,400);

mysp.graphics.moveTo(64,370);

mysp.graphics.curveTo(65,388,67,400);

mysp.graphics.moveTo(83,255);

mysp.graphics.curveTo(83,260,80,261);

mysp.graphics.moveTo(137,248);

mysp.graphics.curveTo(137,259,139,269);

mysp.graphics.moveTo(138,263);

mysp.graphics.curveTo(142,267,148,268);

mysp.graphics.lineStyle(2,0x000000,1);

mysp.graphics.moveTo(138,254);

mysp.graphics.curveTo(156,263,157,310);

mysp.graphics.curveTo(161,327,162,335);

mysp.graphics.moveTo(141,258);

mysp.graphics.curveTo(156,270,173,273);

mysp.graphics.moveTo(159,269);

mysp.graphics.curveTo(168,289,166,314);

mysp.graphics.curveTo(167,328,169,336);

mysp.graphics.moveTo(193,287);

mysp.graphics.lineTo(202,298);

mysp.graphics.curveTo(208,336,222,365);

mysp.graphics.lineTo(215,373);

mysp.graphics.lineTo(213,374);

mysp.graphics.lineTo(195,371);

mysp.graphics.moveTo(186,307);

mysp.graphics.curveTo(181,333,185,337);

mysp.graphics.lineTo(186,342);

mysp.graphics.moveTo(63,344);

mysp.graphics.curveTo(72,338,84,337);

mysp.graphics.curveTo(103,338,140,335);

mysp.graphics.curveTo(170,335,190,347);

mysp.graphics.lineTo(187,353);

mysp.graphics.moveTo(183,346);

mysp.graphics.curveTo(205,368,185,396);

mysp.graphics.lineStyle(1,0x000000,1);

mysp.graphics.moveTo(213,373);

mysp.graphics.lineTo(213,400);

mysp.graphics.lineStyle(2,0xcc6633,0.6);

mysp.graphics.moveTo(136,329);

mysp.graphics.curveTo(136,331,139,335);

mysp.graphics.moveTo(131,324);

mysp.graphics.curveTo(132,325,136,329);

mysp.graphics.moveTo(139,324);

mysp.graphics.curveTo(138,325,136,329);

mysp.graphics.lineStyle(4,0xcc6600,0.2);

mysp.graphics.moveTo(131,284);

mysp.graphics.curveTo(141,280,151,282);

mysp.graphics.moveTo(119,284);

mysp.graphics.curveTo(109,280,100,284);

mysp.graphics.moveTo(123,280);

mysp.graphics.curveTo(126,282,128,279);

mysp.graphics.lineStyle(7,0x000000,0.1);

mysp.graphics.moveTo(79,343);

mysp.graphics.curveTo(90,339,101,341);

mysp.graphics.lineTo(155,341);

mysp.graphics.curveTo(167,339,184,349);

mysp.graphics.moveTo(72,396);

mysp.graphics.curveTo(128,389,180,397);

mysp.graphics.lineStyle(2,0xff9933,0.2);

mysp.graphics.moveTo(132,93);

mysp.graphics.curveTo(144,95,152,105);

addChild(mysp);源文件下载:会眨眼的玉人.rar
Flash8支持一种新的编码格式(On2的VP6),这种编码格式与Flash7的视频编码格式相比,有了很大的提高。
若天明 该用户已被删除
9#
发表于 2015-3-22 04:41:59 | 只看该作者
FLASH动画在如今的很多网站中都比较常见,其所独有的视觉效果和感染力成为各行各业宣传企业形象、推广产品的最佳平台。
柔情似水 该用户已被删除
8#
发表于 2015-3-15 20:25:26 | 只看该作者
flash制作的动画文件比较小,可以在网络上快速传播!
活着的死人 该用户已被删除
7#
发表于 2015-3-7 23:35:56 | 只看该作者
时间期限本身就是一个优点,因为它可以让你确定一个祯率。电视每秒刷新屏幕30次,电影每秒刷新屏幕24次。Flash的祯率是可变的。
小女巫 该用户已被删除
6#
发表于 2015-2-25 14:54:27 | 只看该作者
flash的流行因素包括了技术上的优势——技术本身的优势;技术掌握上的优势;其他技术的弱势;
简单生活 该用户已被删除
5#
发表于 2015-2-8 11:21:24 | 只看该作者
在网络营销中所提供的利益。如果我们仔细看看国内外的专业网站,很少看到应用FLASH格式的广告,如网络上的知名网站。相信它们并不缺乏FLASH图片的制作力量。
莫相离 该用户已被删除
地板
发表于 2015-2-2 21:59:49 | 只看该作者
单纯的做动画而言,flash动画与传统动画有很多差别,这里会为你介绍什么是flash与flash与传统动画相比具有的优点和缺点,而进一步了解flash动画
愤怒的大鸟 该用户已被删除
板凳
发表于 2015-1-25 10:38:05 | 只看该作者
不能制作色彩丰富变化的图像,核心竞争力小,而且有一定的局限性。要想制作优秀的动画,就要充分了解软件的优点和缺陷。
蒙在股里 该用户已被删除
沙发
发表于 2015-1-17 13:55:35 | 只看该作者
没有安装FLASH插件的前提下,无法正常显示广告效果。根据调查显示,有3%的互联网用户没有安装shockwaveFlash。虽然比例不大,但不能因为这样一个简单的原因而拒绝这些用户。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-12-24 01:25

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表