Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sound problem

Status
Not open for further replies.

brainpudding

Technical User
Sep 29, 2002
84
0
0
US
shouldnt this work. the btnlogo is on themain timeline

//MUSIC
playing=false;
btnlogo.onPress=function(){
if(playing==false){
_root.mysound = new Sound();
_root.mysound.loadSound("music/cpjingle.mp3", true);
_root.mysound.start();
_root.mysound.setVolume(50);
playing=true;
}else{
_root.mysound.stop();
playing=false;
}
}
 
oh and it works locally .. just not when its up on the web ...
 
How long do you wait for it to play? Since its streaming, it has to recieve enough data to start playing...
Regards,
FLASHfreak :)
 
i just wqant it to play once .. and if they click it while its playing it stops. it works locally but not on the web .. so im thinking maybe its a pathing thing? the web page that the swf is in the main .. and in there is a folder called music which contains the cpjingle.mp3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top