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 gettheme:URLRequest;
var nextA: Sound;
var SC_A:SoundChannel;
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.
Please advice!
regards,
Jaxz
Dig around the Sound() class in the AS3 manual of the help files.