Flex Mobile - Sound Effect not Playing on List snapping (code sample provided)

Hello All,
I'm trying to figure out how to play a Sound Effect on the trigger of the "changing" event on a List.
So basically I have:
<s:List id="theList" width="100%"
            itemRenderer="MyIconItemRenderer" verticalScrollPolicy="off"
            pageScrollingEnabled="true" scrollSnappingMode="center"
            caretChange="playSound(event)"> ... </List>
So the list above snaps to the item to be centered, though I would like on every snap, for it to make a click sound. I've added the method for playing the sound as:
private var tickChange:Sound;
private var soundEffectURLRequest:URLRequest = new URLRequest('/assets/sound/click.mp3');
protected function playSound(event:IndexChangeEvent):void  {      
     tickChange = new Sound(soundEffectURLRequest);
     tickChange.play();
The Sound effect plays, though it's not playing at every Snap interval, so if I scroll fast among them, it's not playing, only on the last selection.

I can´t believe it.. While writing the previous post, I thought on a really simple solution and compiled it to give it a try. It works perfectly!
As simple as setting the "cacheAsBitmap" property to "true" on the Spark lists of the views!! 

Similar Messages

  • OpenAL sound effects not working .. Please Help

    Hi
    I ported OpenAL to our platform and able to play the wav files.
    I wrote a sample openal application and try to produce some sound effects.
    Play back of audio is working but sound effects are not working.
    I am using jungle.wav which is mono channel sound wave file as input
    # The Code snippet used is mentioned below.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>
    #define NUM 2
    alutInit(0,0) ;
    alGetError();
    SourcesPos[0] = SourcesPos[1] = SourcesPos[2] = 0.0f;
    ListenerPos[0] = ListenerPos[1] = ListenerPos[2] = 0.0f;
    ListenerOri[0] = 0.0f;
    ListenerOri[1] = 0.0f;
    ListenerOri[2] = -1.0f;
    ListenerOri[3] = 0.0f;
    ListenerOri[4] = 1.0f;
    ListenerOri[5] = 0.0f;
    alListenerfv(AL_POSITION, ListenerPos);
    alListenerfv(AL_ORIENTATION, ListenerOri);
    alGenBuffers(NUM, Buffers);
    Buffer[0]= alutCreateBufferFromFile("/Res/jungle.wav");
    err = alutGetError();
    alGenSources(NUm, Sources);
    alSourcei (Sources[0], AL_BUFFER, Buffers[0] );
    alSourcef (Sources[0], AL_REFERENCE_DISTANCE, 25*2);
    alSourcefv(Sources[0], AL_POSITION, SourcesPos);
    SourcesPos[0] = 200;
    SourcesPos[1] = 200;
    SourcesPos[2] = 25;
    alSourcefv(Sources[source], AL_POSITION, SourcesPos);
    alSourcePlay(Sources[source]);
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>
    I am expecting the sound to be played in the right headphone/speaker.
    But the sound is played in both the headphones.
    I used wave device and generated the output.wav file.
    In that file also the sound is played in both the headphones.
    I used the following settings for configuring OpenAL alsoft.conf.
    Someone please help me the error in the above code.
    Does OpenAL able to generate the right sound or left sound effect depending on the co ordinates
    format = AL_FORMAT_STEREO16
    cf_level = 0
    frequency = 44100
    refresh = 4096
    sources = 256
    stereodup = false
    drivers = osp // Our platform
    excludefx =
    layout_STEREO = fl=-90, fr=90
    layout_QUAD = # Sets the speaker layout when using quadriphonic output.
    # Available speakers are back-left(bl), front-left(fl),
    # front-right(fr), and back-right(br).
    # The default is:
    bl=-135, fl=-45, fr=45, br=135
    layout_51CHN = bl=-110, fl=-30, fc=0, fr=30, br=110
    layout_61CHN = sl=-90, fl=-30, fc=0, fr=30, sr=90, bc=180
    layout_71CHN = bl=-150, sl=-90, fl=-30, fc=0, fr=30, sr=90 br=150
    device = default
    periods = 0
    capture = default
    mmap = true
    [wave] # Wave File Writer stuff
    file = # Sets the filename of the wave file to write to. An empty name
    # Default is empty
    volume = 100
    Thanks
    Swaroop

    Hi,
    You might want to check out connect.creativelabs.com to see how they can help you.

  • My recorded footage without sound will not play, but will when recorded with sound, any ideas?

    Hi there community!
    I have recorded alot of footage on a digital Harinezumi 3 camera and have run into a problem in post production.
    Some of the footage is recorded with sound, and plays fine.  However, with most of the footage, i chose to turn the recording of sound off.  These files without sound will not play in any player, even when Perian is installed.
    These are the specs of the video I have been able to find out.
    File type: .AVI
    Video Stream: JPEG
    This is all I can find out, so I am thinking it is an M-JPEG file rendered as an AVI file.  VLC player says it can not play the video or audio format 'undf', whatever that means.  Another player says it needs a .moov encoder, but I do not see how this is possible.  I have also tried attaching audio to it via Logic 9 with no success.
    I am at a loss, and I really need this footage for a project.  Any ideas?
    Thanks for any help!!

    It won't let me post the video in the forum, so here is a link to it in dropbox.
    https://www.dropbox.com/s/k4nz8mg18p4thzd/Mountain%203.AVI?n=145237283
    Accessed the file at dropbox. Played the DropBox "display" file in scripted player, played the same resource file using the Safari plug-in, and then downloaded the resource file using the QT 7 Pro "Open URL" option only to learn that this file was an H.264 transcode and not your original file. Used the DropBox download option to download the original Motion JPEG file in AVI file container. File plays as is in both QT X v10.2 and QT 7 v7.6.6 players under Mountain Lion v10.8.4 on my system.
    Motion JPEG is one of the "lagacy" codec components turned off under Lion and which remains turned off under Mountain Lion. However, as I understand it, Motion JPEG files are supposed to be passively supported (playback supported) under these systems but requires the codec to be turned back on if you wish to export files using this codec. I turned both Motion JPEG and Motion PNG codecs back on quite a while back and have Perian installed which, as you can see, supplied the OpenDML version of the Motion JPEG codec component to actually play your file on my system. Unfortunately, since QT uses a LIFO codec component list generation strategy, I would have to remove Perian to test whether or not the system configured Motion JPEG component would then become the active decoder. (Did this a year or two ago but not willing to do so again at this time.)
    Suffice it to say, the file should play in QT on your Mountain Lion system assuming the correct version of Perian is installed, it is actually active, and you have no conflicting software or hardware installed on your system. Have posted an MOV file containing your Motion JPEG video data in case you want to see if it will play correctly on your system.
    http://downloads.walker4.me/downloads/Temporary_files/Mountain%203.mov

  • Randomize sound Effect and play effect from a spinnerList

    I have two separate questions:
    I have 8 different sound effects and a spinner list, in simpler terms, what do I need to do to assign 1 sound effect to each of the selections on the spinnerList, and then have the corresponding sound effect played when the user presses a button?
    Secondly, what do I need to do to make it so that every time a dofferent button is pressed, it plays a random one of those 8 sound effects?
    Some sample code would be great. Thanks.

    The basic approach to picking something randomly:
      // here's my array of items to choose from
                                            var strings:Array = ["a", "b", "c", "d", "e", "f", "g", "h"];
      // pick one of the items randomly
      // Math.random() gets a random # n where 0 <= n < 1
      // Multiply by array length to get a random index
      // Math.floor() makes it an integer index where 0 <= n < Array.length
                                            var s:String = strings[(Math.floor(Math.random() * strings.length))];
    HTH,
    -- Tom

  • I am getting no sound on my macbook pro. The sound does not play when I plug in headphones either.  I have tried making it louder quieter, restarting my computer, HELP!

    I am getting no sound on my macbook pro. The sound does not play when I plug in headphones either.  I have tried making it louder quieter, restarting my computer, HELP!

    There are many possible causes for this issue. Take each of the following steps that you haven't already tried.
    1. Start with the steps recommended in this support article. Don't skip any of the steps. It's the starting point for further efforts to solve the problem.
    2. If your model has an audio-out (headphone) port, and anything is plugged in, unplug it before putting the system to sleep.
    3. If you've installed something called "Memory Clean" or any other third-party software that is supposed to "clean" or "purge" memory automatically, remove it according to the developer's instructions and reboot. You should do that even if the software is not causing the problem, because it's useless.
    4. If you've installed an equalizer called "Boom" or anything similar, update or delete it and reboot.
    5. If an AirPlay device is selected for sound output from iTunes (or from other applications via third-party software such as "Airfoil"), deselect it.
    6. Launch the application "Audio MIDI Setup" by entering the first few letters of its name in a Spotlight search and selecting it in the results (it should be at the top.) Select the Output tab. If the Mute boxes are checked, uncheck them. Move the Volume sliders all the way to the right.
    7. If a red light is coming from the audio-out port, the internal switch is stuck in the position for digital output. You may be able to free it by inserting and removing a mini-stereo jack of the proper size. Inserting any kind of tool in the port may cause damage that won't be covered by your warranty.
    If there's no red light, the switch may still be stuck in the headphone position. Try to free it the same way.
    8. Disconnect all wired peripherals except keyboard and mouse, if applicable. If more than one display is connected, disconnect all extra ones. Reboot and test.
    9. Boot in safe mode. Don't log in; just reboot as usual when the login screen appears. When you do, make sure the words "Safe Boot" do not appear in the login screen. If they do, the system is still in safe mode and sound won't work.
    10. Reset the NVRAM.
    11. Reset the SMC.
    12. Reinstall OS X after backing up all data. For a possible shortcut, see this thread.
    13. Make a "Genius" appointment at an Apple Store.

  • Message sounds off / Not playing

    Hello, my Message Sounds are Not playing sometimes, especially when i Remove the earphomes. It's Not the switch for Sounds On the left. The phone is set to 'loud'. The ringtone for calls is already loud/on and works ok, but when i Receive a message there is only the vibration but NO sound... It doesn't work until i'm docking the iPhone on a dockingstation  (only the cable doesn't  solve the problem). There is Nothing what clogs the audio port Or the other one. Also Video Or other Sounds  (Podcasts,mp3, Youtube etc) on the iPhone are Not working in this situation...

    Hi , I am having the same problem ! Did you did a solution to it? Xx

  • My iPad will not play sounds on certain applications. ie: if I click on a video from FB sound will not play. If I go to YouTube and play the same video sound will play. Also certain games will no longer play sounds. They always played sounds but now won't

    My iPad will not play sounds on certain applications. ie: if I click on a video from FB sound will not play. If I go to YouTube and play the same video sound will play. Also certain games will no longer play sounds. They always played sounds but now won't now. I just went to my churches web site to watch live service and again no sound. I grabbed my dads iPad and the sound works fine.

    If you lose sounds for keyboard clicks, games or other apps, email notifications and other notifications, system sounds may have been muted.
    System sounds can be muted and controlled two different ways. The screen lock rotation can be controlled in the same manner as well.
    Settings>General>Use Side Switch to: Mute System sounds. If this option is selected, the switch on the side of the iPad above the volume rocker will mute system sounds.
    If you choose Lock Screen Rotation, then the switch locks the screen. If the screen is locked, you will see a lock icon in the upper right corner next to the battery indicator gauge.
    If you have the side switch set to lock screen rotation then the system sound control is in the task bar. Double tap the home button and in the task bar at the bottom, swipe all the way to the right. The speaker icon is all the way to the left. Tap on it and system sounds will return.
    If you have the side switch set to mute system sounds, then the screen lock rotation can be accessed via the task bar in the same manner as described above.
    This support article from Apple explains how the side switch works.
    http://support.apple.com/kb/HT4085

  • I have a MAC running Maverick. MP3 sounds will not play in Safari or FireFox, but will play if you download the file locally to the Desktop. How to resolve this?

    I have a MAC running Maverick. MP3 sounds will not play in Safari or FireFox, but will play if you download the file locally to the Desktop. How to resolve this?

    You probably have an internet plugin installed that is preventing the MP3s from playing. I just checked a site with an MP3, and it played, rather than downloaded.
    The internet plugin folders are at:
    /Library/Internet Plug-ins and
    ~/Library/Internet Plug-ins
    (~/Library is hidden by default. Let me know if you don't know how to access it.)
    My internet plugins were all in /Library; there were none in ~/Library.
    Try moving these folders to the desktop (don't delete them), restarting, and then seeing if the MP3s play.
    They it will be trial and error to see which plugin is responsible.

  • Sound effects not working

    Suddenly my iPad 3 with Retina display isn't playing sound effects in many apps. Music and videos playback audio fine. Sound effects in the Settings app work fine.
    I can change the sound effect for sending Mail through the Settings app and hear what it should sound like, but when I send mail through the Mail app, I hear nothing. Some 3rd party apps sound fine, while others are now missing sound effects.

    Hi atennant2,
    This might be caused by account settings.
    If you have multiple accounts on your Mac sometimes when you do a fast
    userswitch settings of the previous account don't update. If the previous user
    had the volume muted in his settings, the account switch might not reset
    this to the settings you set in your account. Now an os update or big server
    maintenance, account cleaning session can cause these issues as well.
    Try to log in to the account you used previously, make sure that sound
    settings are ok, When sound is working now it's ok for your other account.
    Hope it works,
    JP
    (if not: check in system profile wether there are Garageband folders (2) marked as "Classic", delete them.
    Enable speech in the system preferences, restart)

  • Sound Effects Not working Correctly in Mail 6.0 or Notification Center...

    I recently installed Mountain Lion on my MacBook Pro (2012 Retina Screen, 2.7 GHz Core i7, 16 GB RAM) and all the sound effects are no longer working in the new version of Mail 6.0. There are also Sound Effect problems with the Notification Center. 
    I double checked and all my settings appear to be correct in Mail and in the Sounds & Notification Center Pref Panes.  I also did a PRAM reset to see if that would fix it, and that made no difference either.  In Mail, only some sounds are working. I still get the swoosh sound when mail is sent but not any of the other sounds like when email is deleted or received.  Also, my speakers are working fine for audio etc.
    I called Apple Care and the technician had me on the phone for a while and researched this, but said he could find nothing that was known or had been reported on this issue. As an FYI, to the best of my knowledge I'm not running any incompatible apps.  Every app I am running is listed as being compatible with ML.
    Has anyone else had this issue with the Mail and Notification Center Sound Effects?  I would appreciate any solutions or suggestions.
    Thanks...
    Patrick

    Patrick,
    I have experienced the same symptoms.
    Opening Audio MIDI Setup, and changing the Built-in Output>Format to another choice (2ch-20bit Integer) and then back to the prvious setting (2ch-24bit Integer) briefly fixes the lack of Mail sounds, but unfortunately the problem eventually returns after computer sleep.
    I have tried a Safe Boot, and removed the Audio MIDI plist without success.

  • From good iMovie to iDVD sound track not playing (let us try this again!)

    There was an earlier problem of this posted here...the question was marked ANSWERED...but didn't solve anything for most of us that replied. So let us take it out for another spin...
    Created in iMovie...works perfect in iMovie 6...then SHARE with iDVD. Attempting to preview...no sound track is played/heard.
    Can someone let us know what is going on...how to fix...and why we users are forced to be beta-testers for RELEASED software? This problem seem like something that SHOULD have been found, tested and corrected by release date.
    This product is wasting a lot of user's time and dvd discs.
    Thanks

    This product is wasting a lot of user's time and dvd discs.
    Well I can help you stop wasting disks, at least! Use "Save as Disk Image" to encode the project and create a ".img" file. You can test the final encoding by mounting the .img file and playing it with DVD player in your applications folder. If this has sound, then burn it with Disk Utility.
    iMovie will sometimes tolerate both 12 bit and 16 bit audio. iDVD won't - it must have 16 bit audio. Check the settings on your camcorder with the problem DV tape in it. If it is 12 bit audio, there are fixes listed here:
    http://docs.info.apple.com/article.html?artnum=61636
    http://danslagle.dvmix.com/mac/iMovie/audio/1001.shtml
    http://danslagle.dvmix.com/mac/iMovie/audio/1000.shtml
    I know you say it plays fine in iMovie, but these fixes sometimes help files that work in iMovie but don't work right in iDVD.
    If none of this applies, please let us know, and as F Shippey said, let Apple know too!
    John B.

  • Animation effects not playing correctly in captivate 6 (playing last frame first?)

    Hi there,
    Currently in captivate 6 I have a problem where when an item is coming in using an animation effect the image is flashing up very breifly, dissapearing then playing the animation as it should. it is almost as if it is playing the last split second first then looping round. This only applies to some of the items and not all of them, I have tried redoing them only for the same problem to occur. There is only 1 entrance effect playing on each item and there are 4 items on screen, the second and third images are the ones causing problems although the text and fitst image is fine. I have tried toggling sync with project. This also occurs both in publish and in preview
    Any other ideas?

    Hi Vish,
    All of the items in question are set to display for the rest of the slide and the effect lasts less then a second where each item is on screen for 10+ seconds so there is plenty of the for the entrance effect to play out.
    I have noticed however if I set all of the items with effects to start on the start of the slide the effect plays correctly but that means it isnt synced to the voiceover.

  • Sound effects not working after upgrade

    After upgrading to Yosemite, my system sound effects are no longer working. Instead of hearing my selected Basso sound, my entire screen flashes.  Other sounds, such as the audio track of a video, still work fine. If I use the "afplay" command I can hear a system sound. I also get sounds for incoming and outgoing mail.  But clicking one of the system alert sounds in the "Sounds" preference pane does nothing audible, and in other places where I used to get a Basso sound,  my screen flashes instead.  I'm aware of the Accessibility option that gives the screen flash in lieu of an audible alert, but that is turned off, and I have tried turning it on and back off again, to no avail.  My "Alert volume" is all the way up in the "Sounds" preference pane, and I've slid that back and forth too.
    Can anyone suggest a way to reset whatever got confused in the upgrade, and get my alert sounds back?
    I'm on a 13" mid-2009 MacBook Pro, if that matters.
    Thanks!

    I had same exact problem - Reset PRAM and not works fine. I followed instructions here, and step 5 fixed it: http://www.iphonetopics.com/no-sound-after-upgrading-to-os-x-yosemite/

  • Why does I pad volume show sound effects not volume

    My I pad used to show volume control now it shows sound effects.  Also keyboard clicks not working

    All these effects are part of the loops in the iLife Sound effects loop package, that was a part of the application bundle iLIfe '11 (iPhoto. iMovie, GarageBand '11).  These loops are neither installed by GarageBand 10.0 or GarageBand '11, nor MacOs X, you need an iLife '11 installer disk to get these loops.
    And GarageBand 10 also does not have the Sound Effects instruments any longer, that let you drag samples onto keys. It is one of the sorely missed features, that have been discontinued in the new version GarageBand 10. even if you install the previous version, GarageBAnd '11, to add the Sound effects instrument to GarageBand 10. it will not work properly, because GarageBand 10 will not save the custom instrument with the samples. You will have to complete your song in one session, without quitting GarageBand.
    You may want to send feedback to the Apple Developers about these missing features with a feature request:   Apple - GarageBand Mac- Feedback

  • In Flash the sound does not play only started from the beginning. Can anyone please help?

    In Flash, the sound only plays if the file is started from the beginning. The sound doesn't play if starting from anywhere other than the beginning.
    This is very frustrating when trying to sync the animation with the sound as it's not possible to scroll back and forward with the sound playing. The only way the sound works is if it is started from the beginning.
    If anyone can help that would be fantastic.
    Thanks

    Hi Jeromie,
    Many thanks for your help. Here is some additional information, which may shed light on the problem.
    I am using Flash Professional CC  2014.0 release,  Build 14.0.0.110
    The computer I'm using is then iMac running OSX version 10.9.3 Build 13D65 2.7 GHz Intel Core i5
    I am using Flash, not a web-based editor that leverages Flash Player.
    "a direct link to the project or tool would be useful in allowing us to attempt to reproduce the problem" -  Not sure how to do this, how can I add the project to the forum?
    Many thanks once again for your help, let me know if you need more information.
    Cheers
    Michael

Maybe you are looking for

  • Column Bread in the ESS launchpad

    Hi everyone, I am struggling to get my column break to take effect when I add it in my ESS launchpad. I see how it is used in the standard launchpads, but I can't seem to get it working myself. When I insert a column break it will only place itself i

  • Using PO status checks in own program of CO11.

    Hi everybody,     I'm currently working on program and I'd like to use the standard status checks sap uses to check the status of a Purchase Order. If you look at the CO11 (confirmations of PO) and you enter a PO which is not released yet, you get an

  • Cluster JNDI error in SOAP

              I am trying to deploy a Web Service EAR using stateless session beans across 2           servers in a cluster. The Admin server is not part of the cluster. I am using           WLS 7.0 SP1. I am getting this error in one of the server trace

  • Interface to ScheduALL

    Hello I am working on a SAP ECC 6.0 implementation for a broadcasting corporation and they have the need to interface in and out of a product called ScheduALL. I have done some investigations and it seems the ScheduALL WebAPI is the way to go using x

  • How do I remove an ipod from my itunes account?

    I was pushed in the pool the other day with my ipod and it's ruined (won't even turn on now) I have bought another one but was wondering how I remove the old ipod off my itunes account? thanks!