0

i have tried add equalizer my online radio. i was used http://www.everyday3d.com/blog/index.php/2008/03/26/classic-sound-equalizer-in-flashas3/

flash source file . it's working fine when i am worked in flash ide. but on my server the equalizer doesnot show. but if the playing file is mp3 format it will worked but if we play the stream url it's not working. i dont know how can i fix this. i am using as3, i am new to flash. please help any one. thanks advance

the equalizer code

 var es:EqualizerSettings = new EqualizerSettings();
            es.numOfBars = 80;
            es.height = 30;
            es.barSize = 3;
            es.vgrid = true;
            es.hgrid = 2;
            es.colorManager = new GradientBarColor(0xffff4444);
            es.effect = EqualizerSettings.FX_REFLECTION;

            var e:Equalizer = new Equalizer();
            e.update(es);
            e.x = 100;
            e.y = 60;
            addChild(e);

            addEventListener(Event.ENTER_FRAME, e.render);
  • You're probably getting a `SecurityError` which can't be seen because you're probably running your Flash content in a non-debugger player. This will happen if you're streaming from another domain. If this is the case you'll need a cross-domain.xml. Read more [HERE](http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html) – Gio Jul 19 '13 at 12:20
  • i did not get any SecurityError. my only problem is my radio player working fine but the equalizer only not showing when the radio play. – Moovendra Dhinesh babu Jul 19 '13 at 13:05
  • Sorry I couldn't catch this. You should post your code where you display the equalizer so we can help. – Gio Jul 19 '13 at 14:13
  • i had posted the code on my question , please see this – Moovendra Dhinesh babu Jul 20 '13 at 05:33
  • It's still not visible in your posted code what method are you using for the equalizer. Most interesting part is in the `Equalizer` class itself. So your posted code doesn't help. As @makc said, I also think that you're using `SoundMixer.computeSpectrum()` method. – Gio Jul 20 '13 at 07:29

1 Answers1

0

What Gio said, SoundMixer.computeSpectrum-based approach, such as the one linked in your question, suffers from security problems. But there are alternatives, for example check this code: http://wonderfl.net/c/euIb/read (some of stream URLs in it are dead, and it might not work right away - so try it with your own stream URL)

makc
  • 1,050
  • 1
  • 9
  • 20