Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-04-2003, 10:43 PM   #1
Displaced
Registered User
 
Join Date: May 2003
Location: UK
Posts: 25
Angry problems with sound

Can anybody see anything wrong with this script

the first section of script is on the first frame of the first scene and it fades in a piece of music and it works fine.


************************************

naviSound = new Sound(this);
naviSound.attachSound("navi");

projectsSound = new Sound(this);
projectsSound.attachSound("projects");
projectsplaying=false;

navisound.setvolume(0);
navisound.start(0,200);
naviplaying=true;
myLoopVolume=0;
fadein01=1

navimc.onEnterFrame = function () {

if (fadeIn01==1) {
navisound.setVolume(myLoopVolume);
myLoopVolume=myLoopVolume+3;

if (myLoopVolume>99) {
fadeIn01=0;
}
}
}
*********************************

This section of script is in the second scene on a button and when clicked should fade in a second piece of music but what it actually does is when the set volume to zero it mutes all the music then fade them both up together.....

what I want is for the first piece to be playing normally with the second piece fading in

been messing with this for a while trying several variations

I have tried assigning each piece of music to seperate mc but this just didnt work

just cant get it sorted


*********************************

on (rollOver) {
setProperty("stuff 1", _alpha, "0");
}
on (rollOut) {
setProperty("stuff 1", _alpha, "100");
}
on (release) {
gotoAndPlay("Scene 3", 1);




if (projectsplaying==false) {
projectssound.setVolume(0);
projectssound.start(0,200);
projectsplaying=true;
projectsvolume=0;
fadein02=1
projectsmc.onEnterFrame = function () {

if (fadeIn02==1) {

projectssound.setVolume(projectsvolume);
projectsvolume=projectsvolume+3;

if (projectsvolume>50) {
fadeIn02=0;

}
}
}


}
}


cheers for any help

Col
Displaced is offline   Reply With Quote
Old 06-04-2003, 11:41 PM   #2
sneeuwitje
...
 
sneeuwitje's Avatar
 
Join Date: May 2003
Location: rotterdam, NL
Posts: 676
Default

i'm no expert on sound, but here's what worries me:
Quote:
on (rollOver) {
setProperty("stuff 1", _alpha, "0");
}
on (rollOut) {
setProperty("stuff 1", _alpha, "100");
}
on (release) {
gotoAndPlay("Scene 3", 1);
I think looks better this way:
ActionScript Code:
on (rollOver) { // should not have spaces in object names // and why make a string of what should be a number? setProperty("stuff_1", _alpha, 0); } on (rollOut) { // should not have spaces in object names // and why make a string of what should be a number? setProperty("stuff_1", _alpha, 100); } on (release) { // scenes are addressed as [scene nr],[frame nr], not strings gotoAndPlay(3, 1);
...
__________________
Little bit off-Flash lately ... back soon hopefully
sneeuwitje is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:36 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.