|
|||
|
Code:
var ax = createControl("WMPlayer.OCX", 0, 0, 200, 200);
ax.activex.url = "http://mysite.com/broadband.asx";
ax.activex.controls.play();
Im asking because im writing all code in FlashDevelop (more organized) |
|
|||
|
First, you must use the Wrapper Creator to create the wrapper classes by choosing wmp.dll in system directory.
Second, use the following code in actionscript 2 Code:
import SWFKit.*;
import WMPLib.*;
var ax = Global.createControl("WMPlayer.OCX", 0, 0, 200, 200);
var wmp = new WMPPlayer(ax.activex);
var wmpControls = new WMPControls(wmp.controls);
wmp.URL = "http://mysite.com/broadband.asx";
wmpControls.play();
|
|
|||
|
Amazing
![]() But is there any way to control such as volume and other like actions when i set my wmp to 0 and 0 in height and width ? I found the as file containing volume and as i see there is volume(value) for to set a vol. value but when i set wmpControls.volume(0); i still hear music I also discovered that wmpControls.play(); isnt needed. I associated this code with a button and i didnt even press it, music started to play |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|