Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-22-2008, 07:05 PM
Junior Member
 
Join Date: Apr 2008
Posts: 9
Default How to embemed ActiveX Object in Flash ?

Hi,

I'm trying to put VLC Player in Flash (Flash8+AS2).
I was downloaded WrapperCreator and produced VLC Wrapper Class (axvlc.dll),
then I written down below code in ActionScript:

Code:
import SWFKit.*;
import VLCPlayer.*;

var ax = new ActiveXObject("VideoLAN.VLCPlugin.1");
var control = new VLCControl(ax.Identifier);
control.MRL = "c:\\test.mpg";
control.play();
But it was always show a pop-up window to play the video, not the same window with my button.
How to embeded the player in the same window?

Sorry for my poor English :-[
Reply With Quote
  #2 (permalink)  
Old 04-23-2008, 01:19 PM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Re: How to embemed ActiveX Object in Flash ?

If you are interesed in then here is such-a-like for media player

Code:
import SWFKit.*;
import WMPlib.*;

var wx = g.createControl("WMPlayer.OCX", 0, 0, 0, 0);
var wmp = new WMPPlayer(wx.activex);
var wmpControls = new WMPControls(wmp.controls);
wmp.URL = "file.mpg";
wmpControls.play()
this one is used directly in as2 though with flash cs3 and not 8, but still, as2
Reply With Quote
  #3 (permalink)  
Old 04-23-2008, 01:57 PM
Junior Member
 
Join Date: Apr 2008
Posts: 9
Default Re: How to embemed ActiveX Object in Flash ?

Thanks for your response,
I try this:

Code:
import SWFKit.*;
import VLCPlayer.*;

var g = new SWFKit.Global();
var ax = g.createControl("VideoLAN.VLCPlugin.1", 0, 0, 400, 400);
var control = new VLCControl(ax.activex);
control.MRL = "c:\\test.mpg";
control.play();
but nothing happen, even didn't display object,
any idea ?
Reply With Quote
  #4 (permalink)  
Old 04-23-2008, 05:05 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: How to embemed ActiveX Object in Flash ?

The default size of the VLC control is zero. But you can use the following code to resize it
Code:
ax.window.move(0, 0, 400, 400);
Reply With Quote
  #5 (permalink)  
Old 04-24-2008, 10:16 AM
Junior Member
 
Join Date: Apr 2008
Posts: 9
Default Re: How to embemed ActiveX Object in Flash ?

Code:
import SWFKit.*;
import VLCPlayer.*;

var g = new SWFKit.Global();
var ax = g.createControl("VideoLAN.VLCPlugin.1", 0, 0, 400, 400);
ax.window.move(0, 0, 400, 400);
var control = new VLCControl(ax.activex);
control.MRL = "c:\\test.mpg";
control.play();
still nothing :'(
Reply With Quote
  #6 (permalink)  
Old 04-27-2008, 03:03 AM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Re: How to embemed ActiveX Object in Flash ?

since you use

import VLCPlayer.*;

have you used wrapper to create needed classes ??
Reply With Quote
  #7 (permalink)  
Old 05-15-2008, 11:08 AM
Junior Member
 
Join Date: Apr 2008
Posts: 9
Default Re: How to embemed ActiveX Object in Flash ?

Quote:
Originally Posted by Snapz
since you use

import VLCPlayer.*;

have you used wrapper to create needed classes ??
sure
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:10 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.