-- Below code attemps to correct possible memory leak problems with MIAW. The changes below reflect a problem with White Artifact boxes that appear in place of the LOADING Facts MIAW. Due to the LOADING MIAW process being birthed from the Parent window, doing a Go to Movie may be (Real technical term here) Screwing Director and leaving a possible memory conflict later.
-- The below code will run the LOADING handler to display the LOADING MIAW and will preload the gWhere movie into ram. If this preload takes longer than 10 seconds, the repeat loop will not execute and will directly go to the movie.
--set the stageColor = the stageColor
startTimer -- Starts timer beffore the preload.
--------------------PETEMACK 07.04.01 08.15.01
preLoadMovie gWhere --
repeat while the timer < 1 * 60
-- If preload took longer than 10 seconds, it will bypass this else it will wait the remaining number of seconds until you reach 10 total.
end repeat
--tell myloadWindow to updatestage
---PETEMACK 07.04.01 08.15.01
-- close myloadWindow -- Closing and Forgetting in this movie will close the memory MIAW problem.
--Below code attemps to correct possible memory leak problems with MIAW. The changes below reflect a problem with White Artifact boxes that appear in place of the LOADING Facts MIAW. Due to the LOADING MIAW process being birthed from the Parent window, doing a Go to Movie may be (Real technical term here) Screwing Director and leaving a possible memory conflict later.
--The below code will run the LOADING handler to display the LOADING MIAW and will preload the gWhere movie into ram. If this preload takes longer than 10 seconds, the repeat loop will not execute and will directly go to the movie.
--set the stageColor = the stageColor
startTimer -- Starts timer beffore the preload.
preLoadMovie gWhere --
unload
repeat while the timer < 1 * 60
-- If preload took longer than 10 seconds, it will bypass this else it will wait the remaining number of seconds until you reach 10 total.
end repeat
--tell myloadWindow to updatestage
-- close myloadWindow -- Closing and Forgetting in this movie will close the memory MIAW problem.
-- forget myloadWindow
go movie gWhere
unload
set gWhere = ""
end
on goCurrent
if the movieName = "Intro.dir" then return "MAIN"
if the movieName = "Main.dir" then return "MAIN"
if the movieName = "Dict.dir" then return "DT"
if the movieName = "Skills.dir" then return "SK"
if the movieName = "FS.dir" then return "FS"
if the movieName = "OverView.dir" then return "OV"
if the movieName = "Tour.dir" then return "TR"
end
on goNext gWhere
if gWhere = "Main.dir" then return "MAIN"
if gWhere = "Dict.dir" then return "DT"
if gWhere = "Skills.dir" then return "SK"
if gWhere = "FS.dir" then return "FS"
if gWhere = "OverView.dir" then return "OV"
if gWhere = "Tour.dir" then return "TR"
end
on TellEveryPuppetToFuckOff
repeat with i = 1 to 48
puppetsprite i,false
end repeat
-- no updatestage!!!!!!!!
-- no updatestage!!!!!!!!
-- no updatestage!!!!!!!! Director updates stage auto on go frame
end
on TellEveryPuppetToFuckOn
repeat with i = 1 to 48
set the visible of sprite i = true
end repeat
-- no updatestage!!!!!!!!
-- no updatestage!!!!!!!!
-- no updatestage!!!!!!!! Director updates stage auto on go frame
end
on enableMenu state
global glist
set pos = 1
if (count(the windowlist) > 2 ) then
nothing
else
if state=FALSE then set glist=list()
set menuNum=the number of menus
repeat with i=1 to menuNum
set MenuName= the name of menu i
set n = the number of menuitems of menu MenuName
repeat with j=1 to n
if (the enabled of menuitem j of menu MenuName = state) then
add glist,j&&MenuName
end if
set the enabled of menuitem j of menu MenuName to state
if state=TRUE and pos <= count(glist) then
if j&&menuName = getAt(glist,pos) then
set pos=pos+1
set the enabled of menuitem j of menu MenuName to FALSE