Text change is effective only after delay

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stirucherai
    New Member
    • Mar 2008
    • 1

    Text change is effective only after delay

    Here is my what I am trying to do

    1. Open a MP3 file (Sound) -- Multiple songs -- roughly 30 seconds per song
    2. Dynamically create TEXT Field using CreateText method
    3. Show Lyrics for the First song and start MP3
    4. When MP3 moves to second song (I trap it based on time) -- I stop the Mp3 using StopALLSounds.
    5. Change the Text to new Lyric (second song lyrics)
    6. introduce delay -- using multple methods -- like simple while loop for delay
    7. Start the song again

    ******** PROBLEM *************** ***
    The text change even though I do before delay is introduced -- the effect is only after the delay -- I want to stop for 1 second on NEW SONG Lyric before starting the song -- but it is pausing with old lyric


    Here is my code
    stopAllSounds() ;
    SongNum=SongNum +1;
    drawBackground( string(SongNum) );
    Heading.text = songHeader[SongNum];
    Detail1.text = FullSongText[SongNum];
    heading_fmt.col or = rgbdetailcolor. rgb;
    detail_fmt.colo r = rgbdetailcolor. rgb;
    Heading.setText Format(heading_ fmt);
    Detail1.setText Format(detail_f mt);

    delayFlag = 0
    ;
    while (delayFlag < 10000)
    {
    delayFlag = delaFlag+1;
    }
    the_sound.start (the_sound.posi tion/1000);

    Please note -- I tried using timer etc -- there is no change in effet
    Also please note -- that I have only one Frame
Working...