Announcement

Collapse
No announcement yet.

How to stop a video from playing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to stop a video from playing

    Once I use USD_Video() I can't get it to stop.
    In other words, my code does not continue running after the display executes this command.
    What is the stop function?
    Here's the definition from the fnc file:
    func uSD_Video("x", "y"), 0;
    // Syntax: uSD_Video(x, y);
    // Usage : uSD_Video(arg1, arg2);
    // Notes : Play a Video/Animation clip from the uSD card at screen location
    // : specified by x,y (top left corner). The location of the clip in the
    // : uSD card must be specified by uSD_setSector(Video_Sector_Add) command.

    And here's a bit of my code:
    HTML Code:
    func main() 
    
    var ch, stop;
    var n, state, x, y;
    gfx_Cls();
    gfx_Set(7,1);
    uSD_Init();
    uSD_SetSector(0x0000, 0x1000);
    setbaud(6); 
    serout('T');    
    touch_Set(TOUCH_ENABLE);                            // enable the touch screen           
    keyval := -1;                                       // holds -1 if not pressed, else key number 0-15
    ch := 0;    
    // first, set all the buttons to the up state
    n := 0;
    repeat
    ch:=serin();
    uSD_Video(0,0);  // ONCE THE CODE GETS HERE IT SEEMS TO HANG
    if(ch=='U')
    serout('M');                                                 // draw keys for the first time
    stop := 7;
    else
    // DO NOTHING
    endif
    until (stop==7)
    Thanks!
    Nora

  • #2


    Hi Nora, if you are using Goldelox, you may wish to try the uSD_Frame(); functionhttp://www.4dsystems.com.au/developers/docs.php?cat=16&id=119 so you can place test code in a loop for a bail out condition. Unfortunately Picaso does not have this function yet but we are working hard to get it into the next release.
    Regards,
    Dave

    Comment


    • #3


      Thanks for the reply-
      I'm using Picaso
      Can't wait for the new rev!
      Nora

      Comment

      Working...
      X