I have two levels one for "movie1.swf" the other "movie2.swf",
movie1 is on level 0, movie2 is on level 1.
I made a class "MySound", a class that extends the Sound class.
The problem is that I tried to use MySound class on movie2 and is not working.
It only works when I use MySound class on level 0.
The Sound class constructor function has a parameter "target" use to
point to a object. I think it is use to setVolume and other things.
How can I use the same method?
I´ve tried to setVolume with my class ("MySound"), once for each
sound and it worked for both, I mean, example, I have sounds "s1"
and "s2", I tried to set the volume of s1 to 50 and s2 to 0 like this:
But, both sounds volume were setted to 0.
How can I use the same method of targeting an object so the setVolume
works properly in MySound class?
MySound class has no constructor function declared, so I thought it could
work the same as Sound class.
How can I use setVolume method in MySound class?
The main reason I´m making a MySound class is because in MySound class I have methods that pauses and resumes the current sound object.
I know I can make it directly through script with Sound class, but with MySound class it gets better to write script to work with sounds.
So I can just use s1.pause() s1.resume(), instead of creating a variable each time for each sound object.