Solved

LINGO in Mac Director6.5

Posted on 1998-10-06
6
611 Views
Last Modified: 2012-06-21
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
             
0
Comment
Question by:juliuscrassus
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:yaelie
ID: 1540074
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
 
LVL 3

Accepted Solution

by:
Raydot earned 70 total points
ID: 1540075


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
 

Author Comment

by:juliuscrassus
ID: 1540076
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:juliuscrassus
ID: 1540077
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
 
LVL 3

Expert Comment

by:Raydot
ID: 1540078
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
 

Author Comment

by:juliuscrassus
ID: 1540079
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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Package creation on OS X uses the PackageMaker utility installed as part of the XCode development suite ( on the OSX Client CD).  Packages can be installed as part of the machine build process, or later using Apple Remote Desktop. They are generally…
There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
Users will learn how resize a batch of photos from a single command in Photoshop via Photoshop's Image Processor. Open up an Image you'd like to resize in Adobe Photoshop: Adjust the image size according to your preferences. Image > Adjustments > …
Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now