欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Flash AS实例教程 会眨眼的美女

程序员文章站 2022-04-08 19:48:51
AS3.0纯脚本画会眨眼的女孩.... 09-11-03...


详细代码:400多行哦,要有耐心的。

复制代码
代码如下:

var thastext:textfield =new textfield();
thastext.autosize="left";
thastext.x=10;
thastext.y=4;
thastext.text="2009年9月21日 as3.0实例";
var thas_fmt:textformat =new textformat();
thas_fmt.bold=true;
thas_fmt.color=0x990000;
thas_fmt.font="arial";
thas_fmt.size=14;
thastext.settextformat(thas_fmt);
addchild(thastext);
var emailtext:textfield =new textfield();
emailtext.autosize="left";
emailtext.x=280;
emailtext.y=375;
emailtext.text="https://www.jb51.net";
var email_fmt:textformat =new textformat();
email_fmt.bold=true;
email_fmt.color=0x990000;
email_fmt.font="arial";
email_fmt.size=14;
emailtext.settextformat(email_fmt);
addchild(emailtext);
var shadow:dropshadowfilter = new dropshadowfilter();
shadow.distance=5;
shadow.angle=45;
shadow.color=0x000066;
var slmtext:textfield =new textfield();
slmtext.autosize="left";
slmtext.x=110;
slmtext.y=25;
slmtext.text="as3.0纯脚本画眨眼女孩";
var slm_fmt:textformat =new textformat();
slm_fmt.bold=true;
slm_fmt.color=0xff0000;
slm_fmt.font="方正行楷繁体";
slm_fmt.size=30;
slmtext.settextformat(slm_fmt);
slmtext.filters=[shadow];
addchild(slmtext);
var myspe:sprite =new sprite();
function eye() {
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();
function eyeb() {
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);
var i:uint=0;
function ey(ev:event) {
i<1000?i++:i=0;
if (i%25<3) {
eyeb();
} else {
eye();
}
}
var mysp:sprite =new sprite();
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);

源文件下载: