Skip to main content
appandrew
Inspiring
August 18, 2011
Answered

Sound bug CS5.5 & AIR 2.7.1 with small testcase!

  • August 18, 2011
  • 2 replies
  • 1485 views

Hallo,

this is a serious bug in AIR 2.7.1. As posted in another threat (I opened a new one because of the importance and the testcase) with AIR 2.7.1 suddenly the sound handling of sounds embeded in nested movieclips in the timeline run wild.

This is the old threat:

http://forums.adobe.com/thread/891766?tstart=0

I coded a small testcase.

Please download the FLA from our server:

http://apps.oetingerverlag.de/Soundbug_AIR_2.7.1.fla.zip

You'll find a scene with a book cover and one button.

If you push the button, an event is dispatched and a movieclip (the pig) is started and the pig makes some piggish noises.

In the background there is a small animation running, the beaver dips his foot into the water.

CASE 1, AIR 2.7:

If you compile this with Flash Pro CS5.5 and AIR 2.7 (overlayed over 2.6, as described by Adobe http://kb2.adobe.com/cps/908/cpsid_90810.html ) all is well:

If you don't push the button the pig won't move and won't make a sound.

If you push the button the pig is animated and makes a noise, after this the pig is silent again.

CASE 2, AIR 2.7.1:

If you compile it with AIR 2.7.1 overlayed, after a few seconds the pig noises start, even if you don't click the button!

And with every loop of the main animation another instance of the pig noise is started, just wait, sounds kind of funny (well, it would be funny if it wouldn't be such a big problem for us now - we couldn't deploy our three Android-apps, because in the Android Market there is only AIR 2.7.1 as runtime).

So: There is a big problem, and I think some more developers will be affected by it.

Any suggestions?

We could of course delete all sounds on timelines and start the sounds via actionscript 3, but we have three projekts and lots of sounds...

This topic has been closed for replies.
Correct answer appandrew

Implemented a workaround:

Case:

a) There is a main MovieClip with the background.

b) in this main MovieClip another MovieClip is placed, with an animated pig and some piggish noise audio

The bug manifests itself, if you use a normal timeline sound configuration like this (this is part of the nested mc with the animated pig):

In frame 2 the sound on the timeline starts. With AIR 2.7.1 this leads to weird sound bugs, the sounds on the timeline are all started, the stop()-comand in the top layer is ignored (but only for the sound, the animation does not run automatically. This is really strange!).

Workaround:

a) load the pig sound via actionscript in the main MovieClip:

var scene2SoundPig:Scene2SoundPig = new Scene2SoundPig();

Call the sound directly from the timeline, at the same position:

The code for this (in the blue marked rectangle) is:

MovieClip(parent).scene2SoundPig.play();

Now it all works as usual (like it does in 2.7).

One thing to look out for:

The sound in the timeline plays as long as there are frames, this could be e.g. 5 seconds.

The workaround plays your COMPLETE sound, e.g. 10 seconds.

So if your sound is somewhat longer than the portion you played via the timeline, you have to shorten the sound with e.g. SoundBooth.

2 replies

appandrew
appandrewAuthor
Inspiring
October 5, 2011

This problem was verified by Adobe. Please use the workaround if you're using AIR 2.7.1.

With AIR 3.0 this problem is solved.

Colin Holgate
Inspiring
August 18, 2011

As a clue perhaps, putting a stop action in the outer movieclip stops the sound from triggering until you touch the pig. But then the beaver's foot doesn't move as intended.

appandrew
appandrewAuthor
Inspiring
August 19, 2011

Yes, I did this while testing. Another workaround is to take all the Sounds from the timelines of the nested movieclips and load and play the sounds via actionscript. I guess I have to do this, because even if Adobe fixes this bug it will take a long time to get an update (if they patch it it could be that the bugfix is released with AIR 3.0, and this will take a while).

I reported the bug to the bugbase yesterday and uploaded the testcase:

https://bugbase.adobe.com/index.cfm?event=bug&id=2945792

If you can verify this bug - everybody who encounters this bug - please go to the bugbase using the link above and vote for it.

appandrew
appandrewAuthorCorrect answer
Inspiring
August 19, 2011

Implemented a workaround:

Case:

a) There is a main MovieClip with the background.

b) in this main MovieClip another MovieClip is placed, with an animated pig and some piggish noise audio

The bug manifests itself, if you use a normal timeline sound configuration like this (this is part of the nested mc with the animated pig):

In frame 2 the sound on the timeline starts. With AIR 2.7.1 this leads to weird sound bugs, the sounds on the timeline are all started, the stop()-comand in the top layer is ignored (but only for the sound, the animation does not run automatically. This is really strange!).

Workaround:

a) load the pig sound via actionscript in the main MovieClip:

var scene2SoundPig:Scene2SoundPig = new Scene2SoundPig();

Call the sound directly from the timeline, at the same position:

The code for this (in the blue marked rectangle) is:

MovieClip(parent).scene2SoundPig.play();

Now it all works as usual (like it does in 2.7).

One thing to look out for:

The sound in the timeline plays as long as there are frames, this could be e.g. 5 seconds.

The workaround plays your COMPLETE sound, e.g. 10 seconds.

So if your sound is somewhat longer than the portion you played via the timeline, you have to shorten the sound with e.g. SoundBooth.