home *** CD-ROM | disk | FTP | other *** search
/ 3D World 113 / 3DW_113.iso / pc / Menu / Scenes / home.dir / Internal_28_action_button_rollover.ls < prev    next >
Encoding:
Text File  |  2008-09-12  |  1.8 KB  |  77 lines

  1. property Sp, myAction, myTarget
  2. global gRootPath, divi, gFullPath, gFormat
  3.  
  4. on Initialize me, aTarget, aSpriteNum, aAction
  5.   Sp = sprite(aSpriteNum)
  6.   myAction = aAction
  7.   myTarget = aTarget
  8. end
  9.  
  10. on mouseEnter me
  11.   Sp.member = member("INSTALL_OVER")
  12.   cursor(280)
  13. end
  14.  
  15. on mouseLeave me
  16.   Sp.member = member("iNSTALLbUTTON")
  17.   cursor(-1)
  18. end
  19.  
  20. on mouseUp me
  21.   case myAction of
  22.     "website":
  23.       me.DoAction(myAction)
  24.     "local_link":
  25.       me.DoAction(myAction)
  26.     "register":
  27.       me.DoAction(myAction)
  28.     "upgrade":
  29.       me.DoAction(myAction)
  30.     "folder":
  31.       me.DoAction(myAction)
  32.     "install_pc":
  33.       if the platform contains "win" then
  34.         theAction = "install"
  35.         me.DoAction(theAction)
  36.       else
  37.         if gFormat = "both" then
  38.           alert("Please click the other install button")
  39.         else
  40.           alert("Sorry, but this software is for PC only")
  41.         end if
  42.       end if
  43.     "install_mac":
  44.       if the platform contains "mac" then
  45.         theAction = "install"
  46.         me.DoAction(theAction)
  47.       else
  48.         if gFormat = "both" then
  49.           alert("Please click the other install button")
  50.         else
  51.           alert("Sorry, but this software is for MAC only")
  52.         end if
  53.       end if
  54.   end case
  55. end
  56.  
  57. on DoAction me, anAction
  58.   case anAction of
  59.     "register":
  60.       gotoNetPage(myTarget)
  61.     "install":
  62.       put "gFullPath = " & gFullPath & myTarget
  63.       Ok = baOpenFile(gFullPath & myTarget, "normal")
  64.     "folder":
  65.       put "gFullPath = " & gFullPath & myTarget
  66.       Ok = baOpenFile(gFullPath & myTarget, "normal")
  67.       if the platform contains "mac" then
  68.         baActivateWindow(baFindWindow("MACS", EMPTY))
  69.       end if
  70.     "website":
  71.       put myTarget
  72.       gotoNetPage(myTarget)
  73.     "local_link":
  74.       Ok = baOpenFile(myTarget, "maximised")
  75.   end case
  76. end
  77.