logo-dw

Go Back   Dreamweaver Club Forums > Graphic Design > Flash
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 01-31-2008, 02:49 PM   #1
dsnyder
dsnyder's Avatar
 
Join Date: Mar 2007
Location: Sexy Cleveland, OH
Posts: 128
Default can't disable auto play...

I'm customizing a mp3 template and can't figure how to disable the auto play. I believe that I need to alter something in the following AS but I can't figure it out. Any help?

THANKS!
Code:
 //playpause buttons
              if (playing) {
                          PlayPauseButton.PauseButton._visible = true;
                          PlayPauseButton.PlayButton._visible = false;
              } else {
                          PlayPauseButton.PauseButton._visible = false;
                          PlayPauseButton.PlayButton._visible = true;
              }
   
  //function for loading a new song to play
  function loadSong(num) {
              delete theSong;
              theSong = new Sound();
              currentSong = num;
              //set right title
              trackbar.track_title.text = allSongs[num]["title"];
              //load song
              theSong.loadSound(allSongs[num]["songURL"],true);
              playing = true;
              theSong.start(0);
              //go to next song oncomplete
              theSong.onSoundComplete = function() {
                          //go to next song
                          currentSong += 1;
                          //if you are at the last song, go to the first
                          if (currentSong>=allSongs.length) {
                                      currentSong = 0;
                          }
                          loadSong(currentSong);
              };
  }
   
  //Buttons
  PlayPauseButton.PlayButton.onPress = function() {
              theSong.start(rememberPosition/1000);
              playing = true;
  };
   
  PlayPauseButton.PauseButton.onPress = function() {
              rememberPosition = theSong.position;
              theSong.stop();
              playing = false;
  };
__________________
Derek Snyder cellist

www.cellocelli.com
www.oblivionproject.com
www.pizzicato4.com

dsnyder is offline   Reply With Quote
Old 01-31-2008, 04:11 PM   #2
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

where you have

playing = true;

you could try

playing = false;
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 01-31-2008, 05:50 PM   #3
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

That's from the onPress event david...
domedia is offline   Reply With Quote
Old 01-31-2008, 06:00 PM   #4
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

its also from the loadSong() function

i imagine that this is called initially
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 01-31-2008, 06:05 PM   #5
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

yes, my bad. Nice, now dsnyder knows not to disable the play button at least
domedia is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:45 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com