At 9:12 AM +0000 11/21/00, Chandra shekar Reddy wrote:
>I had an probelem when working on an CBT...in whcih my client wants
>to have (recent) as one button.
>
>once the user visits the link. it should contain the frame in which
>all the previously visited links should be present and they had to
>be in an order how the user visited the links ...
>
I'm building the navigation of a project right now that has a similar
requirement. My approach has been to use a list to keep track of
recently visited frame. My rule is, every frame that you need to
remember visiting must have a unique label, and it must be given one
common frame script. (My code uses a Navigation object which does
other more complicated stuff, but I'll rewrite the guts of it here
using just one global list).
global glRecent -- global list of recent frames
on StartMovie
glRecent = []
end
-- Behavior script
global glRecent
on enterFrame
-- Get the name of this frame
thisFrameName = the frameLabel
if thisFrameName = "" then
alert("Frame" && the frame && "does not have a label - but it
needs to have one.")
return
end if
-- Check to see if we've seen this frame before
-- If so, delete it from where we saw it last - (A nice little optimization)
where = getOne(glRecent, frameName)
if where > 0 then
deleteAt(glRecent, where)
end if
-- In any case, always add to the top of the list (position 1)
addat(glRecent, 1, lCurrentFrameAndMovie)
end
Or if you have other things that you do in a frame script, just take
this code, put it into a movie level handler, and call that handler
from the beginSprite (only happens once) in your behavior:
on beginSprite
AddThisFramesLabelToTheListOfRecentFrames()
end
on exitFrame
go to the frame
end
Now that you have a global list of recent frame names, when the user
hits the "Recent" button, you can call a handler that you write that
formats this list into text or field member and displays it on the
screen. The display should probably also allow clicking so that the
user can navigate to any recently seen page directly.
Good luck,
Irv
--
Lingo / Director / Shockwave development for all occasions.
(Over two millions lines of Lingo code served!)
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]