Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting control flags

Status
Not open for further replies.

xird

Technical User
Nov 15, 2006
15
DE
I would like to insert some form of control mechanism so that a user cannot progress to the next sprite (screen) unless they have previousley visited certain specified webpages. Do such controls exist?

thanx
 
Yes I think so, is there a way to do this with cookies.
 
Hi again, I dont think the user will have control over cookies and their settings. The only thing to assume is that this will be done online. So the kind of control I am thinking of is the IF - THEN - ELSE type which refers to if certain sprites have had been cliked then the user cannot continue.

hope this makes sense
 
this would be done in a single movie.
 
hi kennthkawamoto

Have been away and just back to try and pick up this again..Basically I have 3 questions which are basically a search for mini examples,

1. I would like to know if there are any examples of using these global variables in this context of control flags.

2. From my previous questions regarding the use of fileIO, this works great but I cannot change the lingo to allow me to create a fileIO text_1 which contains data that will then be available in text_field_1. Then to create another fileIO text_2 which contains data that will then be available in text_field_2. The objective is for a teacher to change text in questions on a muliple choice exam. I think this is related to global variables but my knowledge of this is not in depth.

3. And finally, is it possible to access a url directly from a link on a CD from a director projection file.

this is alot I know but any pointers to mini examples would really help.

thanx

xird
 
1. I'm not sure if there's a tutorial for this as this is very basic...! The idea is to check the global variable when the user clicks on the button:
Code:
on mouseUp(me)
  global gVisited
  if gVisited then _movie.go("some frame")
end mouseUp

2. Have a look at XML. It's the best format for the type of things you're talking about.

3. Yes

Kenneth Kawamoto
 
i am sorry kennth but i just cant get my head around this Global Gvisited, for example where do I list the sprites which are the ones which must be visted before allowing the user to proceed?

 
So you want a list of "must visit" frames? You can create one at start:
Code:
-- Movie Script
on startMovie
  global gMustVisitFramesList
  gMustVisitFramesList = ["a", "b", "c", "d"]
end startMovie
This list contains frame labels you must visit. Then you can delete the frame label from the list each time you visit a frame:
Code:
-- Behaviour Script attached to a Button
on mouseUp(me)
  global gMustVisitFramesList
  gMustVisitFramesList.deleteOne("c")
  put(gMustVisitFramesList)
  _movie.go("c")
end mouseUp
You get this in the Message window:
-- ["a", "b", "d"]
because you now have visited the frame "c" and it's removed from the list.

You can check if all of the "must" frames are visited by just checking the number of elements in this list.

Kenneth Kawamoto
 
hi, i have tried this...but I keep getting error:

script error: Object expected

gMustVisitedFramesList.deleteOne("a")

this is when i click on the button which should delete "a" from the framelist.

I think i am not labeling the frames correctly? what is the correct way to label the frames, by script or can this be done manually using director menu.
 
could you send me your test dir, i am loosing alot of hair at the moment..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top