Skip to content

8tracks/flash_library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

8tracks flash library

Library provides:

  • code to handle both MP3 and AAC audio files
  • code to work with the 8tracks API (in progress)

Installation

Either include the source code in your project or link the SWC.

Working with audio files

The library provides code to play both MP3 and AAC files using a common interface.

A factory is used to load audio files:

import com.eight_tracks.media.AudioFileFactory;

// ...

var factory:AudioFileFactory = new AudioFileFactory();

Which can then be used to create a handle to an audio file:

import com.eight_tracks.media.IAudioFile;

// ...

var audioFile:IAudioFile = factory.create('path/to/audio/file');

Which in turn can be used to control playback:

audioFile.volume = .5;
audioFile.play();

It will also trigger events so you can update your UI:

import com.eight_tracks.events.*;

// ...

audioFile.addEventListener(PlaybackEvent.PLAYBACK_COMPLETE, playbackCompleteHandler);
audioFile.addEventListener(PlaybackEvent.PLAYBACK_STARTED, playbackStartedHandler);
audioFile.addEventListener(PlaybackEvent.PLAYBACK_PAUSED, playbackPausedHandler);
audioFile.addEventListener(PlaybackEvent.PLAYBACK_UPDATED, playbackUpdatedHandler);
audioFile.addEventListener(PropertyChangeEvent.PROPERTY_UPDATED, propertyChangedHandler);

Working with the 8tracks API

Coming soon.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published