Solved

How do I pause the movie at the first frame and make it so that when the users hits control and enter it begins to play

Posted on 2004-08-13
2
186 Views
Last Modified: 2010-04-03
How do I pause the movie at the first frame and make it so that when the users hits control and enter it begins to play from the 2nd frame on?
0
Comment
Question by:groovymonkey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
dutchfoxer earned 250 total points
ID: 11794206
SIMPLE SOLUTION:
On first keyframe create an empty keyframe with actionscript:

on (release, keyPress "<Enter>") {
     gotoAndPlay(3);
}

On second keyframe create an empty keyframe with actionscript:
gotoAndPlay(1);

On 3rd you start you movie or something.

---------
MORE advanced:

mykeyListener = new Object();
mykeyListener.onKeyDown = function () {
   if (Key.isDown(Key.CONTROL) and Key.isDown(Key.ENTER)) {
      gotoAndPlay(2)
   }
}
Key.addListener(mykeyListener);
stop();



And bellow the Macromedia Actionscript Dictionary about the subject:
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary393.html

Good luck!
0
 
LVL 1

Expert Comment

by:techE_or_not_techE
ID: 11794264
Control and enter is a BAD combination -- that just starts the movie over.  You might want to think about something else, like:  CTRL + SHIFT

Try this:

var key:Object = new Object();
key.onKeyDown = function() {
      if (Key.isDown(Key.CONTROL) && Key.isDown(Key.SHIFT)) {
            _root.gotoAndStop(2)
      }
};
Key.addListener(key);
stop();
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Failed download 57 593
High definition conversion videos in YouTube 12 302
Open Source MP4 Flash Player 2 204
Can't enable Flash on Chrome 32 Windows 7 any more 2 78
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

734 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