How do I check in the code tha a movie is playing?

.NET Edition of the F-IN-BOX
max1
Posts: 12
Joined: Tue Nov 21, 2006 7:07 am

How do I check in the code tha a movie is playing?

Postby max1 » Tue Jan 02, 2007 3:49 am

I need to know when a movie is playing to run an "If" statement with that condition. For example " if flashplayercontrol1.playing = 1 then do this". What would be the right statement for this? Thank you!

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

Postby Softanics » Tue Jan 02, 2007 12:28 pm

Thank you for your question.

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

max1
Posts: 12
Joined: Tue Nov 21, 2006 7:07 am

Postby max1 » Thu Jan 04, 2007 12:08 pm

Can you provide exact code to check if a specific movie is playing for example:

if(flashplayercontrol1.flashplayerproperty_playing.Mymovie.swf) = true
Submit.visible = false;

Something like that.
I have been trying to write a piece of code that does the above for a couple of days now, so far with no real result. I can do it if any movie is playing but I want to tell if a specific movie is playing. Thank you!

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

Postby Softanics » Thu Jan 04, 2007 12:19 pm

OK.

Code: Select all

private f_in_box__lib.f_in_box__control f_in_box__control1;

...

if (f_in_box__control1.FlashProperty_Playing)
   MessageBox.Show("It's playing!");


But in some cases you will get the strange result. For example, you have only one frame and a flash video is playing inside this single frame. The movie is not playing, but the video is playing. And in this case FlashProperty_Playing == false.
Best regards, Artem A. Razin,

F-IN-BOX support

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

max1
Posts: 12
Joined: Tue Nov 21, 2006 7:07 am

Postby max1 » Thu Jan 04, 2007 12:48 pm

I guess what I am asking is about a specific movie called "Mymovie1" for example. How do I find out if that specific movie is playing. When I use the FlashProperty_Playing property It tells me that any movie is playing on the control. I want to code around a specific movie being played. For example in words:

if(myMovie1.swf is playing)
Submit.visible = false;

Note: "Submit" is a button that I want to make invisible when myMovie1.swf is playing.

seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Postby seesharp » Thu Jan 04, 2007 12:52 pm

Hi

couldn't you go the other way around. Trigger a .NET method from within your movie using e.g. ExternalInterface to get the desired behaviour ?

Alex

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

Postby Softanics » Thu Jan 04, 2007 3:55 pm

max1 wrote:I guess what I am asking is about a specific movie called "Mymovie1" for example. How do I find out if that specific movie is playing. When I use the FlashProperty_Playing property It tells me that any movie is playing on the control. I want to code around a specific movie being played. For example in words:

if(myMovie1.swf is playing)
Submit.visible = false;

Note: "Submit" is a button that I want to make invisible when myMovie1.swf is playing.


A movie is loading into a f_in_box__control. The f_in_box__control doesn't "know" what exact movie is loaded. It just plays. So the question "how to check that myMovie1.swf is playing" is incorrect. I.e. as your code loads movies, your code should known what movie was loaded :)
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 » Thu Jan 04, 2007 4:00 pm

seesharp wrote:couldn't you go the other way around. Trigger a .NET method from within your movie using e.g. ExternalInterface to get the desired behaviour ?


The most important question is what does it mean that a movie is playing. If it means that last frame is achived, use FlashProperty_Playing. If it means that there is no any animation, periodically check if the picture has changed (the method GetFrameBitmap returns a bitmap of the current frame).
Best regards, Artem A. Razin,

F-IN-BOX support

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


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 8 guests

cron