Pause

F-IN-BOX for Delphi / Builder C++ / VCL
Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Pause

Postby Kommu » Mon Apr 07, 2008 6:18 pm

Why FlashPlayerControl doesn't have Pause method? How do I suspend the movie?

Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Postby Kommu » Mon Apr 07, 2008 6:22 pm

Forgot to say, I'm a Delphi 5 user.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Pause

Postby Softanics » Mon Apr 07, 2008 6:44 pm

Kommu wrote:Why FlashPlayerControl doesn't have Pause method? How do I suspend the movie?


Use Stop:
http://www.f-in-box.com/delphi/help/ind ... _stop.html
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Postby Kommu » Thu Apr 10, 2008 12:07 pm

Thank you for your reply.

Stop works on my PC when TFlashPlayerControl is playing swf file. But when it's playing any flv file, Stop (or StopPlay, what's the difference by the way?) does nothing. How do I suspend the movie?

Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Postby Kommu » Thu Apr 10, 2008 12:10 pm

I have Windows XP here and 9th version of Flash.

Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Postby Kommu » Thu Apr 10, 2008 12:12 pm

my code:

Code: Select all

  ResourceStream := TResourceStream.Create(0, 'FLVPlayer', 'FLASH');
  try
    FlashPlayerControl1.FlashVars := 'FLVPath=' + OpenDialog1.Filename;
    FlashPlayerControl1.PutMovieFromStream(ResourceStream);
    FlashPlayerControl1.Play;
  finally
    ResourceStream.Free;
  end;


To stop the movie:

Code: Select all

  if FlashPlayerControl1.IsPlaying then
    FlashPlayerControl1.Stop;

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu Apr 10, 2008 12:39 pm

Kommu wrote:Thank you for your reply.

Stop works on my PC when TFlashPlayerControl is playing swf file. But when it's playing any flv file, Stop (or StopPlay, what's the difference by the way?) does nothing. How do I suspend the movie?


StopPlay is the same as Stop.

Yes, it doesn't work for FLV, because when you play FLV you have one single frame.

To play FLV please use flv_player.swf:

SWF:
http://f-in-box.com/misc/858C3196-A99B- ... Player.swf

Source:
http://f-in-box.com/misc/858C3196-A99B- ... Player.fla

To play:

FlashPlayerControl1.SetVariable("FLVPath", "path to flv here");
FlashPlayerControl1.SetVariable("FLVPlay", "any_value_here");

When you want to pause a FLV, you call:

FlashPlayerControl1.SetVariable("FLVPause", "any_value_here");
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Postby Kommu » Thu Apr 10, 2008 8:44 pm

Can you type the full code here?

Because I change *.res file (with a new SWF file), type:

Code: Select all

  ResourceStream := TResourceStream.Create(0, 'FLVPlayer', 'FLASH');
  try
     FlashPlayerControl1.SetVariable('FLVPath', OpenDialog1.Filename);
     FlashPlayerControl1.SetVariable('FLVPlay', '0');
  finally
    ResourceStream.Free;
  end;


and FlashPlayerControl doesn't play the movie at all. Nothing happens.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri Apr 11, 2008 7:05 am

Kommu wrote:Can you type the full code here?


I will create an example and write you here.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Postby Kommu » Fri Apr 11, 2008 1:41 pm

Thank you, sir!
I'm waiting for your example.

Kommu
Posts: 8
Joined: Mon Apr 07, 2008 6:14 pm

Postby Kommu » Sat Apr 12, 2008 12:13 pm

Any news?

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Mon Apr 14, 2008 9:19 am

Please download the demo version and check sample SampleA_FLVPlayer.

Thank you!
Last edited by Softanics on Tue Jul 21, 2009 7:05 am, edited 1 time in total.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

rimasx
Posts: 7
Joined: Tue Jul 21, 2009 5:00 am
Location: USA

hi

Postby rimasx » Tue Jul 21, 2009 5:10 am

Hi
I am workonk with demo yet but have the same problem. Please refresh the link with example as I cannot stop and pause the flv. :shock:
Regards

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Tue Jul 21, 2009 7:05 am

Just download the demo version and check sample SampleA_FLVPlayer.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 17 guests

cron