flash mx 2004 - as 2 - movie clip control

  • the_Maven
  • Graduate
  • Graduate
  • the_Maven
  • Posts: 196

Post 3+ Months Ago

I have a sound loaded into a movie clip on the stage. I am trying to set it up where, say, if I press 'p' then the sound pauses. pressing it again resumes playback. Everything I have tried so far doesn't work. This is my current setup:

movieclip is named 'song' on 'song' layer
This is the code on the 'script' frame & layer

Code: [ Select ]
_root.onEnterFrame = function() {
    if (Key.isDown(80)) {
         if (paused) {_root.song.play(); paused=false}
         } else {_root.song.stop(); paused=true}
    }
_root.song.stop();
  1. _root.onEnterFrame = function() {
  2.     if (Key.isDown(80)) {
  3.          if (paused) {_root.song.play(); paused=false}
  4.          } else {_root.song.stop(); paused=true}
  5.     }
  6. _root.song.stop();

What am I doing wrong?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.