Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-14-2009, 10:26 AM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Control WMP with AS3

In as2 you need wrapper classes to control wmp plugin

how about AS3 ? do i need Embed the dll file ?
How do i know what AS3 code can be used with WMP dll ?
Reply With Quote
  #2 (permalink)  
Old 05-14-2009, 10:34 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

You don't need to embed any dll, because windows media player is a pre-installed component.

In as3, you only need to call it as an activex control.
Reply With Quote
  #3 (permalink)  
Old 05-14-2009, 04:31 PM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default

Ive just started with AS3 and i have been searching for any clues how to do that... with not so much of luck

could you possibly post a little example how i could call wmp as activex...
Reply With Quote
  #4 (permalink)  
Old 05-17-2009, 09:53 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Since in as3 you don't need a wrapper class for an activex, you can call it just as in ffish script - first create the activex control with Global.createControl method, which returns an object with properties, "activex" and "window". The "activex" represents the dispatch interface of wmp, and thus can be used to call wmp methods.
Code:
import SWFKit.*;

var wmpControl = Global.createControl("WMPlayer.OCX.7", 0, 0, 200, 200, null, null);
var wmp:ActiveXObject = null;
if (wmpControl != null) {
	wmp = wmpControl.activex;
	wmp.url = 'c:\\test\\test.avi';
}
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:44 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.