http://...">
论坛交流
首页办公自动化| 网页制作| 平面设计| 动画制作| 数据库开发| 程序设计| 全部视频教程
应用视频: Windows | Word2007 | Excel2007 | PowerPoint2007 | Dreamweaver 8 | Fireworks 8 | Flash 8 | Photoshop cs | CorelDraw 12
编程视频: C语言视频教程 | HTML | Div+Css布局 | Javascript | Access数据库 | Asp | Sql Server数据库Asp.net  | Flash AS
当前位置 > 文字教程 > Flash教程
Tag:flash cs,flash 8,鼠绘,as,手绘,工具,文字,loading,入门,初学,mc,影片剪辑,声音,mtv,游戏,引导,遮罩,菜单,补间,广告条,时钟,视频教程

无限连续动画

文章类别:Flash | 发表日期:2008-9-21 20:11:34

   ※闪吧※<a target=_blank href=http://www.flash8.net<img src=../img/flash/20089212072469377801.gif border=0 align=absMiddle height=16 width=16> <a href="www.flash8.net" TARGET=_blank>[ 点击下载 ]</a></a>]                         FLASH 4 : 无限连续动画          
                                                                                                                                                                                                                                                                                                                                                           http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="640" height="400">                                        http://file.flash8.net/Tutorials1/1015/2/2.swf";>                                                                                http://file.flash8.net/Tutorials1/1015/2/2.swf"; quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; type="application/x-shockwave-flash" width="640" height="400">                                                                               

                                                                                                                                                                                                 千万别让标题给吓到了,假如您以为此范例会很难懂的话,那就错了,事实上过程一点都不难,只要原理能够了解,相信您可以应用出更炫更酷的作品出来的,还不知道如何做的网友,可别轻易错过此篇的剖析哦....                                                                                                                                                               http://file.flash8.net/Tutorials1/1015/2/line0.gif"; width="155" height="280">                                  左图是此范例中会用到的4个元件名称。                                                                                                                                                               http://file.flash8.net/Tutorials1/1015/2/line1.gif"; width="264" height="242">                                  影格速度:20                                     fps                                     

场景大小:                                       640px X 400px                                     

                                    

背景:                                       黑色

                                                                                                                                                                                                 http://file.flash8.net/Tutorials1/1015/2/line2.gif"; width="400" height="160">                                  做一个隐藏按钮:                                     

元件名称--button(按钮):

                                    

新增一个元件(Ctrl+F8),在执行的影格处,用矩形工具(R)画一个小方形,颜色任意,反正是看不到。                                                                                                                                                                                                  http://file.flash8.net/Tutorials1/1015/2/line3.gif"; width="190" height="200">                                  锁定滑鼠中心点位置:                                     

元件名称--tracker(影片片段):

                                    

新增一个元件(C+F8),从图库里将刚刚做好的按钮元件(button),拉至场景中,如左图所示。

                                    

P.S.回头我们再回来设定元件内容的动作指令。                                                                                                                                                                                                  http://file.flash8.net/Tutorials1/1015/2/line4.gif"; width="255" height="200">                                  做一个底色图:                                     

元件名称--color(图像):

                                    

新增一个元件(Ctrl+F8),用矩形工具(R)画一个长方形,颜色....看你兴奋罗。

                                                                                                                                                                                                 http://file.flash8.net/Tutorials1/1015/2/line5.gif"; width="560" height="135">                                                                                                   制作主要的目标物:                                     

元件名称--text(影片片段):

                                    

新增一个元件(Ctrl+F8),在场景中用文字工具(T)输入一段你喜欢的文字,这个地方要非凡的注重,还记得影片的宽是多少吧??                                        640px 开启尺标                                       (                                       Ctrl+Alt+Shift+R ),将刚刚输入的文字移至尺标范围                                                                               -640~0  之间,然後复制此段文字,贴於右方2次,也就是同样文字共有3段                                       -640~00~640640~1280,这个地方要是没接好,就会有不连续性的状况产生! 

                                                                                                                                                                                                 http://file.flash8.net/Tutorials1/1015/2/line6.gif"; width="427" height="310">                                  回到场景1:                                     

图层名称--text:

                                    

从图库里将text元件拉至场景中,如左图所示,中间那段文字落在场景中心,并命名元件实体名称:text

                                                                                                                                                                                                 http://file.flash8.net/Tutorials1/1015/2/line8.gif"; width="400" height="264">                                  图层名称--color:                                     

新增一个图层,从图库里将color元件拉至场景中,先将此元件内容的颜色效果Alpha值,设为50%,成为半透明状态,调整大小及位置,遮盖於文字上,如左图所示,注重看此处color元件的尺标范围,介於150~280之间。

                                                                                                                                                                                                 http://file.flash8.net/Tutorials1/1015/2/line9.gif"; width="400" height="260">                                  图层名称--tracker:                                     

新增一个图层,从图库里将tracker元件拉至场景中,调整大小及位置,遮盖於color元件上,如左图所示,并命名元件实体名称:tracker

                                                                                                                                                                                                 http://file.flash8.net/Tutorials1/1015/2/line11.gif"; width="480" height="290">                                                                                                   编辑图库里的tracker元件,参考上图所示。设定元件实体内容的动作指令如下:                                     

於                                       (滑过)
                                          开始拖曳 ("/tracker",lockcenter)
                                      结束於                                                                                                                                                                                                  http://file.flash8.net/Tutorials1/1015/2/line12.gif"; width="300" height="142">                                                                                                   图层名称--actions(第1影格):                                     

新增一个图层,设定影格的动作指令如下:

                                    设定变数:                                     "mouseX" = GetProperty ( "/tracker",_x)
                                    设定变数: "mouseY" = GetProperty ( "/tracker",_y)
                                    假如 (mouseY>150 and mouseY<280)
                                        设定变数: "moveVALUE" = (moveVALUE                                     * 9 + ((mouseX-320)/20)) /10
                                    结束假如                                                                                                   上述的语意是:                                     

首先先取得滑鼠中心点位置的XY座标
                                      假如滑鼠中心点的Y座标介於                                       150                                       与 280                                       之间(感应范围内),以一个适合此例子的运算式来指定移动值的多少。(其中mouseX-320,是要维持中心位置往左移动与往右移动的值均等,因为我们的场景宽是640px)

                                    

mouseX                                       :  滑鼠中心点的X座标
                                      mouseY                                       : 滑鼠中心点的Y座标
                                      moveVALUE                                       : 移动速度值(中心点往左或往右的位移值)                                                                                                                                                                                                  http://file.flash8.net/Tutorials1/1015/2/line13.gif"; width="300" height="140">                                                                                                   图层名称--actions(2影格):                                     

於actions图层的第2影格处,插入要害影格(F6),在影格上设定影格的动作指令如下:

                                    设定变数:                                     "moveX" = moveX + moveVALUE
                                    设定内容 ("/text",X 位置) = moveX
                                    假如 (moveX>640)
                                       设定变数: "moveX" = -640
                                    结束假如
                                    假如 (moveX<-640)
                                       设定变数: "moveX" = 640
                                    结束假如                                     

P.S.其馀图层,在第2影格处插入影格(F5),参考上图所示。

                                                                                                                                     上述的语意是:                                     

取得目标物(文字)位移的X座标。
                                      假如目标物(文字)的X座标大於640,则重新指定目标物的位置(-640)
                                      假如目标物(文字)的X座标小於-640,则重新指定目标物的位置(640)

                                    

moveX                                       : 目标物(文字)的X座标                                                                                                                                                                                                  http://file.flash8.net/Tutorials1/1015/2/line14.gif"; width="340" height="142">                                  右移图形解析:                                     

假如                                       (moveX>640)
                                         设定变数: "moveX" = -640
                                      结束假如                                                                                                                                                                                                  http://file.flash8.net/Tutorials1/1015/2/line15.gif"; width="341" height="142">                                  左移图形解析:                                     

假如                                       (moveX<-640)
                                         设定变数: "moveX" = 640
                                      结束假如

                                                                                                                                                                                                                                      

完成了,了解上面2个图的意思之後,其实一切都不难理解了!以上若有操作步骤不了解之处,或是觉得文章内容太过於简单或过於艰深,欢迎随时至Flash问题讨论区内提出您的意见....

                                                                                                                                                               下一课:http://file.flash8.net/Tutorials1/1015/1.htm";>梦幻追踪                                  
                                 
                                                                                                                              
                                                                                                                       
上一篇:{教程}开启Java视窗 人气:2157
下一篇:{教程}在Flash中制作带有进度条的LoadingⅠ 人气:2469
Flash视频教程

Flash视频教程
Windows视频教程
Windows操作
[文]
WORD教程
Word教程
[文]
Excel教程
Excel教程
[文]
PowerPoint教程
PowerPoint
[文]
Dreamweaver
Dreamweaver
[文]
FIREWORKS
Fireworks
[文]
FLASH教程
Flash教程
[文]
photoshop平面设计
PhotoShop
[文]
CorelDraw
CorelDraw
[文]
C语言教程
C语言教程
[文]
html
Html教程
[文]
DivCss布局
Div+Css布局
[文]
Javascript
Javascript
[文]
ACCESS数据库
ACCESS数据库
[文]
ASP教程
ASP教程
[文]
SQLServer数据库
SQLServer
[文]
ASP.NET教程
ASP.NET教程
[文]
FlashAS
FlashAS
[文]
视频教程列表
计算机基础入门及办公自动化: 网页制作开发视频教程: 平面广告设计视频教程 初级程序设计及ASP动态网站开发 Asp.net动态网站开发视频教程 Flash 动画角本编程视频教程
文章教程搜索
 
Flash推荐教程
Flash热门教程
看全部视频教程
购买方式/价格
购买视频教程: 咨询客服
tel:15972130058