|
|||
|
I want to detect in my app if "mute" is enabled in windows (and if so to disable it) plus be able to change the master volume of windows.
I started with the simplest step...to trace the current values on my system: Global.trace(SWFKit.Sound.playback.masterMute); Global.trace(SWFKit.Sound.playback.masterVolume); but didn't work, both returned "undefined". Then I tried Global.trace(Sound.playback.masterMute); Global.trace(Sound.playback.masterVolume); but I got an error message. What am I doing wrong? (All my code is written is flash). |
|
|||
|
It is a small bug of the sound objects. Although the methods and properties of the Sound objects are static, you will still have to first create a playback of recording object before you can use it, as shown in the following action script code
Code:
var pb = new SWFKit.Sound.playback; Global.trace(SWFKit.Sound.playback.masterMute); Global.trace(SWFKit.Sound.playback.masterVolume); pb.Release(); |
|
|||
|
To make it work, you will have to first setup the class path for swfkit:
in [flash cs3]->[main menu]->[edit]->[preference]->[actionscript]->[actionscript 2 settings] add the class path for swfkit, the typical path name of which is c:\program files\swfkit pro 3\classes for actionscript 3, the path name should be "c:\program files\swfkit pro 3\classes 3" Current swfkit installer cannot set the classpath for flash cs3 automatically, as it is released before flash cs3. The installer of swfkit 3.2 will fix this problem. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|