Help with audio PLEASE!!!

  • kari03
  • Newbie
  • Newbie
  • kari03
  • Posts: 5

Post 3+ Months Ago

Hi, I'm creating a flash application for a pocket PC. the way it works is that the user types in a number on a keypad and presses play and an audio track plays according to the numer they typed in. this is the function called when the user presses play:


function DoMP3() {
trace(myMP3.getVolume());
myMP3.loadSound(String(display) + ".mp3",true);
myMP3.start();
myMP3.onSoundComplete = function(){
display=0;
}
}


there is also another keyframe with credit information. if the user is listening to the audio and presses the credit button it goes to frame 10 and the audio continues to play. then, if the user hits the back button it goes back to frame 1, but the audio stops playing. i want the audio to continue playing no matter what frame the user is looking at, until they press the stop button. can anyone help me with this PLEASE!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

easy solution...
have the whole sound device be a movieclip placed within the _root movie.

this way, when someone navigates around on the timeline of the root movie, they don't end up messing with the sound movie (which contains the play and stop buttons, sound, etc.)...
if you want, you can even have the input buttons and whatnot exist on the root movie, just be sure to make the variables they produce be _global...

oooh... i shouldn't be giving advice this late.

peace,
puck
  • kari03
  • Newbie
  • Newbie
  • kari03
  • Posts: 5

Post 3+ Months Ago

Thanks Puck! however i tried this and it didn't work. i have the controller in a swf embedded in a movie clip in the first frame of my new document. and then frame 5 has the credit information. the audio still stops when i move to frame 5. any other ideas?
thanks!!
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

does the sound controller swf have its own layer in the root movie?
  • kari03
  • Newbie
  • Newbie
  • kari03
  • Posts: 5

Post 3+ Months Ago

yes
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

okay... i'm a little stumped, but...
your sound controller... you said 'embedded', which makes me think that it's in the library of the _root movieclip...
i think it's generally safer to call an external movieclip...
make the sound controller its own flash document, publish it as a swf in the same directory as the main movie...
then create an empty movieclip in the main movie in the top left corner of where you want the sound controller to be... give the empty mc an instance name of "soundloader"
put in some script like:
Code: [ Select ]
loadMovie("soundcontroller.swf","soundloader");

and see if that works...

of course, you may already be doing it that way... not sure... in any case, try loading the sound controller from an external swf, that's always how i do it and it works for me... so... grrr... wish i could give better advise... i appreciate your patience...

peace out.
  • kari03
  • Newbie
  • Newbie
  • kari03
  • Posts: 5

Post 3+ Months Ago

Thanks for the help!
ok, so i have it working now. . . on a layer in the _root movie there is a "controls_mc" that loads "a_mc". on frame 5 i need this movie clip still in the layer for the audio to continue playing, but i want all of the buttons to be enabled. i have tried adding:

_parent.controls_mc.a_mc.btn_1.enabled = false;_parent.controls_mc.a_mc.btn_2.enabled = false;
_parent.controls_mc.a_mc.btn_3.enabled = false;
_parent.controls_mc.a_mc.btn_4.enabled = false;

etc.
to the 5th frame actions. but for some reason the buttons are still enabled.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 12 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.