Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

LINGO in Mac Director6.5

Posted on 1998-10-06
6
Medium Priority
?
621 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Steve Jobs once said that Blu-ray is "a bag of hurt". As Macs users well known, things haven’t settled down (at least not from Apple’s perspective). Several years after that comment, Mac OS X still doesn’t support Blu-ray playback, nor has any Mac s…
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…

581 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