Problem with control swf-movie

F-IN-BOX for Delphi / Builder C++ / VCL
flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

Problem with control swf-movie

Postby flegel » Tue Aug 21, 2007 12:41 pm

Hello,

I am trying to integrate the flashplayercontrol in my (DirectX)app.
Problem is that the control / movie hardly reacts on anything I try
to do, e.g. 'flashplayercontrol.stop', 'flashplayercontrol.rewind',
... etc. does all do nothing
Also, 'flashplayercontrol.totalframes', 'flashplayercontrol.curFrame' always gives 0 or -1.

I tried my swf with one of then demos, but then it still didn't react on anything. The swf in the demo did react, so it has to be the file that is the problem.
But what can I do about it? I have to work with this kind of files, so I am not allowed to do some kind of pre-conversion or so.

What can I do to make this work?

(I've mailed the swf file to you in e-mail)

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

Postby Softanics » Tue Aug 21, 2007 12:48 pm

Thank you for your question.

If you load this movie into Internet Explorer, does it work properly?

I've not received your movie, could you please resend it to support (at) f-in-box.com (if it's not big, i.e. < 2 mb).

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

Postby flegel » Tue Aug 21, 2007 1:11 pm

Hello,

I just posted the file (around 7 mb). Did you receive it?
In Internet Explorer it works ok, I can also play the movie, but that's about it.

No control on it, cannt stop or rewind it, nor requesting the frames-info etc.

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

Postby Softanics » Tue Aug 21, 2007 2:18 pm

Yes, I've received it, thank you.

What SWF I should start? Here ._flash_movie.swf, ._SteelOverPlaySeekMute.swf and SteelOverPlaySeekMute.swf
Best regards, Artem A. Razin,

F-IN-BOX support

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

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

Postby Softanics » Tue Aug 21, 2007 2:20 pm

If this SWF plays a FLV inside single frame, Stop, Rewind and so on will not work.
Best regards, Artem A. Razin,

F-IN-BOX support

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

flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

Postby flegel » Tue Aug 21, 2007 5:52 pm

Hi,

It's about flash_movie.swf

The minimum thing I should have control of, is to detect when the swf
has finished playing, and then I have to restart it again. In fact, loop
it, and preferable with some more control if customer wants some more,
like pauses etc.)

Is there a (simple) way to achieve this? (possibly without rewind etc.)

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

Postby Softanics » Tue Aug 21, 2007 6:10 pm

flegel wrote:It's about flash_movie.swf


I don't know why, but if I load flash_movie.swf into Internet Explorer, I don't see anything...

flegel wrote:The minimum thing I should have control of, is to detect when the swf
has finished playing, and then I have to restart it again. In fact, loop
it, and preferable with some more control if customer wants some more,
like pauses etc.)

Is there a (simple) way to achieve this? (possibly without rewind etc.)


You can periodically get a bitmap from a current frame and compare it. If bitmaps are equal starting from some time -- the movie finished.
Best regards, Artem A. Razin,

F-IN-BOX support

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

flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

Postby flegel » Wed Aug 22, 2007 2:19 pm

Ok, I have thought about that (comparing the last bitmap with the
last - 1 bitmap) to see if movie has ended.
By the way, do you mean compare it at pixel level? Or compare some random pixel(colors) to see if it has changed?

However, most important: how can I then simply reset the movie to the start again ('rewind') ?
Is there another way around to do this then rewind? Because rewind does not work for me.

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

Postby Softanics » Wed Aug 22, 2007 4:13 pm

flegel wrote:By the way, do you mean compare it at pixel level?


Yes.

flegel wrote:However, most important: how can I then simply reset the movie to the start again ('rewind') ?
Is there another way around to do this then rewind? Because rewind does not work for me.


May be just reload the movie?...
Best regards, Artem A. Razin,

F-IN-BOX support

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

flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

Postby flegel » Thu Aug 23, 2007 6:02 am

No, reloading does not work.
I tried each of these lines, but none iof them work:

FFlashPlayerControl.Movie := '';

FFlashPlayerControl.LoadMovie(0, 'D:\temp\flash_movie.swf');

FFlashPlayerControl.LoadMovie(0, '');


Any other suggestions to reset / reload movie?...

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

Postby Softanics » Thu Aug 23, 2007 8:08 am

flegel wrote:Any other suggestions to reset / reload movie?...


Please try that:

Code: Select all

FFlashPlayerControl.Movie := '_temp_';
FFlashPlayerControl.Movie := 'D:\temp\flash_movie.swf';
Best regards, Artem A. Razin,

F-IN-BOX support

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

flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

Postby flegel » Thu Aug 23, 2007 2:04 pm

Yes, that works. Thanks.
Now I have almost a minimum working app.

Now I just have to find a smart way to detect finishing movie by
look if pixels have changed. I dont know if theer's a simple way to do this without having to check all the pixels...


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 7 guests

cron