home *** CD-ROM | disk | FTP | other *** search
/ Photography Workshop / PhotoWorkShop.iso / pc / Content / Lighting / Lighting.cst / 00001_Lighting Script.ls next >
Encoding:
Text File  |  2002-04-11  |  1.7 KB  |  75 lines

  1. property ancestor
  2. property LightButtons
  3. property LeftCardButton
  4. property RightCardButton
  5. property FlashButton
  6.  
  7. property lightID
  8.  
  9. on Birth me, theChannelObject, theName, thePageInfo
  10.   set the ancestor of me to Birth( script "Master Page Template", theChannelObject, theName, thePageInfo, true, true )
  11.   
  12.   set the goBlack of me to true
  13.   
  14.   set lightID to "Left"
  15.   set LightButtons to FindButton( me, "Lights" )
  16.   TurnRadioButtonOn( LightButtons, lightID, false )
  17.   
  18.   set LeftCardButton to FindButton( me, "LCard" )
  19.   set RightCardButton to FindButton( me, "RCard" )
  20.   set FlashButton to FindButton( me, "Flashf" )
  21.   
  22.   MoveVVF( Point( -50, -16 ), false )
  23.   Show me
  24.   return me
  25. end
  26.  
  27.  
  28. on ChangePage me, theElementID, theValue1, theValue2
  29.   case theElementID  of
  30.     #Light:
  31.       set lightID to theValue1
  32.       show me
  33.       
  34.     #LeftCard:
  35.       Show me
  36.       
  37.     #RightCard:
  38.       Show me
  39.       
  40.     #Flash:
  41.       if the name of FlashButton = "flashf" then
  42.         set the name of FlashButton to "flasho"
  43.       else
  44.         set the name of FlashButton to "flashf"
  45.       end if
  46.       SetState( FlashButton, "On" )
  47.       Show me
  48.   end case
  49.   ChangePage( the ancestor of me, theElementID, theValue1, theValue2 )
  50. end
  51.  
  52. on BuildImageName me
  53.   set theImageName to "W1_" & char 1 of lightID
  54.   if lightID = "right" then
  55.     if IAmOn( RightCardButton ) then
  56.       put "L" after theImageName
  57.     end if
  58.     if IAmOn( LeftCardButton ) then
  59.       put "R" after theImageName
  60.     end if
  61.   else
  62.     if IAmOn( LeftCardButton ) then
  63.       put "L" after theImageName
  64.     end if
  65.     if IAmOn( RightCardButton ) then
  66.       put "R" after theImageName
  67.     end if
  68.   end if
  69.   if the name of FlashButton = "flasho" then
  70.     put "F" after theImageName
  71.   end if
  72.   return theImageName
  73. end
  74.  
  75.