Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: TAB Alpha Release 37

  1. #11

    Re: TAB Alpha Release 37

    Hi Petr,

    Thanks.

    I had already tried that with the DOEVENTS on before posting. Didn't work. So the code I'm trying now WITHOUT THE LOOP which works for me but still has the problem I described is:

    [code=thinbasic]
    LOCAL hCanvas AS LONG
    CONTROL HANDLE hwnd, %id_listview1 TO hCanvas
    OpenMovie( hCanvas, filename )
    PlaceMovie( 0, 0, 225, 219 )
    PlayMovie(%true)
    'REM : app on hold while plays movie to end
    'GETWINDOWKEYSTATE( hwnd, %VK_SPACE )
    '==========================
    'WHILE IsMoviePlaying( )
    ' IF GETWINDOWKEYSTATE( hwnd, %VK_SPACE ) THEN
    ' SLEEP 150
    ' EXIT WHILE
    ' END IF
    'WEND

    CloseMovie( )

    [/code]

    This way it stops user from min/maxing or resizing the window without extra code.
    Apart from that the rest of code in Version 39 is the same as 38, Petr.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  2. #12
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: TAB Alpha Release 37

    A while/wend like that will stop script blocking messages handling. Internal thinBasic engine will store all fired messages (up to 500) but your script is not handling it because execution is inside while/wend.

    Try another strategy for example just after getmessage(...). If animation is still running just ignore the message and respond only at SPACE pressing.

    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #13

    Re: TAB Alpha Release 37

    Hi Eros,

    Yes that works splendidly!

    I put this after GetMessages...

    [code=thinbasic]
    '==========================
    IF IsMoviePlaying() THEN

    IF GETWINDOWKEYSTATE( hwnd, %VK_SPACE )<> 0 THEN
    CloseMovie( )
    movieon=0
    END IF
    END IF

    IF IsMoviePlaying()=%false and movieon=1 then
    closemovie()
    movieon=0
    END IF

    '==========================
    [/code]

    And adjusted code for playing movie. Good.

    Petr, Eros way is better as sizing, dragging, min/maxing window while movie plays works as it should do without any strange unwanted behaviour. No need for extra code to turn off sizing, maximizing code.

    Thanks for all help.

    Tonight I will see if I can get the movie to loop/repeat!

    Best wishes,
    catventure.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  4. #14
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: TAB Alpha Release 37

    Hi,

    yes, Eros has better solution
    MCI allows movie repeat, I modified the function in MCIVideo.inc so PlayMovie can have second parameter specifying whether to repeat or not video.

    This allows to use TRUE/FALSE flag for repetition. With this mod it caused problems as IsMoviePlaying returned end after first play of looping video. Use attached mciVideo, which handles this situation.


    Petr
    Attached Files Attached Files
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #15

    Re: TAB Alpha Release 37

    Quote Originally Posted by Psch
    Hi,

    yes, Eros has better solution
    MCI allows movie repeat, I modified the function in MCIVideo.inc so PlayMovie can have second parameter specifying whether to repeat or not video.

    This allows to use TRUE/FALSE flag for repetition. With this mod it caused problems as IsMoviePlaying returned end after first play of looping video. Use attached mciVideo, which handles this situation.


    Petr
    Thanks Petr.

  6. #16

    Re: TAB Alpha Release 37

    Hi Psch,

    Hey, thanks for that revised "mciVideo.inc" with the new loop video parameter.

    Just what I was looking for!

    Anyhow I can tell you it worked great using "playMovie(%false,%true)"

    A couple of other things I did to ensure no problems during gameplay of the adventure was to disable some of the TAB Player menu items; and also disable the input textbox so no further commands could be typed in while movie was playing.

    I will incorporate the improvements into next release.

    Thank you so much everybody for your assistance.

    catventure.

    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  7. #17
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: TAB Alpha Release 37

    What about some ... karma points ;D
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #18

    Re: TAB Alpha Release 37

    What about some ... karma points
    Oh.. alright then..

    Tell you what, I will give you and Petr an extra bonus karma point for being so good in class today.
    (That's my equivalent to a gold star!)

    catventure
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  9. #19
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: TAB Alpha Release 37

    Quote Originally Posted by ErosOlmi
    What about some ... karma points ;D
    ;D That is dirty, Eros ;D


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  10. #20
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: TAB Alpha Release 37

    ;D ;D
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. TAB Alpha Release 13
    By catventure in forum T.A.B. (ThinBasic Adventure Builder)
    Replies: 0
    Last Post: 21-09-2006, 22:06

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •