Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: open
I have tried the following, but only get a value of ZERO. The audio plays just fine. Please advice!
from my code:
var nextA: Sound;
var songLong : Number = 5; // just to set a number
gettheme = "mysong.mp3"
nextA = new Sound(gettheme);
SC_A = nextA.play();
songLong = nextA.length;
trace("Song length is: ", songLong );
If I try songLong = nextA.length(); // ie, .length();
I get an error:
1195: Attempted access of inaccessible method length through a reference with static type flash.media:Sound.
Dig around the Sound() class in the AS3 manual of the help files.