tomcat7 zip安装:《Flash AS3.0打造自适应图片加框效果第11609教程》干群共产主义国家名牌大学义务教育编号2012011609
来源:百度文库 编辑:中财网 时间:2024/10/05 14:01:57
干群共产主义国家名牌大学义务教育编号2012011609:
《Flash AS3.0打造自适应图片加框效果第11609教程》
干群共产主义国家名牌大学义务教育编号2012011609
《Flash AS3.0打造自适应图片加框效果第11609教程》
干群教授:大家好!欢迎你们来访中国参观考察学习!
第11609教程:Flash AS3.0打造自适应图片加框效果
这是一个为图片加框的效果,画框依据图片的大小而动态改变。
鼠标点击下方演示:
',1)">
2、准备4张大小不同规格的图片,最大的宽、高不要超过530*380。
3、导入图片:在文件菜单选导入=>导入到库。如图1:
7、隐藏图层1,添加图层2。图4:
9、将长方形转换为影片剪辑,设置注册点居中。舞台实例命名为“imageBorder”。图5:
//Import TweenMax (we use it for animation)
import gs.*;
//Save the center coordinates of the stage
var centerX:uint = stage.stageWidth / 2;
var centerY:uint = stage.stageHeight / 2;
//Let’s add the images to an array
var imagesArray:Array = new Array(image1,image2,image3,image4);
//This variable will store the current image displayed
var currentImage:MovieClip = null;
//Make the border invisible at first
imageBorder.alpha = 0;
//Loop through the array elements
for (var i:uint = 0; i < imagesArray.length; i++) {
//We want all the images to be invisible at the beginning
imagesArray[i].alpha = 0;
//Save the index of the image to a variable called "imageIndex"
imagesArray[i].imageIndex = i;
}
//We listen when the user clicks the mouse on the stage
stage.addEventListener(MouseEvent.CLICK, stageClicked);
//This function is called when the user clicks the stage
function stageClicked(e:MouseEvent):void {
//Check that the current image is not null
if (currentImage != null) {
//Animate the current image away
TweenMax.to(currentImage, 1, {alpha:0});
//Check to see if we are at the end of the imagesArray
if (currentImage.imageIndex == imagesArray.length - 1) {
//Set the first image of the array to be our currentImage
currentImage = imagesArray[0];
} else {
//We are not at the end of the array, so get the next image from the array
currentImage = imagesArray[currentImage.imageIndex + 1];
}
} else {
//If the currentImage is null (= we just started the movie), we set the first image in the array
//to be our current image.
currentImage = imagesArray[0];
//Set the border’s alpha to 0.5
imageBorder.alpha = 0.5;
}
//Position the current image and the border to the center of the stage
currentImage.x = imageBorder.x = centerX;
currentImage.y = imageBorder.y = centerY;
//Animate the border’s width and height according to the current image’s dimensions.
//We also a nice glow effect to the image border
TweenMax.to(imageBorder, 0.5, {width: currentImage.width + 8, height: currentImage.height + 8,
glowFilter:{color:Math.random() * 0xffffff, alpha:1, blurX:20, blurY:20, strength:100, quality:1}});
//Animate the currentImage’s alpha
TweenMax.to(currentImage, 1, {alpha:1});
}
',2)">
',3)">
干群共产主义国家网易博客网址- http://blog.163.com/heimudan_ok/
环球总裁CEO名人世界网址-http://ganqunqueen.blog.163.com/干群新浪博客网址- http://blog.sina.com.cn/heimudanbest/干群搜狐博客网址- http://heimudan88888.blog.sohu.com/干群皇太后360doc个人图书馆- http://ganqun19691104.360doc.com/
健康长寿是做人最大财富!世界人民是一家人,让我们携手成为好朋友!
干群在此感谢国际互联网网友博友们的大力支持和关心厚爱!!
博客女王创造发明法制新闻PS教程U5教程健康长寿
成功励志奇闻怪事世界名人婚姻家庭国际航空国际时尚
世界儿童世界名画干群皇太后欢迎你们来访我国并留言交流 顶级佛学
☆名博基本技巧☆
☆电脑操作技巧☆
☆电脑专家门诊☆
☆电脑系统加速☆
☆制作个性印章☆
☆制作精彩电影☆
☆神秘魔方相册☆
☆闪动边框制作☆
☆制作精美相册☆
☆透明睡衣制作☆
☆制作闪亮紫钻☆
☆飞翔气球制作☆
☆质感美女油画☆
☆怀旧照片制作☆
☆实用网页制作☆
☆光影魔术日历☆
☆图片制作水波☆
☆名博技巧经典☆
☆各种表格制作☆
☆特效个性签名☆
☆图片自由舞动☆
☆应用编程制作☆
☆快速还原系统☆
☆图片艺术特效☆
☆制作个性音乐☆
☆快捷办公技巧☆
☆博客日志背景☆
☆屏幕截图方法☆
☆制作发光文字☆
☆释放磁盘空间☆
☆制作美食效果☆
☆鼠标助理弹琴☆
☆精美动画素材☆
☆制作精美邮票☆
☆美图动画欣赏☆
☆绘图软件技巧☆
☆特效动态文字☆
☆文字扫光处理☆
☆移动硬盘分区☆
☆美妙音画背景☆
☆提高博客票房☆
☆网易颜色代码☆
怎样在图片上加FLASH特效
怎样在图片上加透明FLASH?
linux AS3.0 /etc/inittab的问题
在一个图片上,怎样加两个透明FLASH?
网页的图片上怎么加小FLASH?
求助怎么样在网页图片上加FLASH透明动画
如何在flash软件里面给图片加透明特效代码
网页上的flash图片如何加超级链接?
求高手收费打造个FLASH
Flash加加使用方法
linux As3.0的操作系统可以用哪种ups来对付突然断电呢?
请问redhat as 3.0(update 4)与 as3.0的区别
flash图片
求 制作GIF格式图片上加FLASH闪光字效果的教程~
如果把透明FLASH加到网站上面?才能不档住后面的图片
加FLASH特效和图片滤镜的图片链接到网址de代码
做FLASH时怎么样给图片加个一个网页的链接
怎么使用 Flash加加
怎样使用 Flash加加
flash加加的使用
什麽是自适应
flash如何加链接
flash加按钮
flash加链接