Parameter passing problem :(

F-IN-BOX for Delphi / Builder C++ / VCL
Nuke
Posts: 4
Joined: Tue Jul 12, 2005 2:15 am

Parameter passing problem :(

Postby Nuke » Tue Jul 12, 2005 2:27 am

Hello...

I'm currently evaluating yoour product and it looks to be quiet useful !

Now the Question:

I'm loading a Flash-movie from a stream with the PutMovieFromStream method.

Now I have the following problem:

I need to pass variables to the movie BEFORE it starts playing. The variables will be checked inside an actionscript in frame 1 of the movie on the _root level.

How can I do this ?

An example:

Before the movie starts playing I need the following variables to be set:

m=3077982
np=1
b=3077981

I tried the FlashVars property with the following code but no success:

fcontrol.PutMovieFromStream(TheFlashStream);
fcontrol.FlashVars:= 'm=3077982&np=1&b=3077981';

I also tried the SetVariable method with following code but it also didn't work :(

fcontrol.PutMovieFromStream(TheFlashStream);
fcontrol.SetVariable('m','3077982');
fcontrol.SetVariable('np','1');
fcontrol.SetVariable('b','3077981');

Another problem is that I don't want the movie to start playing immediately after loading !

How can I do this ?

Any ideas ???

Thx

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

Postby Softanics » Tue Jul 12, 2005 6:32 am

Thank you for your question.

Try the following code:

Code: Select all

fcontrol.PutMovieFromStream(TheFlashStream);
fcontrol.Stop;
fcontrol.FrameNum := 0;
fcontrol.SetVariable('m','3077982');
fcontrol.SetVariable('np','1');
fcontrol.SetVariable('b','3077981');
fcontrol.Play;


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

Nuke
Posts: 4
Joined: Tue Jul 12, 2005 2:15 am

Postby Nuke » Tue Jul 12, 2005 1:18 pm

Thx... I tried that too but it is not what I need !

Setting the variables works but I need to set them BEFORE the movie runs.

fcontrol.PutMovieFromStream(TheFlashStream);

>> 1. The movie starts playing here without parameters and is not
>> correctly initialized because of the missing startup parameters !

fcontrol.Stop;

fcontrol.FrameNum := 0;
fcontrol.SetVariable('m','3077982');
fcontrol.SetVariable('np','1');
fcontrol.SetVariable('b','3077981');

fcontrol.Play;

>> Now the variables are set correctly but the movie has already initialized
>> itself based on the missing parameters when it first started playing

Lemme repeat it :

I need a scenario like this:

fcontrol.PutMovieFromStreamWithoutPlaying(TheFlashStream);
fcontrol.SetVariable('m','3077982');
fcontrol.SetVariable('np','1');
fcontrol.SetVariable('b','3077981');
fcontrol.Play;

This is what an embedded flash.ocx in ie does. It passes the parameters to the movie before playing is started !

Is this possible ?

Thx

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

Postby Softanics » Sat Jul 16, 2005 12:33 pm

I'm sorry for delaying.
I have tried to find a workaround but no success. It is seems it's impossible with current implementation of the component.
Best regards, Artem A. Razin,

F-IN-BOX support

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

onad
Posts: 22
Joined: Wed Aug 17, 2005 2:49 pm
Location: Turkey
Contact:

Postby onad » Mon Oct 17, 2005 2:30 pm

what about:

- add one empty frame in front with an actionsctip "stop"
- set the values with ... "_root.myvar1","testit");
- do play
- Add a gotoframe
"Just do it"


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 15 guests

cron