home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Magazine 28 Bonus
/
CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin
/
data
/
shared.dir
/
03013_Script_INITIALIZE
< prev
next >
Wrap
Text File
|
1996-06-21
|
5KB
|
173 lines
-- ---------------------------------------------------------------
-- Handler initializeArt
on ia
initializeArt
end
on initializeArt
global maxNumButtons
defineCursors
clearOrientationField
clearVisitedIndexSectionsField
setProgramSprites
setProgramGlobals
initMenu
clearOrientationField
removeSectionButtons(1, maxNumButtons)
end
-- ---------------------------------------------------------------
-- Handler setProgramSprites
on setProgramSprites
global buttonBackGroundSprite
global button1TextSprite, button2TextSprite, button3TextSprite
global listOfbuttonTextSprites
set buttonBackGroundSprite = 45
set button1TextSprite = 46
set button2TextSprite = 47
set button3TextSprite = 48
set listOfbuttonTextSprites = [button1TextSprite, button2TextSprite, button3TextSprite]
puppetSprite button1TextSprite, TRUE
puppetSprite button2TextSprite, TRUE
puppetSprite button3TextSprite, TRUE
puppetSprite buttonBackGroundSprite, TRUE
global menuBackGround
set menuBackGround = 40
global menuBar, hilitMenuSeg
set menuBar = 41
set hilitMenuSeg = 42
puppetSprite menuBar, TRUE
global leftSprite, rightSprite,topSprite, bottomSprite,labelSprite
set labelSprite = 43
set leftSprite = 36
set rightSprite = 37
set topSprite = 38
set bottomSprite = 39
end
-- ---------------------------------------------------------------
-- Handler setProgramGlobals
on setProgramGlobals
-- the number of the item in field "navigation field" that
-- refers to the first button
global buttonItemOffset
set buttonItemOffset = 9
-- lists containing the text and destinations of the buttons
global listOfButtonTexts, listOfButtonSections
set listOfButtonTexts = []
set listOfButtonSections = []
-- a list of sprites whose cursor is not -1 (default arrow)
global specialCursorSprites
set specialCursorSprites = []
-- a string of blank spaces used to scroll the text in setOrientation
global blankSpaces
set blankSpaces = " "
-- text colors used in orientation field
global color_WasThere, color_HereNow
set color_WasThere = 0 -- white
set color_HereNow = 226 -- blue
-- field containing the navigation information
global NavigationInfo
set NavigationInfo = field ("Navigation Info") & RETURN
set NavigationInfo = NavigationInfo & (field "Navigation Info1") & RETURN
-- Note: NavigationInfo must have a blank line at the end
-- flag indicating if the menuBar is currently visible or not
global menuVisible
set menuVisible = FALSE
global numMenuItems
set numMenuItems = 7
-- The locH and locV of the menu when it appears on the stage
global menuH, menuV
set menuH = 33
set menuV = 400
-- the locations of the hiliting of menu sections
global menuHiliteLocations
set menuHiliteLocations = field "menu Hilite Locations"
-- a list of section names visited from the index
global visitedSections
set visitedSections = field "index visited sections"
-- locH and locV of the button text sprites
global button1TextH, button1TextV
global button2TextH, button2TextV
global button3TextH, button3TextV
-- list of button locH's and button locV's
global listOfButtonHs, listOfButtonVs
set listOfButtonHs = [607,574,540]
set listOfButtonVs = [470,470,470]
-- the color of hilit text in the orientation field
global hilitTextColor
set hilitTextColor = 186
-- the rectangle enclosing the menu button
global menuButtonRect
set menuButtonRect = rect(1, 462, 26, 479)
-- the rectangle enclosing the back button
global backButtonRect
set backButtonRect = rect(31, 461, 58, 479)
-- the position of the back activated button
global backAH, backAV
set backAH = 44
set backAV = 470
--location of backlabel
global backH, backV
set backH = 44
set backV = 470
-- a list of visited sections
global backList
set backList = []
-- flag if going to a secton by clicking on the backbutton
setBackFlag(FALSE)
global buttonBackGroundColor, buttonTextColor, buttonHiliteTextColor
set buttonBackGroundColor = 117
set buttonTextColor = 255 -- black
set buttonHiliteTextColor = 191
global maxNumButtons
set maxNumButtons = 3
end
-- ---------------------------------------------------------------
-- Handler clearOrientationField
on clearOrientationField
put " " into field "Orientation"
end
-- ---------------------------------------------------------------
-- Handler clearVisitedIndexSectionsField
on clearVisitedIndexSectionsField
put EMPTY into field "index visited sections"
end