///pc/img/blank.gif" width="12" height="8">当前位置:///default.htm" class="under">亿度网络 -> ///pc/index.htm" class="under">网页制作教程 -> Flash实例


/pc/bin/msg.pl?file_id=k_flashjq16 target="_blank">///pc/img/message.gif" width="64" height="54" alt="请您留言" border="0">
谈谈您的看法

///pc/img/blank.gif" width="1" height="1">
16.用鼠标控制一Movie clip
移动、缩放、旋转之二

  5)设置“up”按钮的Action为:

///pc/homepage/flashsl/flash16/img/flash004.gif" width="423" height="200" alt="up按钮Actions">

   On (Release)
    Set Property ("/target_item", Y Position) = GetProperty         ("/target_item", _y)-5
   End On
即鼠标每点击一下该按钮,实体名字为“target_item”的movie clip向上移动5。
  6)设置“down”按钮的Action为:
   On (Release)
    Set Property ("/target_item", Y Position) =GetProperty         ("/target_item", _y)+5
   End On
即鼠标每点击一下该按钮,实体名字为“target_item”的movie clip向下移动5。
  7)设置“grow”按钮的Action为:

///pc/homepage/flashsl/flash16/img/flash005.gif" width="425" height="201" alt="grow按钮Actions">

  On (Release)
   Set Variable: "x_scale_value" = Int (GetProperty            ("/target_item",_xscale)*1.1)
   Set Variable: "y_scale_value" = Int (GetProperty            ("/target_item",_yscale)*1.1)
   Set Property ("/target_item", X Scale) = x_scale_value
   Set Property ("/target_item", Y Scale) = y_scale_value
  End On
即鼠标每点击一下该按钮,实体名字为“target_item”的movie clip在X、Y方向上都放大到当前的1.1倍。
  8)设置“shrink”按钮的Action为:

///pc/homepage/flashsl/flash16/img/flash005.gif" width="425" height="201" alt="shink按钮Actions">

  On (Release)
   Set Variable: "y_scale_value" = GetProperty               ("/target_item",_xscale)*0.9
   Set Variable: "x_scale_value" = GetProperty               ("/target_item",_xscale)*0.9
   Set Property ("/target_item", X Scale) = x_scale_value 
   Set Property ("/target_item", Y Scale) = y_scale_value
  End On
即鼠标每点击一下该按钮,实体名字为“target_item”的movie clip在X、Y方向上都缩小到当前的0.9倍。
  9)怎么样?感觉如何,我们还可以再添加一些语句和一个“Time Action”,实现按钮被按下时,实体名字为“target_item”的movie clip球体连续向左、向右、向上、向下、放大、缩小及旋转。当然也可以用鼠标控制。这留给您自己去尝试,如有什么问题,可找我。


上一步  下一实例(判断数字大小)

/pc/bin/msg.pl?file_id=k_flashjq16 target="_blank">///pc/img/message.gif" width="64" height="54" alt="请您留言" border="0">
谈谈您的看法

 

网页制作 网页设计 网站建设 网站设计 网站制作 做网站 做网页