I am creating a site for which an audio file to be played with an equalizer is necessary for me so far as the AS3 There is a lot to know about, so this can be a simple question.
I have found an example that I want to use and
the equalizer object (from the tutorial) on the forum to add code
Package {import flash.media. *; Import Flash.net *; Import flash.display. *; Import flash.events *; Import com.everydayflash.equalizer. *; Import com.everydayflash.equalizer.color. *; Public Class Main Sprite Expands {Public Function Men () {var s: Sound = New Sound (New URLRequest ("track.mp3")); S.play (0, 100, new SoundTransform (1, 0)); Var es: EqualizerSettings = New EqualizerSettings (); Es.numOfBars = 32; Es.height = 64; Es.barSize = 2; Es.vgrid = true; Es.hgrid = 2; Es.colorManager = New SolidBarColor (0xffff4444); Es.effect = EqualizerSettings.FX_REFLECTION; Var E: Equalizer = New Equalizer (); E.update (te); E.X = 100; E.I = 100; AddChild (E); AddEventListener (Event .ENTER_FRAME, e.render); }}}
It creates a vertical oriented equalizer with some beautiful effects.
However, I should be horizontal, so I believe I need to rotate "e" 90 degrees. Do any of you have to do this? Or is there a specificly defined orientation by the action script which makes it?
Thank you for your help.
below the rows:
ex = 100; E.I = 100; Try adding
:
e.rotation = 90;
I believe that should work, but you have some problems with the location of the pivot point (whether you rotate 90 degrees around the center, or on the top left) Maybe.
Comments
Post a Comment