View Full Version : Sound.position and Sound.duration in flash lite

02-01-2008, 04:06 AM
I'm using this simple piece of code to test if I can read the position in a playing sound, using flash lite 2.1.

var mySound:Sound = new Sound();
mySound.onLoad = function(success){
if(success == true) {
mySound.start(0, 0);
function onEnterFrame() {
trace(mySound.duration + " " + mySound.position);
The trace shows '0 0', even though I can hear the sound playing. On Adobe's website (http://livedocs.adobe.com/flashlite/2/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000772.html) they suggest the property would work in flash lite 2.x. If I change the publishing version from flash lite 2.1 to for example flash player version 6, 7, 8 or 9 the trace shows the duration and position in milliseconds correctly.