FORUMS: list search recent posts

Problem: Sound Doubling

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
GeoffT
Problem: Sound Doubling
on Mar 8, 2006 at 4:20:16 am

Okay - I thought I had this resolved, but a new problem has surfaced. I'm using the below code to attach sound and then control volume. This code is in external swf. When this swf loads on to main timeline, the sound "doubles" - and I can't figure out why or how to stop it from happening. It doesn't happen when I test the swf alone - only when loaded externally. I added the trace action to see if the timeline was restarting, but it's not.

Anyone have any ideas?

Thanks.

------------------
this.createEmptyMovieClip("loopMc", this.getNextHighestDepth());
var loop:Sound = new Sound(loopMc);
loop.attachSound("loopy");
loop.setVolume(0);
loop.stop();
trace("just before sound object");
loop.start(0, 999);

function fadeIn () {
this.onEnterFrame = function() {
loop.setVolume(loop.getVolume() + 2);
if(loop.getVolume() > 99) {
delete this.onEnterFrame;
}
}
}

function fadeOut () {
this.onEnterFrame = function() {
loop.setVolume(loop.getVolume() - 2);
if(loop.getVolume() < 1) {
delete this.onEnterFrame;
}
}
}


Geoff



__________________



"The more I learn, the more I realize how little I know."


Return to posts index

GeoffT
Re: Problem: Sound Doubling
on Mar 8, 2006 at 9:58:02 pm

I figured it out - sort of. I had a loadMoveClip action later in the same timeline. For some reason that action was triggering the sound to start - and double. I've solved the doubling, but am not sure why the loadMovieclip method would cause that to happen...

Geoff



__________________



"The more I learn, the more I realize how little I know."


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]