[問題] 將移動複製為ActionScript3.0 這個功能

看板Flash作者 (雞卷)時間15年前 (2010/04/28 16:02), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
要做出 動作製作.fla 那樣的效果,我跟著書上的步驟做,程序是這樣: 1.要讓動作持續1秒,所以在第13格影格<插入關鍵影格> 2.在第13格影格使用<自由變形工具>放大商品 3.在時間軸上選擇<建立移動補間動畫> 4.在時間軸上選擇<將移動複製為ActionScript3.0> 我將程式碼在<動作>面板貼上時,內容是: import fl.motion.AnimatorFactory; import fl.motion.MotionBase; import flash.filters.*; import flash.geom.Point; var __motion_tempMc:MotionBase; if(__motion_tempMc == null) { import fl.motion.Motion; __motion_tempMc = new Motion(); __motion_tempMc.duration = 1; __motion_tempMc.addPropertyArray("x", [0]); __motion_tempMc.addPropertyArray("y", [0]); __motion_tempMc.addPropertyArray("scaleX", [1.825287]); __motion_tempMc.addPropertyArray("scaleY", [1.280106]); __motion_tempMc.addPropertyArray("skewX", [0]); __motion_tempMc.addPropertyArray("skewY", [0]); __motion_tempMc.addPropertyArray("rotationConcat", [0]); __motion_tempMc.addPropertyArray("blendMode", ["normal"]); var __animFactory_tempMc:AnimatorFactory = new AnimatorFactory(__motion_tempMc); } 執行時也只有在最後一個影格才會突然放大 不過書上附的範例貼上的程式碼應該是: import fl.motion.Animator; var tempMc_xml:XML = <Motion duration="13" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*"> <source> <Source frameRate="12" scaleX="1" scaleY="1" rotation="0" elementType="movie clip"/> </source> <Keyframe index="0" tweenSnap="true" tweenSync="true"> <tweens> <SimpleEase ease="0"/> </tweens> </Keyframe> <Keyframe index="12" scaleX="1.456" scaleY="1.456"/> </Motion>; var tempMc_animator:Animator = new Animator(tempMc_xml, tempMc); tempMc_animator.play(); 想請問一下我是哪個步驟有問題嗎?為什麼產生的程式碼會不一樣呢?是有哪個動作 錯了嗎?我用的是Flash CS4 附上專案檔 http://meetblake.myweb.hinet.net/action.rar -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.249.2.10
文章代碼(AID): #1Br-jzaC (Flash)