Copy link to clipboard
Copied
I recently started getting reports of "choppy" animation on the pets on my virtual pet website. At first I couldn't replicate the issue, but after updating my Flash Player to version 16.0.0.235, I could. My site's biggest competitor also uses Flash for their pets, and theirs don't seem to have any problems, which makes me wonder if my SWF's code could be changed as a workaround to a bug in the new Flash Player.
Here is what is happening: any FLVs that loop, like breathing animations or eating, play fine the first time, but after the first time, the video freezes, but the audio continues to loop. It is as if each FLV can't be played more than once.
Basically, what I'm doing in my code is
moviclipname.addChild(videoname);
videoname.play();
videoname.addEventListener(VideoEvent.COMPLETE, functionname);
then in the function...
videoname.stop();
videoname.removeEventListener(VideoEvent.COMPLETE, functionname);
videoname.getVideoPlayer(0).stop();
videoname.getVideoPlayer(0).autoRewind=true;
movieclipname.removeChild(videoname);
Is there a better way to code this so that it works with all versions of Flash Player?
Sorry, I did already post this in the Flash Player forum, but I don't know if that was the correct place.
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now