Groups | Blog | Home
all groups > flash actionscript > december 2004 >

flash actionscript : SoundObject "bug" in MX 2004?


highlander_1
12/25/2004 9:38:27 PM
I have 4 movies.swf at 4 levels.
In "myNavigationMovie.swf" on level0 there?s a backgroundSound playing
(mySound1)

I have 2 movieClip "buttons" thats start mySound4 and mySound5 onRollOver and
onRollOut
in "myFourthMovie.swf", on level4.

Here?s the strange thing thats happends:

1. When I?m testing "myFourthMovie.swf" by itself the sounds starting and
playing
onRollOver and onRollOut. No problems

2. When I?m playing these movies, on level 1-3 together with
"myFourthMovie.swf"
loaded into level4, I dont?t here any sounds playing on the event onRollOver
and onRollOut,
I dont here any sounds playing from level4.

But onRollOut - MySound1 is stop playing in "myNavigationMovie.swf" at level0.
Spooky!

Why? Is there a bug in Macromedia MX 2004 or what?


The code in myFourthMovie.swf in level4 in myMainMovie:

stop();
mySound4 = new Sound(_root.SoundPlaceholder4);
mySound5 = new Sound(_root.SoundPlaceholder5);
mySound4.attachSound("forcefield");
mySound5.attachSound("fadeout");
_root.kund1.onRollOver = function(){
_root.kund1.kund_over.gotoAndPlay(2);
mySound4.start(0, 0);
// trace("mySound4 has been started");

};
_root.kund1.onRollOut = function() {
_root.kund1.kund_over.gotoAndPlay("fade");
mySound4.stop();
// trace("mySound4 has stop");
mySound5.start(0, 0);
// trace("mySound5 has been started");
_root.kund1._alpha = 100;
};

Glad if anyone could answer something out there
:)
kglad
12/26/2004 4:58:38 AM
highlander_1
12/26/2004 7:36:28 AM
Ouups, but how should a correct targetingpath look like?
highlander_1
12/26/2004 1:56:30 PM
Originally posted by: kglad
that's not a bug. your attachSound() statements cause flash to look for linkage id's in the main (_level0) library.

kglad
12/26/2004 4:06:36 PM
use a relative path to SoundPlaceHolder4 and 5. perhaps:

mySound4 = new Sound(this.SoundPlaceholder4);
highlander_1
12/26/2004 4:25:54 PM
WOW - great it works
Thanks! :beer; :beer; :beer;
kglad
12/26/2004 4:37:50 PM
you're welcome. sorry about the partial/rushed answer. (i had christmas obligations and was periodically rushed out away from my computer.)

AddThis Social Bookmark Button