Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-18-2007, 10:22 AM
Junior Member
 
Join Date: Apr 2007
Posts: 22
Default Problem with sound object

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).


Reply With Quote
  #2 (permalink)  
Old 07-19-2007, 03:57 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Problem with sound object

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();
Reply With Quote
  #3 (permalink)  
Old 07-19-2007, 12:10 PM
Junior Member
 
Join Date: Apr 2007
Posts: 22
Default Re:Problem with sound object

I copy pasted your code into my project (Flash version CS3,the project is in ActionScript 2) and it still returned "undefined" values!

Any other workaround?
Reply With Quote
  #4 (permalink)  
Old 07-19-2007, 12:27 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Problem with sound object

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.
Reply With Quote
  #5 (permalink)  
Old 07-19-2007, 01:26 PM
Junior Member
 
Join Date: Apr 2007
Posts: 22
Default Re:Problem with sound object

It is setup correctly. I am using SWFKit extensively in this project. I have a specific problem with the Sound Object...
Reply With Quote
  #6 (permalink)  
Old 07-19-2007, 01:39 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Problem with sound object

Please try the attached sample.
Reply With Quote
  #7 (permalink)  
Old 07-19-2007, 02:08 PM
Junior Member
 
Join Date: Apr 2007
Posts: 22
Default Re:Problem with sound object

both returned undefined.
Reply With Quote
  #8 (permalink)  
Old 07-19-2007, 02:27 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Problem with sound object

The sound object is only supported by swfkit pro. Are you using swfkit pro?
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 04:27 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.