Page 1 of 1

Problem with control swf-movie

Posted: Tue Aug 21, 2007 12:41 pm
by flegel
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)

Posted: Tue Aug 21, 2007 12:48 pm
by Softanics
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.

Posted: Tue Aug 21, 2007 1:11 pm
by flegel
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.

Posted: Tue Aug 21, 2007 2:18 pm
by Softanics
Yes, I've received it, thank you.

What SWF I should start? Here ._flash_movie.swf, ._SteelOverPlaySeekMute.swf and SteelOverPlaySeekMute.swf

Posted: Tue Aug 21, 2007 2:20 pm
by Softanics
If this SWF plays a FLV inside single frame, Stop, Rewind and so on will not work.

Posted: Tue Aug 21, 2007 5:52 pm
by flegel
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.)

Posted: Tue Aug 21, 2007 6:10 pm
by Softanics
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.

Posted: Wed Aug 22, 2007 2:19 pm
by flegel
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.

Posted: Wed Aug 22, 2007 4:13 pm
by Softanics
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?...

Posted: Thu Aug 23, 2007 6:02 am
by flegel
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?...

Posted: Thu Aug 23, 2007 8:08 am
by Softanics
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';

Posted: Thu Aug 23, 2007 2:04 pm
by flegel
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...