Solved

Pause or Stop then Resume on Click or Key Press

Posted on 2006-07-22
6
301 Views
Last Modified: 2008-02-01
I have a Flash (I'm using Flash Professional 8) file and basically what I want to do it pause or stop it (I can get it stopped using the stop(); command, but can't resume it...).  Then, have the file resume the next frame on a mouse click or by the press of a keyboard.

And, can I do this without buttons?  If not, any way would be helpful.  Thanks in advance!
0
Comment
Question by:CecilAdmin
[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
  • 3
  • 3
6 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 17161885
is this the main flash movie or a clip in the movie?

and yes you can do it without buttons.. how have you been trying to start it playing?

Z
0
 

Author Comment

by:CecilAdmin
ID: 17161892
This is the main flash movie.

I just had a stop(); on one frame and a play(); on another... I've tried goToAndStop();, but I can't really get it.  I'm not really a flash guru, so I am probably overlooking something obvious...
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 17162277
make an empty movieclip.. go..insert/symbol.. name it empty clip

find it in the library.. drag it to a position off the side of the stage..

with it selected put the following code on it..

onClipEvent(keyDown){
    if(Key.getCode() == 32){ //space bar
    trace("stop");
     _parent.stop();
               }
}
onClipEvent(keyDown){
      if(Key.getCode() == 39){  //arrow right
            trace("go");
            _parent.play();
            }
}

Z
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:CecilAdmin
ID: 17164088
I've followed these steps...

When I hit spacebar is stops the animation, but the sound keeps playing.... is there a way to pause/stop everything?
0
 
LVL 23

Accepted Solution

by:
Zeffer earned 500 total points
ID: 17164386
nClipEvent(keyDown){
    if(Key.getCode() == 32){ //space bar
        _parent.stop();
        stopAllSounds();
               }
}
onClipEvent(keyDown){
     if(Key.getCode() == 39){  //arrow right
          _parent.play();
          }
}

Z
0
 

Author Comment

by:CecilAdmin
ID: 17164495
Thanks a lot for all of your help!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

631 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