Could you please give me some suggestions?

DLL Edition of the F-IN-BOX
lion
Posts: 2
Joined: Thu Sep 06, 2007 3:24 am

Could you please give me some suggestions?

Postby lion » Thu Sep 06, 2007 7:08 am

I want to do the bellow jobs:
1、write a client program using the C++ that can receive the FLV data from the server by my private protocol. With f_in_box, I am sure that the client program can just play the FLV data directly from memory, but I don't know how to control the playing process, that is, I hope my client program is made as a FLV player so that I could pause, stop, fast foreword or backword the play. you mentioned at the end of the topic "http://www.f-in-box.com/forum/viewtopic.php?t=262" that
"gotoFrame doesn't work becuase flashplayer.swf plays FLV in the only one frame. You can work with FLV in ActionScript:
http://livedocs.macromedia.com/flash/mx ... 01599.html"

but, how to do this?
2、If the above program could be realized, is it possible for me to encapsulate it as an OCX so that I could use it in my webpage?

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

Postby Softanics » Thu Sep 06, 2007 10:02 am

Thank you for your question.

Please download .NET demo version. I've included example how to control FLV playback here: demo_zip\samples\C#\Sample8_Advanced_FLV_Player\
See file res\FlashVideoPlayer.fla

Here the code of this file:

Code: Select all

_root.obj = new Object();
_root.obj.FLV_Play = function(bPlay: String) {
   _root.FLVDisplay.play();
}
_root.obj.get_FLV_Play = function():String {
   return "1";
}
_root.obj.FLV_Pause = function(bPause: String) {
   _root.FLVDisplay.pause();
   _root.FLVController.pause();
   _root.FLVController.activePlayControl = "play";
}
_root.obj.get_FLV_Pause = function():String {
   return "1";
}
_root.obj.set_FLV_Path = function(Path: String) {
   _root.FLVDisplay.setMedia(Path);
}
_root.obj.get_FLV_Path = function():String {
   return _root.FLVDisplay.contentPath;
}
_root.obj.set_ShowControls = function(Visible: String) {
   if (Visible == "true")
   {
      if (!_root.FLVController.visible)
      {
         _root.FLVController.visible = true;
         _root.FLVDisplay.setSize(_root.FLVDisplay.width, _root.FLVDisplay.height - _root.FLVController.height);
      }
   }
   else
   {
      if (_root.FLVController.visible)
      {
         _root.FLVController.visible = false;
         _root.FLVDisplay.setSize(_root.FLVDisplay.width, _root.FLVDisplay.height + _root.FLVController.height);
      }
   }
}
_root.obj.get_ShowControls = function():String {
   return _root.FLVController.visible ? "true" : "false";
}

_root.addProperty("FLVPlay", _root.obj.get_FLV_Play, _root.obj.FLV_Play);
_root.addProperty("FLVPause", _root.obj.get_FLV_Pause, _root.obj.FLV_Pause);
_root.addProperty("FLVPath", _root.obj.get_FLV_Path, _root.obj.set_FLV_Path);
_root.addProperty("ShowControls", _root.obj.get_ShowControls, _root.obj.set_ShowControls);


You can play, pause, set FLV path and show/hide controls (with buttons play, pause etc.) from a program.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

crespowu
Posts: 1
Joined: Thu Jan 24, 2008 6:52 am
Contact:

Postby crespowu » Thu Jan 24, 2008 7:00 am

Thanks for your code.It also helped me.


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 17 guests

cron