Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

TI.Media.createSound() and a loading indicator before the sounds starts

As the sound object loads the entire media resource in memory before playing, I need a loading indicator that hides as soon as the sound starts playing. The sound files are not huge but it takes a good second before they start and I want to avoid confusion.

Is that even possible? Thanks!

— asked August 18th 2010 by Dominik Hahn
  • createsound
  • indicator
  • loading
  • media
1 Comment
  • could possibly use the progress or changed events on the sound but I'm not sure

    — commented August 23rd 2010 by Matthew Wise

2 Answers

  • this seems to work

      playButton.addEventListener('click', function()
      {
        activityIndicator.show();
        sound.play();
        activityIndicator.hide();
      });
    
    — answered November 24th 2010 by Bernhard Borchardt
    permalink
    1 Comment
    • Does it work? My installation is broken (yet again) and I can't test it right now.

      — commented November 30th 2010 by Dominik Hahn
  • Did you find a solution?
    Thanks

    — answered November 24th 2010 by Bernhard Borchardt
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.