纳金网

标题: Focusable (Interactive Behavior) [打印本页]

作者: Asen    时间: 2011-10-15 10:51
标题: Focusable (Interactive Behavior)






               Focusable (Interactive Behavior)
              









           Summary
         

           Causes the parent object to be 'focusable', sending events as it gains and loses focus.
         





               Category
              


              Latest Behaviors
            




               Author
              


              Gavin Kistner
            




               Difficulty
              


              (Reference)
            




               Time to Complete
              


              5 Minutes
            








           Downloads
         


            Click Here
           
           to download the associated files.
         


            (This document covers version 1.1.5 of the 'Focusable' behavior, current as of 2005-Apr-08)
           

            Description
           


             The parent of this object will have
            
              .focus()
            
             and
            
              .blur()
            
             methods exposed in script, and will itself fire an
            
              onFocus
            
             event when clicked on (or explicitly focused through script or action), and will fire an
            
              onBlur
            
             event when another object gets focus.
            

             For convenience in the Studio environment, this behavior also provides a
            
              Focus Parent
            
             action and a
            
              Blur Parent
            
             action, as well as catching the
            
              onFocus
            
             and
            
              onBlur
            
             events from the parent and passing them along.
            

             When using script to subscribe to the
            
              onFocus
            
             or
            
              onBlur
            
             events of the action, the .object property of the event object will point to the parent object of this behavior.
            

             The core of this behavior is used in the Arrow Nudge and Editable Text behaviors, to give focus to only one element at a time for user input.
            


            Basic Properties
           



              Use Selected Color?
            

              Change the object to another color when focused?
            

              Selected Color
            

              Color to use for the object when focused.
            



            Actions
           



              Focus Parent
            

              Move focus to the parent element.
            

              Blur Parent
            

              Remove focus from the parent element.
            



            Events
           



              onFocus
            

              Fires when the parent element receives focus.
            

              onBlur
            

              Fires when the parent element loses focus.
            



            Demonstration
           




              View Demonstration Project
            




              Download Project File
            






作者: 奇    时间: 2012-2-1 23:28
先顶上去,偶要高亮加精鸟!

作者: 晃晃    时间: 2012-3-4 23:22
路过……

作者: 菜刀吻电线    时间: 2012-5-10 23:18
赞一个,哈哈

作者: 菜刀吻电线    时间: 2012-5-14 23:21
长了不少见识

作者: 晃晃    时间: 2012-8-22 23:48
既来之,则看之!

作者: 奇    时间: 2012-10-8 23:25
呵呵,真得不错哦!!

作者: C.R.CAN    时间: 2012-12-15 23:26
加精、加亮滴铁子,尤其要多丁页丁页

作者: 菜刀吻电线    时间: 2013-2-26 23:28
好可爱的字,学习了





欢迎光临 纳金网 (http://go.narkii.com/club/) Powered by Discuz! X2.5