problem in displaying swf

.NET Edition of the F-IN-BOX
zainy
Posts: 12
Joined: Thu Mar 20, 2008 6:02 am

problem in displaying swf

Postby zainy » Thu Mar 20, 2008 6:15 am

Asalam o alaikum!

Friends, sometimes i get problem that, swf file doesn't play in control. control just shows demo version label with white background.

i am using "PutMovieFromStream" and passing stream to it as parameter. When i check "FlashProperty_Movie" it contains path at that time but movie doesn't show/play.

Waiting for quick response.

Regards,
Muhammad Abdullah Malik
Assistant Software Engineer

zainy
Posts: 12
Joined: Thu Mar 20, 2008 6:02 am

Postby zainy » Thu Mar 20, 2008 7:47 am

Source:f_in_box__lib
Message:An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Stack Trac at f_in_box__lib.f_in_box__wrapper.FPC_LoadRegisteredOCX()
at f_in_box__lib.AxCode..ctor()
at f_in_box__lib.f_in_box__control..ctor()
at WindowsApplication1.frmDynamicScreenDisplay.InitializeComponent()
at WindowsApplication1.frmDynamicScreenDisplay..ctor()
at WindowsApplication1.clsSharedData.DisplayDefaultBlankScreens(Int32 AtScreen, DISPLAYDEFAULTSCREENS enumDISPLAY)


i got above exception on running application on different PC running windows Vista

Waiting for quick response.

Regards,
Muhammad Abdullah Malik

Assistant Software Engineer

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

Postby Softanics » Thu Mar 20, 2008 9:08 am

Thank you for your question.

zainy wrote:Source:f_in_box__lib
Message:An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)


Please specify Win32 (x86) as a target platform and rebuild the application.
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:

Re: problem in displaying swf

Postby Softanics » Thu Mar 20, 2008 9:15 am

Thank you for your question.

zainy wrote:i am using "PutMovieFromStream" and passing stream to it as parameter. When i check "FlashProperty_Movie" it contains path at that time but movie doesn't show/play.


The usual problem is that current position of a stream points to the end of the stream. When you pass such stream, f-in-box tries to read from the stream but, of course, it can't. Example:

Code: Select all

MemoryStream stream = new MemoryStream();

stream.Write( ... );

f_in_box__control1.PutMovieFromStream(stream);


It doesn't work.

But this code works well:

Code: Select all

MemoryStream stream = new MemoryStream();

stream.Write( ... );

stream.Position = 0; // <-- it's important!

f_in_box__control1.PutMovieFromStream(stream);
Best regards, Artem A. Razin,

F-IN-BOX support

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

zainy
Posts: 12
Joined: Thu Mar 20, 2008 6:02 am

Postby zainy » Thu Mar 20, 2008 12:34 pm

yes i am setting stream position to 0, but still sometime not always, movie doesn't show...
Muhammad Abdullah Malik

Assistant Software Engineer

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

Postby Softanics » Thu Mar 20, 2008 1:03 pm

zainy wrote:yes i am setting stream position to 0, but still sometime not always, movie doesn't show...


If you load it from a file, the same result?
Best regards, Artem A. Razin,

F-IN-BOX support

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

zainy
Posts: 12
Joined: Thu Mar 20, 2008 6:02 am

Postby zainy » Sat Mar 22, 2008 4:19 am

Its running fine on vista now after setting platform target to x86,

i didn't tried with file but a stream, actually it happens sometimes not always.

After calling functions

PutMovieFromStream(objStream) and FlashMethod_Play(),

i noticed that FlashProperty_ReadyState is 3 instead of 4, what can be the problem?? This is the case where movie doesn't play and even show as well.

Regards,
Last edited by zainy on Sat Mar 22, 2008 4:25 am, edited 1 time in total.
Muhammad Abdullah Malik

Assistant Software Engineer

zainy
Posts: 12
Joined: Thu Mar 20, 2008 6:02 am

Postby zainy » Sat Mar 22, 2008 4:22 am

and please give me description for each value of the FlashProperty_ReadyState, specially for 3..

Thanks for the support.

Regards,
Muhammad Abdullah Malik

Assistant Software Engineer

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

Postby Softanics » Sat Mar 22, 2008 9:09 am

zainy wrote:and please give me description for each value of the FlashProperty_ReadyState, specially for 3..


Yes, of course, here it is:

http://f-in-box.com/dotnet/help/index/c ... state.html
Best regards, Artem A. Razin,

F-IN-BOX support

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

zainy
Posts: 12
Joined: Thu Mar 20, 2008 6:02 am

Postby zainy » Sat Mar 22, 2008 11:36 am

what does interactive in this refference?


what about answer to following question

Its running fine on vista now after setting platform target to x86,

i didn't tried with file but a stream, actually it happens sometimes not always.

After calling functions

PutMovieFromStream(objStream) and FlashMethod_Play(),

i noticed that FlashProperty_ReadyState is 3 instead of 4, what can be the problem?? This is the case where movie doesn't play and even show as well.

Regards,
Muhammad Abdullah Malik

Assistant Software Engineer

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

Postby Softanics » Sat Mar 22, 2008 6:25 pm

zainy wrote:what does interactive in this refference?


As soon I understand, it means that a movie is able to interact with user. "Complete" means that a movie is fully loaded.

zainy wrote:what about answer to following question

Its running fine on vista now after setting platform target to x86,

i didn't tried with file but a stream, actually it happens sometimes not always.

After calling functions

PutMovieFromStream(objStream) and FlashMethod_Play(),

i noticed that FlashProperty_ReadyState is 3 instead of 4, what can be the problem?? This is the case where movie doesn't play and even show as well.

Regards,


I can suggest you the following to understand what's the problem:

1. Try to save from a stream to a file and then load from a file. The same effect?

2. Don't call FlashMethod_Play. Some movies created with Flex don't need FlashMethod_Play, moreover if you call FlashMethod_Play they will work incorrectly.
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 17 guests

cron