LINGO in Mac Director6.5

Hello,
I am hoping to have someone help me with lingo scripting.

What I have is a director movie containing two digital videos (Quicktime3) in which the first video starts playing while other animation is running at the same time and on my command(by a keypress) the second video will start to play in place of the first.

My problem is this: I have my lingo written in the frame script like this:

on exitframe
   go to the frame
    -- which will keep my first video looping
  if the keypressed = RETURN then go loop
    -- in using keypress, it will let me keep looping in
       the first video until I press a
       key function (RETURN) which then goes to my next
       marker(2nd video)
end

All I want to do is change the keypressed = RETURN to keypressed = SPACEBAR. Instead of pressing the return key to activate my second video, I would prefer to press the spacebar. I have tried KeyCode(49), I have tried the numToChar(32), I have tried KeyDown, keyUp, etc.

If anyone has any suggestions in how to write this lingo script, it would be greatly appreciated.
Thank you very much
Julie
             
juliuscrassusAsked:
Who is Participating?
 
RaydotConnect With a Mentor Commented:


Try: "if the keyPressed = SPACE then," and not SPACEBAR.

Also, you shouldn't have all of this code crammed in AFTER the "go to the frame" command.  What you could end up doing is creating a situation where this code is still executing even though the playback head has moved on.

Last, but not least, I'd suggest you look into using the "KeyDownScript."

Something like this:

on enterframe
   set the KEYDOWNSCRIPT = "movieControl"
end

on exitFrame
   go to the frame
end

Then in another movie script somewhere:

on movieControl
  if the key = SPACE then
     go frame "loop"   -- go to frame where second movie is
     set the keydownscript = EMPTY  -- e.g. condition has been fulfilled, we don't need this script any more
  end if
end movieControl

Good luck!  Let me know if I can help you with anything else...

Raydot.
0
 
yaelieCommented:
The KeyCode shoudl work...are you sure the number is 49 though?! according to a book I have that is the wrong number...I might be mistaken, but I would double check it if I were you.
0
 
juliuscrassusAuthor Commented:
The keyCode is in fact, 49. Please check your book, again I am working on the Mac, maybe for Windows it is different.
Definitely keyCode = 49
Thanks anyways
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
juliuscrassusAuthor Commented:
Raydot,

I have found an easier solution while waiting for your answer.Thanks for all your help. Just to let you know: "If the keyPressed = SPACE" doesn't work either.Thanks!
0
 
RaydotCommented:
I actually tested "if the keyPressed = SPACE" before I sent it to you.  You found another solution, you said...it's not really easy handling Digital Video in Director.  I know what the manuals say, but I've been working with this application for 3 years, and it's never just something simple...

Have you ever checked out the Direct-L or Lingo-L mailing lists?  They're great resources for people with director questions...

Raydot.
0
 
juliuscrassusAuthor Commented:
How do I get in contact with these mailing lists? Thanks for this reference. Also, I really did try "if the keyPressed = SPACE" again and still doesn't work. But, "keyCode = 49" does work anyways. Thanks for all you help.

Julie.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.