To preload MP3 file, we can use 'setinterval()' function to create polling mechanism that checks the bytes loaded for a Sound or NetStream object at predetermined intervals. We can use 'Sound.getBytesLoaded()' and 'Sound.getBytesTotal()' methods to track downloading progress of MP3 files.
The following example uses 'setInterval()' to check the bytes loaded for a Sound object at predetermined intervals.
|
preload an MP3 file:
|
var songTrack:Sound = new Sound(); |
The Output panel shows loading progress.
Tags: Load external MP3 file into flash, Preload MP3 File, play mp3 file, Sound Object in Flash, Preload and play music, flash music preloader
![]() |
Download Free Photo Gallery
You can download Imajine's Scrapbook Photo Gallery absolutely free of cost and to customize , you need no knowledge of Adobe Flash. Click here to view Scrapbook Photo Gallery / download |
Team Imajine is a good mix of design and code –with an eye for detail and strong belief in accessibility and usability. We are a web design and development boutique firm focusing on generating a strong online presence and visibility for our customers.
Apart from web design, logo design, content management systems, print and web development services, Imajine’s creative portfolio extends to photography, game programming and tutorial development (CSS3, HTML5, illustrator, Adobe Fireworks, Adobe Photoshop and Adobe Flash).
Leveraging on latest web technologies, we at Imajine adopt a progressive approach to design, develop and innovate affordable solutions with increased returns and enhanced business perceptions.
Looking for affordable web solutions? Contact Imajine to initiate a discussion on your web requirements.