Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 15th, 2008, 02:13 PM
hello123456 hello123456 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 1 hello123456 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 47 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > General - Make next track play..flash...classes..object oriantated


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway