由于本BLOG老遭到广告骚扰,特关闭游客发表权限,谢谢各位支持
Jan
29
1,网站设计
2,后台管理制作
3,flash动画设计
4,个性blog美化
5,空间域名服务
6,其他技术咨询
价格绝对公道,实惠,也可以自己报价,不满意不收任何费用
也接受网页切割和flash广告制作等其他服务
联系方式QQ:21926324(验证请说明:需要服务)
(注:有事可以在这里留言或者QQ留言,本人每天都会上线回复)
2,后台管理制作
3,flash动画设计
4,个性blog美化
5,空间域名服务
6,其他技术咨询
价格绝对公道,实惠,也可以自己报价,不满意不收任何费用
也接受网页切割和flash广告制作等其他服务
联系方式QQ:21926324(验证请说明:需要服务)
(注:有事可以在这里留言或者QQ留言,本人每天都会上线回复)
Jul
27
转载请注明作者:刘常(琴者qinz)
[准备]
1、新建文件夹,放几张大图,宽320高240,名为d1.jpg、d2.jpg、d3.jpg、d4.jpg,相应的小图,名为x1.jpg、x2.jpg、x3.jpg、x4.jpg,宽80高40。
2、新建FLASH文件,保存在同文件夹下。
[步骤]
1、导入上面缩略图到FLASH中,转为影片剪辑,在主场景中的实例名分别为xtp1_mc、xtp2_mc、xtp3_mc、xtp4_mc。
2、画一矩形,宽320高240,转为影片剪辑,在主场景中的实例名为mask_mc。
3、在主场景的第一帧写如下代码:
//////////////////创建大图片影片剪辑//////////////////
this.createEmptyMovieClip("dtp_mc", this.getNextHighestDepth());
dtp_mc._x = 0;
dtp_mc._y = 100;
dtp_mc.setMask(mask_mc);
dtp_mc.createEmptyMovieClip("dgdtp_mc", this.getNextHighestDepth());
var image_mcl:MovieClipLoader = new MovieClipLoader();
anzs_mc.swapDepths(dtp_mc);
/////////////循环语句///////////
for (i=4; i>0; i--) {
//////////////////载入外部图片及坐标//////////////////
dtp_mc.dgdtp_mc.duplicateMovieClip("tp"+i+"_mc", i);
this.dtp_mc["tp"+i+"_mc"]._x = 320*(i-1)+115;
image_mcl.loadClip("d"+i+".jpg", "dtp_mc.tp"+i+"_mc");
//////////////////缩略图的坐标/////////////////
this["xtp"+i+"_mc"]._x = 80*(i-1)+115;
anzs_mc._x = 115;
this["xtp"+i+"_mc"]._y = anzs_mc._y=60;
//////////////////按下缩略图大图缓冲移动////////////
this["xtp"+i+"_mc"].id = i;
this["xtp"+i+"_mc"].onRelease = function() {
aa = this.id;
dtp_mc.onEnterFrame = function() {
dtp_mc._x -= ((aa-1)*320+dtp_mc._x)/4;
anzs_mc._x = -dtp_mc._x/4+115;
if (Math.floor(dtp_mc._x) == -(aa-1)*320) {
delete dtp_mc.onEnterFrame;
}
};
};
}
原文件
[准备]
1、新建文件夹,放几张大图,宽320高240,名为d1.jpg、d2.jpg、d3.jpg、d4.jpg,相应的小图,名为x1.jpg、x2.jpg、x3.jpg、x4.jpg,宽80高40。
2、新建FLASH文件,保存在同文件夹下。
[步骤]
1、导入上面缩略图到FLASH中,转为影片剪辑,在主场景中的实例名分别为xtp1_mc、xtp2_mc、xtp3_mc、xtp4_mc。
2、画一矩形,宽320高240,转为影片剪辑,在主场景中的实例名为mask_mc。
3、在主场景的第一帧写如下代码:
//////////////////创建大图片影片剪辑//////////////////
this.createEmptyMovieClip("dtp_mc", this.getNextHighestDepth());
dtp_mc._x = 0;
dtp_mc._y = 100;
dtp_mc.setMask(mask_mc);
dtp_mc.createEmptyMovieClip("dgdtp_mc", this.getNextHighestDepth());
var image_mcl:MovieClipLoader = new MovieClipLoader();
anzs_mc.swapDepths(dtp_mc);
/////////////循环语句///////////
for (i=4; i>0; i--) {
//////////////////载入外部图片及坐标//////////////////
dtp_mc.dgdtp_mc.duplicateMovieClip("tp"+i+"_mc", i);
this.dtp_mc["tp"+i+"_mc"]._x = 320*(i-1)+115;
image_mcl.loadClip("d"+i+".jpg", "dtp_mc.tp"+i+"_mc");
//////////////////缩略图的坐标/////////////////
this["xtp"+i+"_mc"]._x = 80*(i-1)+115;
anzs_mc._x = 115;
this["xtp"+i+"_mc"]._y = anzs_mc._y=60;
//////////////////按下缩略图大图缓冲移动////////////
this["xtp"+i+"_mc"].id = i;
this["xtp"+i+"_mc"].onRelease = function() {
aa = this.id;
dtp_mc.onEnterFrame = function() {
dtp_mc._x -= ((aa-1)*320+dtp_mc._x)/4;
anzs_mc._x = -dtp_mc._x/4+115;
if (Math.floor(dtp_mc._x) == -(aa-1)*320) {
delete dtp_mc.onEnterFrame;
}
};
};
}
原文件
Jul
27
简单提示下:新建一个影片剪辑元件,用做好一个元件做心形运动。再新建一个影片剪辑元件,把上面心形运动的元件拖入场景中,增加图层2写代码:
第1帧上:
var i = 0;
第2帧上:
if (i <=60)
{
duplicateMovieClip(mc, "mc" + i, i);
this["mc" + i]._alpha = 100 - 2 * i;
++i;
}
else
{
gotoAndStop(4);
} // end else if
第3帧上:
gotoAndPlay(2);
Ctrl+Enter 测试
第1帧上:
var i = 0;
第2帧上:
if (i <=60)
{
duplicateMovieClip(mc, "mc" + i, i);
this["mc" + i]._alpha = 100 - 2 * i;
++i;
}
else
{
gotoAndStop(4);
} // end else if
第3帧上:
gotoAndPlay(2);
Ctrl+Enter 测试
Apr
3
<SCRIPT src="image/mouseinfo.js" ></SCRIPT>
<a href='/product/pro/74/20061118265460.html' onmousemove="showTip('p20132')" onmouseout="closeTip('p20132')" alt='明基 E720' title='明基 E720' target='_blank'><img src='/product/uppic/2006/10/23/153058s.jpg' width='120' height='90' border='0'></a>
<DIV id='p20132' style='width:300px; DISPLAY: none; border: 2px solid #89AEE3; padding:5px; LEFT: 0px; TOP: 0px; position:absolute; background-color:#FFFFFF;'>支持3:2和16:9两种比例的照片拍摄 ,</Div>
Mar
27
Mar
27
几个鼠控类缓冲。以前学习时所写。比较简单,适合新手学习。
为了移植方便,以下代码直接写在了想要移动的mc上即可。
1.鼠标点击跟(做缓冲菜单常用)
onClipEvent(mouseDown){
targetx=_root._xmouse;
targety=_root._ymouse;
}
onClipEvent(enterFrame){
_x+=(targetx-_x)/10
_y+=(targety-_y)/10
}
2.跟随鼠标
onClipEvent(load){
_x=300;
_y=200;
}
onClipEvent(enterFrame){
_x+=(_root._xmouse-_x)/10
_y+=(_root._ymouse-_y)/20
}
3,三个海鸥mc的代码如下
海鸥1:
onClipEvent(enterFrame){
_x+=(_xmouse/30-_x)/25
}
海鸥2:
onClipEvent(enterFrame){
_x+=(_xmouse/10-_x)/20
}
海鸥3:
onClipEvent(enterFrame){
_x+=(-_xmouse/20-_x)/20
}
为了移植方便,以下代码直接写在了想要移动的mc上即可。
1.鼠标点击跟(做缓冲菜单常用)
onClipEvent(mouseDown){
targetx=_root._xmouse;
targety=_root._ymouse;
}
onClipEvent(enterFrame){
_x+=(targetx-_x)/10
_y+=(targety-_y)/10
}
2.跟随鼠标
onClipEvent(load){
_x=300;
_y=200;
}
onClipEvent(enterFrame){
_x+=(_root._xmouse-_x)/10
_y+=(_root._ymouse-_y)/20
}
3,三个海鸥mc的代码如下
海鸥1:
onClipEvent(enterFrame){
_x+=(_xmouse/30-_x)/25
}
海鸥2:
onClipEvent(enterFrame){
_x+=(_xmouse/10-_x)/20
}
海鸥3:
onClipEvent(enterFrame){
_x+=(-_xmouse/20-_x)/20
}
Mar
26
<SCRIPT language=JavaScript>
<!--
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";
function getRef(id) {
if (isDOM) return document.getElementById(id);
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
}
function moveRightEdge() {
var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
if (isDOM) {
yMenuFrom = parseInt (divMenu.style.top, 0);
yMenuTo = (isNS ? window.pageYOffset : document.body.scrollTop);
}
timeoutNextCheck = 500;
if (yMenuFrom != yMenuTo) {
yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
if (yMenuTo < yMenuFrom)
yOffset = -yOffset;
if (isNS4)
divMenu.top += yOffset;
else if (isDOM)
divMenu.style.top = parseInt (divMenu.style.top, 0) + yOffset;
timeoutNextCheck = 10;
}
setTimeout ('moveRightEdge()', timeoutNextCheck);
}
//-->
</SCRIPT>
<!--
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";
function getRef(id) {
if (isDOM) return document.getElementById(id);
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
}
function moveRightEdge() {
var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
if (isDOM) {
yMenuFrom = parseInt (divMenu.style.top, 0);
yMenuTo = (isNS ? window.pageYOffset : document.body.scrollTop);
}
timeoutNextCheck = 500;
if (yMenuFrom != yMenuTo) {
yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
if (yMenuTo < yMenuFrom)
yOffset = -yOffset;
if (isNS4)
divMenu.top += yOffset;
else if (isDOM)
divMenu.style.top = parseInt (divMenu.style.top, 0) + yOffset;
timeoutNextCheck = 10;
}
setTimeout ('moveRightEdge()', timeoutNextCheck);
}
//-->
</SCRIPT>





下载文件 
