Use these as the frame script for markers that should be added to the back list and on the back button. You may also want a startMovie handler that sets the 2 variables...
gBack = false
gBackList = []
--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know. :-)
--Note that this is 2 behaviors to be used together. DO not put them in the same behavior or it will not work.
--The Frame Script
global gBack, gBackList
on enterFrame me
if gBack = void then gBack = false
if gBackList = void then gBackList = []
howMany = gBackList.count
if gBack = true then --came from back button
gBack = false
deleteAt gBackList, howMany
else
if howMany > 0 then
if gBackList[howMany] <> the frame then
--prevents the same frame from being added twice in a row
add gBackList, the frame
end if
else
add gBackList, the frame
end if
end if
end
--The button script
global gBack, gBackList
on mouseUp me
howMany = gBackList.count
if howMany > 1 then --There is a back state
gBack = true
go gBackList[howMany - 1]
end if
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA