Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
196 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 1000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

662 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