『壹』 怎样能制作出雪花飘落的动态效果图片
用flash引导线制作雪花飘落的动画教程
在 Flash 中利用引导线制作雪花飘飘动画。 这种方法最笨但也效果最好,就是用引导线功能,让雪花不停的飘呀飘,如果多用几个图层,效果更好。
1、新建一个flash影片。设背景为“黑色”,其他的用默认值。
2、按ctrl+f8新建一个组件,类型为“影片剪辑”,命名为“雪花”。在它的正中用“铅笔”工具画一个不规则的多边形,然后用“颜料桶工具”将它填上白色。(如图1-1所示)
3、再用ctrl+f8建一个组件,类型为“影片剪辑”,命名为“前层”。
4、将组件“雪花”拖到其中,用“选定工具”中的“比例”功能把它缩小(小技巧:先用“放大镜”将它放大,然后再用“比例”功能,可缩得更小)。在第80帧上“插入关键帧”,在“图层1”上用鼠标右键的“添加引导线”功能(见图1-2)。
在新增加的“引导线:图层1”的第1帧上,从“雪花”开始,画一条弯曲的曲线。将第80帧上的“雪花”沿曲线从头拖到曲线的末尾。然后在“图层1”的第1帧上点鼠标右键,选“创见动画动作”功能,见图1-3。
5、第4步是制作一片雪花,下雪不是只下一片的吧。插入图层,将第4步重复做10次。做好后的效果见图1-4。6、把第3至5步重复做两次,不同之处是组件的命名分别为“中层”和“后层”。“雪花”的大小和“引导线”的路径不要一样。这是为了多做几个图层,看起来效果细腻一点。
7、现在回到场景1中,插入6个图层,分别命名为“后层1”、“后层2”、“中层1”、“中层2”、“中层3”、“中层4”、“前层1”、“前层2”。在对应的层上拖入对应的组件,并适当的调整时间轴,让雪花飘得连贯起来。见图1-5。
按ctrl+enter就可以看到效果了。
(这种方法简单且效果好,主要是用“引导线”功能,让雪花不停的飘下,多用几个图层效果会更好)
『贰』 网页飘雪花的代码是什么
在后台添加js特效可实现这样的效果。
js代码为:
<script language="JavaScript">
<!--
var no = 5; //雪片数目
var speed = 20; //飘动速度。(值越大越慢)
var ns4up = (document.layers) ? 1 : 0; //当前浏览器类型,如果是NS则为1
var ie4up = (document.all) ? 1 : 0; //当前浏览器类型,如果是IE则为1
var s, x, y, sn, cs;
var a, r, cx, cy;
var i, doc_width = 800, doc_height = 600;
x = new Array();
y = new Array();
r = new Array();
cx = new Array();
cy = new Array();
s = 8; //每次下落的高度,越小越平滑,但是也越慢
if (ns4up) { //以NS兼容方式
doc_width = self.innerWidth; //取页面宽度
doc_height = self.innerHeight; //取页面高度
}
else
if (ie4up) { //以IE兼容方式
doc_width = document.body.clientWidth; //取页面宽度
doc_height = document.body.clientHeight; //取页面高度
}
for (i = 0; i < no; ++ i) { //根据前面定义的雪片数目写进相应数目的层
initSnow(); //随机初始化层的坐标
if (ns4up) { //如果浏览器是NS
//用layer作为雪片(星号)的容器
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"red\">");
document.write("*</font></layer>");
}
else
if (ie4up) { //如果浏览器是IE
//用div作为雪片的容器
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"red\">");
document.write("*</font></div>");
}
}
//初始化雪片,生成随机坐标
function initSnow() {
a = 6;
r[i] = 1;
sn = Math.sin(a);
cs = Math.cos(a);
cx[i] = Math.random() * doc_width + 1;
cy[i] = Math.random() * doc_height + 1;
x[i] = r[i] * sn + cx[i];
y[i] = cy[i];
}
//计算雪花位置,从新位置上出现,看起来就像是新产生的一样。
function makeSnow() {
r[i] = 1;
cx[i] = Math.random() * doc_width + 1;
cy[i] = 1;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
//雪花下落的计算
function updateSnow() {
r[i] += s;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
//在NS浏览器上处理雪片下落的主程序
function SnowdropNS() {
for (i = 0; i < no; ++ i) { //依次处理每片雪花
updateSnow(); //下落
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) { //如果超出屏幕范围
makeSnow(); //则调整雪片到新位置上
doc_width = self.innerWidth; //更新页面宽度数据
doc_height = self.innerHeight; //更新页面高度数据
}
document.layers["dot"+i].top = y[i]; //改变层的Y坐标,应用新的位置
document.layers["dot"+i].left = x[i]; //改变层的X坐标,应用新的位置
}
setTimeout("SnowdropNS()", speed);
}
//在IE浏览器上处理雪片下落的主程序
function SnowdropIE() {
for (i = 0; i < no; ++ i) { //依次处理每片雪花
updateSnow(); //下落
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) { //如果超出屏幕范围
makeSnow(); //则调整雪片到新位置上
doc_width = document.body.clientWidth; //更新页面宽度数据
doc_height = document.body.clientHeight; //更新页面高度数据
}
document.all["dot"+i].style.pixelTop = y[i]; //改变层的坐标,应用新的位置
document.all["dot"+i].style.pixelLeft = x[i];
}
setTimeout("SnowdropIE()", speed); //准备下一次下落过程。
}
if (ns4up) { //如果是NS
SnowdropNS(); //调用SnowdropNS使雪片下落
}
else
if (ie4up) { //如果是NS
SnowdropIE(); //调用SnowdropIE使雪片下落
}
-->
</script>
说明:可以根据自己的需求根据说明进行相应参数的修改
『叁』 PS简单教程:制作雪花飘落的动态效果
首先,你要打开photoshop,打开原图。
第二步:新建图层,黑色填充,执行:滤镜>杂色>添加杂色,数量100,高斯分布,单色。
第三步:执行:滤镜>模糊>进一步模糊,图像>调整>色阶,属性值分别设为:104,0.41,187。
第四步:将此图层混合模式设为“滤色”。
第五步:滤镜 >> 模糊 >> 动感模糊,角度-65,距离8。
第六步:复制雪花层,执行:滤镜>像素化>晶格化,数值:12。
第七步:合并两个雪花图层,将此图层混合模式设为“滤色”。
第八步:窗口>时间轴,切换到帧动画模式,复制一帧,将该帧的雪花图层往右下方移动一段距离,使用仿制图章工具,将没有雪花的地方填满。
第九步:选中两个帧,点击”过渡动画帧“,确定完成;点击播放可查看效果,选择文件>导出>存为web所用格式,选择gif格式。
关于PS简单教程:制作雪花飘落的动态效果,青藤小编就和您分享到这里了。如果您对页面排版、网站设计、图像处理等有浓厚的兴趣,希望这篇文章可以对您有所帮助。如果您还想了解更多关于平面设计的素材及技巧等内容,可以点击本站的其他文章进行学习。
以上是小编为大家分享的关于PS简单教程:制作雪花飘落的动态效果的相关内容,更多信息可以关注环球青藤分享更多干货
『肆』 淘宝里首页飘雪花 怎么弄啊 js代码放在哪里啊 本人小白 希望大神详解.....
<div class="J_TWidget" data-widget-config="{'ration':0.1,'activeTriggerCls':'.tshop-psm-shop-ww-hover','interval':0.1,'effect':'scrollx','activeIndex':1,'navCls':'user-crzysj','contentCls':'user-crzysjii','autoplay':true}" data-widget-type="Carousel" style="position:relative;"><ul class="user-crzysjii" style="display: none; width: 999999px; left: 0px; position: absolute;"><li class="-_-switchable-panel-internal535 ks-switchable-panel-internal998" style="width: 475px; height: 800px; display: block; float: left;"> </li></ul><ul class="user-crzysj"><li class="-_-switchable-trigger-internal534 ks-switchable-trigger-internal997 tshop-psm-shop-ww-hover" style="width:475px;height:800px;right:50%;margin-right:505px;"><embed allownetworking="all" allowscriptaccess="never" flashvars="scene=taobao_shop" height="1000" name="flashfirebug_1387778983714" src="http://img1.tbcdn.cn/tfscom/T1lmk2Fk8bXXXtxVjX.swf" type="application/x-shockwave-flash" width="475" wmode="transparent"></li></ul></div><div class="J_TWidget" data-widget-config="{'ration':0.1,'activeTriggerCls':'.tshop-psm-shop-ww-hover','interval':0.1,'effect':'scrollx','activeIndex':1,'navCls':'user-crzysj','contentCls':'user-crzysjii','autoplay':true}" data-widget-type="Carousel" style="position:relative;z-index:99;"><ul class="user-crzysjii" style="display: none; width: 999999px; left: 0px; position: absolute;"><li class="-_-switchable-panel-internal635 ks-switchable-panel-internal1108" style="width: 475px; height: 800px; display: block; float: left;"> </li></ul><ul class="user-crzysj"><li class="-_-switchable-trigger-internal634 ks-switchable-trigger-internal1107 tshop-psm-shop-ww-hover" style="width:475px;height:800px;left:50%;margin-left:505px;"><embed allownetworking="all" allowscriptaccess="never" flashvars="scene=taobao_shop" height="1000" name="flashfirebug_1387778983652" src="http://img1.tbcdn.cn/tfscom/T1lmk2Fk8bXXXtxVjX.swf" type="application/x-shockwave-flash" width="475" wmode="transparent"></li></ul></div>
直接在首页添加个自定义模块 编辑 点两个箭头的那个编辑代码模式 然后复制代码放进去 确定就好!
『伍』 求VB程序设计,有一段雪花飘扬的代码,求添加代码让用户选择往左飘或者往右飘,还有飘雪速度代码。
Private sub form1_load(省略)
Dim i As Integer
For i=0 To 99
Randomize()
s(i)=New snowflakes(Rnd()*Me.width,Rnd()*Me.Height)
Next
End Sub
Private sub timer1_tick(省略)
Me.Refresh()
pen1=New pen(color.white,5)
g=Me.CreateGraphics
For i=0 to 99
g.DrawEllipse(pen1,s(i).x,s(i).y,1,1)
s(i).down(10)
If s(i).x>=Me.width Then
s(i).x=Rnd()*20
End If
If s(i).y>=Me.Height Then
s(i).y=Rnd()*10
End If
『陆』 天猫店铺页面两边动态飘落雪花怎么做的(还有导航)
代码添加的,直接添加到导航下面 <div class="J_TWidget" data-widget-config="{'ration':0.1,'activeTriggerCls':'.tshop-psm-shop-ww-hover','interval':0.1,'effect':'scrollx','activeIndex':1,'navCls':'user-crzysj','contentCls':'user-crzysjii','autoplay':true}" data-widget-type="Carousel" style="position:relative;"> <ul class="user-crzysjii" style="display:none;width:999999px;left:0px;"> <li class="-_-switchable-panel-internal535 ks-switchable-panel-internal998" style="width:475px;height:800px;display:block;float:left;"> </li> </ul> <ul class="user-crzysj"> <li class="-_-switchable-trigger-internal534 ks-switchable-trigger-internal997 " style="width:475px;height:800px;right:50%;margin-right:505px;"> <embed allownetworking="all" allowscriptaccess="never" flashvars="scene=taobao_shop" height="1000" name="flashfirebug_1387778983714" src="http://img1.tbcdn.cn/tfscom/T1lmk2Fk8bXXXtxVjX.swf" type="application/x-shockwave-flash" width="475" wmode="transparent"></embed></li> </ul> </div> <div class="J_TWidget" data-widget-config="{'ration':0.1,'activeTriggerCls':'.tshop-psm-shop-ww-hover','interval':0.1,'effect':'scrollx','activeIndex':1,'navCls':'user-crzysj','contentCls':'user-crzysjii','autoplay':true}" data-widget-type="Carousel" style="position:relative;z-index:99;"> <ul class="user-crzysjii" style="display:none;width:999999px;left:0px;"> <li class="-_-switchable-panel-internal635 ks-switchable-panel-internal1108" style="width:475px;height:800px;display:block;float:left;"> </li> </ul> <ul class="user-crzysj"> <li class="-_-switchable-trigger-internal634 ks-switchable-trigger-internal1107 " style="width:475px;height:800px;left:50%;margin-left:505px;"> <embed allownetworking="all" allowscriptaccess="never" flashvars="scene=taobao_shop" height="1000" name="flashfirebug_1387778983652" src="http://img1.tbcdn.cn/tfscom/T1lmk2Fk8bXXXtxVjX.swf" type="application/x-shockwave-flash" width="475" wmode="transparent"></embed></li> </ul> </div>
『柒』 QQ空间雪花代码
可以通过添加透明flash来达到你要的效果,以下是使用方法和可以引用的透明flash地址(有多个是雪花的效果,可以仔细找下):
日志加透明flash步骤:
1.在日志页面上点击(写日志)
2.点击那个红色图案
3.输入透明Flash地址
4.点自定义、(宽.800.px 高.800.px)
5.点设置为透明背景(Flash需支持)
6.背景位置(left.0.px top.0.px)
以上任何一步不正确都不会被显示
http://imgfree.21cn.com/free/flash/209.swf 红色汽球
http://i39.photobucket.com/albums/e161/haihaiyoyo/-1.swf 小红心组大红心
http://i39.photobucket.com/albums/e161/haihaiyoyo/iloveu.swf我爱你加星光
http://i82.photobucket.com/albums/j257/ayumi_927/True_Star.swf 挂五角星
http://1stblog.cn//swf/trns/001.swf 左右流星
http://1stblog.cn//swf/trns/002.swf 一只蜻蜓
http://imgfree.21cn.com/free/flash/1.swf红色背景白色小流星
http://imgfree.21cn.com/free/flash/2.swf浅绿色背景亮色竖条
http://imgfree.21cn.com/free/flash/3.swf光球光芒时隐时现
http://imgfree.21cn.com/free/flash/4.swf米字星光
http://imgfree.21cn.com/free/flash/5.swf灰色背景米字星光
http://imgfree.21cn.com/free/flash/6.swf灰蓝背景飘落雨滴
http://imgfree.21cn.com/free/flash/7.swf黄色背景飞星闪闪
http://imgfree.21cn.com/free/flash/8.swf青蛙
http://imgfree.21cn.com/free/flash/9.swf蓝色蝴蝶
http://imgfree.21cn.com/free/flash/10.swf竖条箭头
http://imgfree.21cn.com/free/flash/11.swf宽窄竖条
http://imgfree.21cn.com/free/flash/12.swf左右晃动的竖条(宽、窄)
http://imgfree.21cn.com/free/flash/13.swf黑色背景旋转轮盘
http://imgfree.21cn.com/free/flash/14.swf蝌蚪旋转、随鼠标的白色光团
http://imgfree.21cn.com/free/flash/15.swf黑色背景绿色飘带幻影
http://imgfree.21cn.com/free/flash/16.swf黑色背景飞星闪闪
http://imgfree.21cn.com/free/flash/17.swf金鱼
http://imgfree.21cn.com/free/flash/18.swf蓝色背景水平飞镖
http://imgfree.21cn.com/free/flash/19.swf左右晃动的竖条
http://imgfree.21cn.com/free/flash/20.swf黑色背景水平闪动的横条
http://imgfree.21cn.com/free/flash/21.swf黑色背景光晕
http://imgfree.21cn.com/free/flash/22.swf光圈由小变大
http://imgfree.21cn.com/free/flash/23.swf蓝色背景雪花飘飘
http://imgfree.21cn.com/free/flash/24.swf左右闪动的竖条
http://imgfree.21cn.com/free/flash/25.swf三只黑蚂蚁
http://imgfree.21cn.com/free/flash/26.swf左右晃动的黄、绿、蓝竖线
http://imgfree.21cn.com/free/flash/27.swf无色背景水珠
http://imgfree.21cn.com/free/flash/28.swf黑色背景竖条
http://imgfree.21cn.com/free/flash/29.swf圆圈内海浪波动
http://imgfree.21cn.com/free/flash/30.swf黑色背景蓝色梦幻
http://imgfree.21cn.com/free/flash/30.swf黑色背景蓝色梦幻
http://imgfree.21cn.com/free/flash/31.swf黑色背景无数小亮点飘落
http://imgfree.21cn.com/free/flash/32.swf长发女孩
http://imgfree.21cn.com/free/flash/33.swf粉黄色5瓣花飘飘
http://imgfree.21cn.com/free/flash/35.swf小星、大星光晕梦幻
http://imgfree.21cn.com/free/flash/35.swf紫色唇印升腾
http://imgfree.21cn.com/free/flash/36.swf上下闪动的横条
http://imgfree.21cn.com/free/flash/37.swf绿色、黄色的树叶飞舞
http://imgfree.21cn.com/free/flash/38.swf流星飞降
http://imgfree.21cn.com/free/flash/39.swf小+字旋转大光圈
http://imgfree.21cn.com/free/flash/40.swf大、小八瓣雪花飘落
http://imgfree.21cn.com/free/flash/41.swf紫色背景大、小八瓣雪花飘落
http://imgfree.21cn.com/free/flash/42.swf空中飘动的黄球
http://imgfree.21cn.com/free/flash/45.swf两只黄色的蝴蝶在左上角飞舞
http://imgfree.21cn.com/free/flash/46.swf一片浅粉色的云团
http://imgfree.21cn.com/free/flash/47.swf 箭头左右穿梭
http://imgfree.21cn.com/free/flash/48.swf一个光球从右上方慢慢飞入
http://imgfree.21cn.com/free/flash/49.swf飘落的浅粉色花瓣
http://imgfree.21cn.com/free/flash/50.swf晃动的文字“sweet kiss day”
http://imgfree.21cn.com/free/flash/51.swf三只飞舞的蜻蜓、闪闪的星光
http://imgfree.21cn.com/free/flash/52.swf黑色背景飘落的红叶
http://imgfree.21cn.com/free/flash/53.swf雪糕降落
http://imgfree.21cn.com/free/flash/54.swf绿色的心和I love you垂直降落
http://imgfree.21cn.com/free/flash/55.swf两只跳跃的青蛙
http://imgfree.21cn.com/free/flash/56.swf六边形、降落的竖条
http://imgfree.21cn.com/free/flash/57.swf燕鱼和水泡
http://imgfree.21cn.com/free/flash/58.swf光晕、光圈
http://imgfree.21cn.com/free/flash/59.swf天上散绿叶
http://imgfree.21cn.com/free/flash/59.swf蓝色背景飞翔的海鸥
http://imgfree.21cn.com/free/flash/60.swf黑色背景降落的萤火虫
http://imgfree.21cn.com/free/flash/61.swf飞腾的红心
http://imgfree.21cn.com/free/flash/62.swf五彩礼花燃放
http://imgfree.21cn.com/free/flash/63.swf黄色的四瓣花飘落
http://imgfree.21cn.com/free/flash/64.swf浅蓝色的雪花在空中,小雪花降落
http://imgfree.21cn.com/free/flash/65.swf飘落的空心小兰圈
http://imgfree.21cn.com/free/flash/66.swf一只手的图形
http://imgfree.21cn.com/free/flash/67.swf由远而近飞来的流星
http://imgfree.21cn.com/free/flash/68.swf黑色背景飘落的雪花
http://imgfree.21cn.com/free/flash/69.swf七彩光光芒四射(全屏)
http://imgfree.21cn.com/free/flash/70.swf七彩光光芒四射(全屏)
http://imgfree.21cn.com/free/flash/71.swf闪动的小竖条
http://imgfree.21cn.com/free/flash/72.swf一只和平鸽展翅飞舞
http://imgfree.21cn.com/free/flash/73.swf蓝色背景蓝色气泡慢慢升空
http://imgfree.21cn.com/free/flash/74.swf白色背景浅蓝色的气泡慢慢升空
http://imgfree.21cn.com/free/flash/75.swf跟随鼠标游动的七彩光圈
http://imgfree.21cn.com/free/flash/76.swf 线条变形
http://imgfree.21cn.com/free/flash/77.swf蓝色旋转
http://imgfree.21cn.com/free/flash/78.swf跟随鼠标旋转的数字时钟
http://imgfree.21cn.com/free/flash/79.swf鼠标滑过方块图形变换
http://www.12127.net/q-zone/tx/4.swf满天星星
http://www.12127.net/q-zone/tx/5.swf米字星光
http://www.12127.net/q-zone/tx/7.swf大雨点
http://www.12127.net/q-zone/tx/8.swf发散的光
http://www.12127.net/q-zone/tx/9.swf背景光晕
http://www.12127.net/q-zone/tx/21.swf 背景光晕
http://www.12127.net/q-zone/tx/23.swf 蓝色雪花
http://www.12127.net/q-zone/tx/31.swf黑色背景无数小亮点飘落
http://www.12127.net/q-zone/tx/33.swf粉黄色5瓣花飘飘
http://www.12127.net/q-zone/tx/35.swf小星、大星光晕梦幻
http://www.12127.net/q-zone/tx/41.swf紫色背景大、小八瓣雪花飘落
http://www.12127.net/q-zone/tx/42.swf蒲公英
http://www.12127.net/q-zone/tx/46.swf一片浅粉色的云团
http://www.12127.net/q-zone/tx/51.swf三只飞舞的蜻蜓、闪闪的星光
http://www.12127.net/q-zone/tx/52.swf黑色背景飘落的枫叶
http://www.12127.net/q-zone/tx/54.swf绿色的心和I love you垂直降落
http://www.12127.net/q-zone/tx/59.swf蓝色背景飞翔的海鸥
http://www.12127.net/q-zone/tx/61.swf飞腾的红心
http://www.12127.net/q-zone/tx/62.swf五彩礼花燃放
http://www.12127.net/q-zone/tx/64.swf浅蓝色的雪花
http://www.12127.net/q-zone/tx/67.swf由远而近飞来的流星
http://www.12127.net/q-zone/tx/69.swf飞翔的鹰
http://www.12127.net/q-zone/tx/73.swf蓝色背景蓝色气泡慢慢升
http://www.12127.net/q-zone/tx/87.swf跟随鼠标移动的黄色小球
http://www.12127.net/q-zone/tx/69.swf七彩光光芒四射(全屏)
http://www.12127.net/q-zone/tx/82.swf雪花旋舞
http://www.12127.net/q-zone/tx/84.swf闪动的白色圆圈
http://www.12127.net/q-zone/tx/89.swf金光闪闪(中间到四周)
http://www.12127.net/q-zone/tx/92.swf飘舞的七彩丝线
http://www.12127.net/q-zone/tx/93.swf闪电效果
http://www.12127.net/q-zone/tx/95.swf 七彩光8字形旋转
http://www.12127.net/q-zone/tx/97.swf 旋转的花瓣、蝴蝶随鼠标飞舞
http://www.12127.net/q-zone/tx/98.swf 飞旋的七彩光
http://www.12127.net/q-zone/tx/99.swf 白色旋转的花瓣变形
http://www.12127.net/q-zone/tx/100.swf 蓝宝石七彩闪光
http://www.12127.net/q-zone/tx/103.swf 从空特大雨滴
http://www.12127.net/q-zone/tx/mhh.swf 漂亮的玫瑰花从上飘落
http://www.12127.net/q-zone/tx/sh.swf 从上飘落的鲜花和红心
http://imgfree.21cn.com/free/flash/80.swf跟随鼠标的“欢迎下载”及七彩星