|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
General - Make next track play..flash...classes..object oriantated
Hey,
im making a media player in flash and im using classes. I can get a next button to work to skip through tracks but i cant make the next song play after one song has finished? I know i have to use the onSoundComplete function but i just cant get it to work! When i do the onSoundComplete function i can get it to trace with: public function play(){ this.sound.start(this.pos/1000); { this.sound.onSoundComplete = function() {trace("track complete")}; } } this works with no errors but i want to run a function to play the next track, i have copied the code from the next button so would assume it would look like this: public function play(){ this.sound.start(this.pos/1000); { this.sound.onSoundComplete = function() { this.count++; if (this.count >= this.songs.length){ this.count=0; } this.pos = 0; this.sound.loadSound( this.songs[this.count].getFileName(), true );{ } }; } } this gives no errors but when i run it, it just gets to the end of the track and then stops... does anyone have any ideas of what im doing wrong? this function is been run in my .fla file on the play button, its notthing to do with that though because it does actually play the track, thanks |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > General - Make next track play..flash...classes..object oriantated |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|