×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Inserting control flags

Inserting control flags

Inserting control flags

(OP)
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

RE: Inserting control flags

(OP)
Yes I think so, is there a way to do this with cookies.

RE: Inserting control flags

You need to do a quick test: set a cookie in the web page A and retrieve it in the page B using JavaScript. If this works then Director DCR should be able to use this technique.

Kenneth Kawamoto
www.materiaprima.co.uk

RE: Inserting control flags

(OP)
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

RE: Inserting control flags

Is it done in one Director movie or are you talking about different web pages?

Kenneth Kawamoto
www.materiaprima.co.uk

RE: Inserting control flags

(OP)
this would be done in a single movie.

RE: Inserting control flags

(OP)
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

RE: Inserting control flags

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
www.materiaprima.co.uk

RE: Inserting control flags

(OP)
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?

RE: Inserting control flags

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
www.materiaprima.co.uk

RE: Inserting control flags

(OP)
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.

RE: Inserting control flags

The script definitely works - I just tested it.

To create the frame labels, just click on the very top area of the Score.

Kenneth Kawamoto
www.materiaprima.co.uk

RE: Inserting control flags

(OP)
could you send me your test dir, i am loosing alot of hair at the moment..

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close