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
153 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

746 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

12 Experts available now in Live!

Get 1:1 Help Now