Changeset 120

Show
Ignore:
Timestamp:
03/03/07 17:04:47 (2 years ago)
Author:
bfitzpa2
Message:

Fixed music repeating infinitely bug.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/client/DMPWebsite.java

    r115 r120  
    159159                                } 
    160160                                HTML flash = new HTML("<object width=\"200\" height=\"25\">" + 
    161                                                 "<param name=\"movie\" value=\"" + path + "\">" +  
    162                                                 "<embed src=\"" + path + "\" width=\"200\" height=\"25\">" + 
     161                                                "<param name=\"movie\" value=\"" + path + "\"><PARAM NAME=loop VALUE=\"false\">" +  
     162                                                "<PARAM NAME=menu VALUE=\"true\">" + 
     163                                                "<embed src=\"" + path +  
     164                                                "\" width=\"200\" height=\"25\" loop=\"false\" menu=\"true\">" + 
    163165                                                "</embed></object>"); 
    164                                 flashPanel.clear(); 
    165                                 flashPanel.add(flash); 
     166                                flashPanel.setWidget(flash); 
    166167                                currentMusicDuration = Double.valueOf((String)song.get("duration")).intValue(); 
    167168                                if(firstSong) 
     
    207208                        System.out.println("Playing next song."); 
    208209                        playNextSong(); 
     210                        if(currentMusicDuration == 0) 
     211                        { 
     212                                return; 
     213                        } 
    209214                        this.schedule(currentMusicDuration); 
    210215                } 
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/server/MusicServImpl.java

    r113 r120  
    1010import java.util.Vector; 
    1111import java.util.LinkedList; 
     12import java.util.ArrayList; 
    1213import java.util.HashMap; 
    1314import java.util.zip.DataFormatException; 
     
    245246                { 
    246247                        musicMov.add(soundGenerator.streamBlock(i, samplesPerBlock)); 
     248                        if(i == numberOfBlocks - 1) // adds a stop action to the last frame of the movie 
     249                        { 
     250                                ArrayList<FSAction> actions = new ArrayList<FSAction>(); 
     251                                actions.add(new FSAction(FSAction.Stop)); 
     252                                FSDoAction action = new FSDoAction(actions); 
     253                                musicMov.add(action); 
     254                        } 
    247255                        musicMov.add(new FSShowFrame()); 
    248256                } 
    249  
     257                 
    250258                try 
    251259                {