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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Accessing Live Dynamic Stream 6 190
How  to reduce the .AVI file size of 90GB 4 342
Adobe Presenter not Publishing Slide Theme 17 120
Web browser crash when play videos 24 256
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 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…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

911 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

17 Experts available now in Live!

Get 1:1 Help Now