Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorcahlander
    • CommentTimeJul 6th 2007
     
    I've built a page to play bird songs.

    1. One page uses the player from premiumbeat.com, which uses swfobject.js. A test version is located at

    http://moumn.org/audio/playerMultipleMenuPackage/sampleEmbedCode.html

    It is interesting that the playlist can be generated dynamically with the playlist.php script from a database. I'd like to be able to stop after playing one "track".

    2. Another page is built with multiple single buttons.

    http://moumn.org/cgi-bin/audio.pl

    This looks just fine, but it uses 50-100% of the CPU to run the page, with none of the buttons active. How can I keep this from being CPU intensive?
    • CommentAuthorAran
    • CommentTimeJul 7th 2007
     
    1. This must be controlled from within the flash file. Perhaps the mp3 player being use don the page has a paramter about auto playing the next track? If it does, you you can pass it through swfObject via the addVariable() command. Have a look here on adding variables: http://blog.deconcept.com/swfobject/#examples

    2. Again, this is an issue with the flash file. The player has some code which is doing some checking on what is called an onEnterFrame(). This means the code runs x times every second (where x is the frame rate of your .swf). So if you have a .swf authored at 31 fps, the code will try to exectute 31 times a second (once every 32 ms). If you have ~60 seperate audio players all trying to do this on the page, your CPU will be working really hard to try to keep up.

    You might want to find a simple audio player which isn't doing so much checking.

    Cheers,
    Aran