妞妞哒 2008-3-9 11:52
我只知道我不能发贴,帅哥`想问个问题
几年前很流行的一个视频动画,歌好象是“心如刀割”
内容是说一个男子自杀了,给他心爱的女子打了电话`
那个FIASH叫什么名字 你还记得吗?
仿制造 2008-3-9 12:19
回复 1# 的帖子
做的不错,支持一下:victory:
CkzyFla 2008-3-9 14:16
做得不错,可分享一下源文件吗?:handshake 先谢了。
a155146074 2008-3-9 14:39
努力加油!!!
努力加油!!!
高原红 2008-3-9 23:52
function Pass(id)
{
_root.createEmptyMovieClip("mask", -1);
_root.createEmptyMovieClip("pic_new", -2);
_root.createEmptyMovieClip("pic_old", -3);
old_p = picA.pop();
picA.push("pic" + id);
pic_old.attachMovie(old_p, old_p, 1);
pic_new.attachMovie("pic" + id, pic, 1);
PassEffect(pic_new, mask);
} // End of the function
function PassEffect(pic, mask)
{
pic.setMask(mask);
switch (Math.floor(Math.random() * 7))
{
case 0:
{
for (i = 0; i < 7; i++)
{
for (j = 0; j < 6; j++)
{
var _l2 = mask.attachMovie("Cir", "Cir" + i * 10 + j, i * 10 + j);
Size_set(_l2, 20, 20);
_l2._x = 20 + i * 60;
_l2._y = 20 + j * 60;
_l2.onEnterFrame = function ()
{
if (this._width < 180)
{
this._width = this._height = this._height + 5;
}
else
{
delete this["onEnterFrame"];
} // end if
};
} // end of for
} // end of for
break;
}
case 1:
{
_l2 = mask.attachMovie("Rec", Rec, 1);
Size_set(_l2, Stage.width / 10, Stage.height / 10);
_l2._x = Stage.width / 2;
_l2._y = Stage.height / 2;
_l2.onEnterFrame = function ()
{
if (Stage.width > this._width)
{
this._width = this._width + (Stage.width - this._width) * 0.300000;
this._height = this._height + (Stage.height - this._height) * 0.300000;
}
else
{
delete this["onEnterFrame"];
} // end if
};
break;
}
case 2:
{
_l2 = mask.attachMovie("Rec", "Rec1", 1);
Size_set(_l2, Stage.width + 10, Stage.height + 10);
_l2._x = -_l2._width;
_l2._y = -_l2._height;
_l2.onEnterFrame = function ()
{
this._x = this._x + (Stage.width / 2 - this._x) * 0.300000;
this._y = this._y + (Stage.height / 2 - this._y) * 0.300000;
};
break;
}
case 3:
{
_l2 = mask.attachMovie("Rec", "Rec1", 1);
Size_set(_l2, Stage.width, Stage.height + 10);
_l2._x = -_l2._width / 2;
_l2._y = Stage.height / 2;
_l2.onEnterFrame = function ()
{
if (Stage.width / 2 > this._x)
{
this._x = this._x + 15;
}
else
{
delete this["onEnterFrame"];
} // end if
};
_l2 = mask.attachMovie("Rec", "Rec2", 2);
Size_set(_l2, Stage.width, Stage.height + 10);
_l2._x = Stage.width + _l2._width / 2;
_l2._y = Stage.height / 2;
_l2.onEnterFrame = function ()
{
if (this._x > 0)
{
this._x = this._x - 15;
}
else
{
delete this["onEnterFrame"];
} // end if
};
break;
}
case 4:
{
if (Math.random() <= 0.500000)
{
var _l4 = 45;
}
else
{
_l4 = -45;
} // end if
(i = -10, j = 0);
while (i < 30)
{
_l2 = mask.attachMovie("Rec", "Rec" + j, j);
Size_set(_l2, 0, Stage.height * 2);
_l2._x = _l2._width / 2 + i * 20;
_l2._y = Stage.height / 2;
_l2._rotation = _l4;
_l2.delay = j;
_l2.dt = 0;
_l2.onEnterFrame = function ()
{
if (this.dt < this.delay)
{
this.dt = this.dt + 3;
}
else if (this._xscale < 30)
{
this._xscale = this._xscale + 2;
}
else
{
delete this["onEnterFrame"];
} // end if
};
i++;
j++;
} // end while
break;
}
case 5:
{
if (Math.random() <= 0.500000)
{
for (i = 0; i < 45; i++)
{
_l2 = mask.attachMovie("Rec", "Rec" + i, i);
Size_set(_l2, 0, Stage.height + 10);
_l2._x = i * 10;
_l2._y = Stage.height / 2;
_l2.delay = i;
_l2.dt = 0;
_l2.onEnterFrame = function ()
{
if (this.dt < this.delay)
{
this.dt = this.dt + 3;
}
else if (this._xscale < 30)
{
this._xscale = this._xscale + 2;
}
else
{
delete this["onEnterFrame"];
} // end if
};
} // end of for
}
else
{
for (i = 0; i < 30; i++)
{
_l2 = mask.attachMovie("Rec", "Rec" + i, i);
Size_set(_l2, Stage.width + 10, 0);
_l2._x = Stage.width / 2;
_l2._y = i * 10;
_l2.delay = i;
_l2.dt = 0;
_l2.onEnterFrame = function ()
{
if (this.dt < this.delay)
{
this.dt = this.dt + 3;
}
else if (this._yscale < 30)
{
this._yscale = this._yscale + 2;
}
else
{
delete this["onEnterFrame"];
} // end if
};
} // end of for
} // end if
break;
}
case 6:
{
for (i = 0; i < 45; i++)
{
_l2 = mask.attachMovie("Rec", "Rec" + i, i);
Size_set(_l2, 10, Stage.height + 50);
_l2._x = _l2._width / 2 + i * _l2._width;
_l2._y = -_l2._height + Math.random() * 50;
_l2.onEnterFrame = function ()
{
if (Stage.height / 2 > this._y)
{
this._y = this._y + 20;
}
else
{
delete this["onEnterFrame"];
} // end if
};
} // end of for
}
} // End of switch
} // End of the function
function Size_set(obj, w, h)
{
obj._width = w;
obj._height = h;
} // End of the function
function wang()
{
if (time >= 0)
{
time--;
}
else
{
if (_root.code < 5)
{
_root.code++;
}
else
{
_root.code = 1;
} // end if
Pass(_root.code);
time = tn;
} // end if
} // End of the function
getURL("FSCommand:allowscale", false);
_root.createEmptyMovieClip("bg_mc", 1);
var bg = bg_mc.attachMovie("bg", bg, 1);
bg._y = Stage.height - bg._height;
bg._x = Stage.width - bg._width;
_root.createEmptyMovieClip("my_mc", 2);
var lmc = my_mc.attachMovie("mc", mc, 1);
lmc._y = Stage.height - lmc._height;
lmc._x = old_x = Stage.width - 150;
_root.createEmptyMovieClip("btn_mc", 3);
var i = 1;
while (i <= 5)
{
var btn = _root.btn_mc.attachMovie("btn", "btn" + i, i);
btn.bb = i;
btn.txt.text = i;
btn._y = Stage.height - btn._height;
btn._x = Stage.width - (6 - i) * btn._width;
btn.onRelease = function ()
{
_root.code = this._name.charAt(this._name.length - 1);
Pass(_root.code);
time = tn;
};
btn.onRollOver = function ()
{
this.gotoAndStop(2);
};
btn.onRollOut = function ()
{
this.gotoAndStop(1);
};
btn.onEnterFrame = function ()
{
if (this.bb == _root.code)
{
this.gotoAndStop(2);
}
else
{
this.gotoAndStop(1);
} // end if
};
i++;
} // end while
_root.createEmptyMovieClip("line_mc", 4);
with (line_mc)
{
moveTo(0, 0);
lineStyle(3, 3355409, 100);
lineTo(Stage.width, 0);
lineTo(Stage.width, Stage.height);
lineTo(0, Stage.height);
lineTo(0, 0);
} // End of with
var picA = new Array("pic1");
_root.attachMovie("pic1", pic, -3);
var tn = 20;
var time = tn;
_root.code = 1;
var num = setInterval(wang, 100);
edhope 2008-3-23 23:13
新手,俺发不了贴,在这问问了!
flash编导入图片程序,如何实现图片渐隐导入啊.我会让它渐隐unload,但不知如何渐隐load,大侠们,赐教赐教吧!!!
豚豚 2008-3-24 11:12
新注册的用户啥时能发贴呢?
强烈喜欢自己能发帖。。。。
chengkehan 2008-3-24 12:55
:) :) :)
ysl314 2008-4-17 15:49
做不出你哪种效果
我照你写的教程,怎么做不出,你哪种效果呀,
请问,有哪个愿意帮助呀:hug:
gdpyzxh 2008-4-17 18:31
请教
做的不错,:lol
我是as盲,现有几个问题请教:
①怎样加图片?
②怎样改变播放速度?(不是指改变帧频)
③怎样在全屏后图片也占满整个屏幕?
谢谢!
gdpyzxh 2008-4-17 18:32
回复 1# 的帖子
做的不错,:lol
我是as盲,现有几个问题请教:
①怎样加图片?
②怎样改变播放速度?(不是指改变帧频)
③怎样在全屏后图片也占满整个屏幕?
谢谢!
相当凑合 2008-4-18 09:14
[quote]原帖由 [i]gdpyzxh[/i] 于 2008-4-17 18:31 发表 [url=http://space.flash8.net/bbs/redirect.php?goto=findpost&pid=2156764&ptid=351063][img]http://space.flash8.net/bbs/images/common/back.gif[/img][/url]
做的不错,:lol
我是as盲,现有几个问题请教:
①怎样加图片?
②怎样改变播放速度?(不是指改变帧频)
③怎样在全屏后图片也占满整个屏幕?
谢谢! [/quote]
1、加图片:我是把图片转换为影片剪辑后,右击设为第一帧导出。
2、改速度:在代码的后面部分有个:
[quote]function wang() {
if (time >= 0) {
time--;
} else {
if (_root.code < 5) {
_root.code++;
} else {
_root.code = 1;
}
Pass(_root.code);
time = tn;
}
}
//-------------------------------------------------------------------------------------------------------------
var picA = new Array("pic1");
_root.attachMovie("pic1", pic, -3);
var tn = 20;
var time = tn;
_root.code = 1;
var num = setInterval(wang, 100);
[/quote]
可以通过改变tn值和 setInterval(wang, 100)中的数值来达到控制速度。
3、全屏:我在第一句加了:fscommand("allowcale",false),去掉这一句就可以缩放了。
gdpyzxh 2008-4-18 15:41
回复 18# 的帖子
谢谢你的无私指导!:lol :victory:
狐朋狗友 2008-5-16 21:45
可能去掉那个边框的吗???
怎么才能去掉那边框???
麻烦你们为小弟解答了。。
yanyan198623 2008-5-17 15:50
MS很长的代码
头晕
狐朋狗友 2008-5-20 10:14
哦野,搞定了。。。!!!!
不过楼主,你那切换第4个效果,也就是45度斜角切换那一效果在运行时有时会发生一些小错误,就是运行时有时会卡住留有一角在那,不大,但很不美观。。。
各路英雄一起帮忙解决这问题吧。。。
感激。。!!!
zhengzhou813 2008-5-23 11:44
一般一般!
我菜我了 2008-7-5 17:29
这么多代码..........
头都看昏了
好象就是利用遮障做吧
然后随机绘制动画 把动画图层作为遮障...
不要这么多代码 定义这么多函数吧.........
个人想法~~
我好菜.....
我爱摇啊摇 2008-7-5 22:38
好些条代码看不懂,我自己琢磨了下,
先建立3个空mc 从上到下依次是mask,newpic,oldpic
在newpic上建立一个空mc,newpic1
然后在newpic1加载图片1,mask加载遮罩图形(很大,就是说newpic上的图片完全显示)
用mask遮罩newpic
oldpic上加载图片2
mask上的图形渐渐变小(就是说newpic上的图片被慢慢盖住,显示出oldpic上的图片)
在newpic1上加载图片3
mask加载图形(很小,0,0)
mask上的图形渐渐变大(显示newpic上的图片)
如此循环,以至无穷......
不过我看上面的代码上mask上的图形都是从小变大……请高手指点……