• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. GRAPHIC INTERFACE ELEMENTS > TROUBLESHOOTING GRAPHIC INTERFACE ELEM...

TROUBLESHOOTING GRAPHIC INTERFACE ELEMENTS

  • Be sure you understand the difference between the clickLoc and the mouseLoc. The first is the exact location of the mouse when the user clicked. The second is the current location of the mouse, which might have changed since the user clicked.

  • When performing calculations in which the result will be a number between 0 and 1, as in the slider behavior or the progress bar behavior, it is important to convert the numbers to floats before doing division. Otherwise, a calculation such as 3/6 will return a 0, rather than a 0.5.

  • If you are using floating point numbers in a parameter and assigning a range to that parameter, you can control the number of decimal places used by setting the floatPrecision system property. The default is four digits after the decimal point.

  • The memberNum property of a sprite enables you to set the member of a sprite by just referring to it by number. This property is good for setting a sprite to the next member or something similar, but should not be used otherwise. You should use the member property instead and set the sprite to a specific member by name.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint