Hmm...  This code runs quite nicely on our company PCs.  Not one of them has 
external speakers -- all have internal speakers.  We must have something 
special set up in our configuration.  And here I thought this code was 
universal.  If you find a solution, please post.

  ----- Original Message ----- 
  From: cuttenv 
  To: [email protected] 
  Sent: Thursday, March 25, 2010 12:12 AM
  Subject: [flexcoders] Re: PC Speaker Beep


    


  Nice Job Warren, Thanks for the code too! The problem is I need the actual PC 
Speaker on the board to emit a sound. There are no external speakers on our 
hardware so we can't play an MP3 or even a wav file. Only way we can get any 
kind of noise is through the PC Speaker (which only can emit a certain 
frequency).

  --- In [email protected], "Warren" <warrenony...@...> wrote:
  >
  > Here is a class file I wrote to copy stuff to the PC clipboard ( I use a 
double click to trigger the event). As part of the copying process, it makes 
the pc speacker "ding". The sound is in an assets folder. I made an mp3 out of 
the standard windows ding sound.
  > 
  > package myClassLibrary
  > {
  > import flash.system.System;
  > 
  > import mx.core.SoundAsset;
  > import mx.utils.StringUtil;
  > 
  > public class ClipBoardCopy
  > {
  > [Embed(source="assets/sounds/ding.mp3")]
  > private static var SoundDingClass:Class;
  > 
  > [Bindable] private static var Sound_Ding:SoundAsset = SoundAsset(new 
SoundDingClass());
  > 
  > public static function SetClipboard_fromGrid(EventItem:*):void {
  > var ItemLabel:String;
  > 
  > ItemLabel = StringUtil.trim(EventItem.itemRenderer.listData.label);
  > if(ItemLabel != ""){
  > System.setClipboard(ItemLabel);
  > Sound_Ding.play();
  > }
  > }
  > 
  > public static function SetClipboard_fromLabel(EventItem:*):void {
  > var ItemLabel:String;
  > 
  > ItemLabel = StringUtil.trim(EventItem.currentTarget.text);
  > if(ItemLabel != ""){
  > System.setClipboard(ItemLabel);
  > Sound_Ding.play();
  > }
  > }
  > 
  > public static function SetClipboard_fromString(inString:String):void {
  > var ItemLabel:String;
  > 
  > if (inString != null){
  > ItemLabel = StringUtil.trim(inString);
  > if(ItemLabel != ""){
  > System.setClipboard(ItemLabel);
  > Sound_Ding.play();
  > }
  > }
  > }
  > }
  > }
  > 
  > 
  > 
  > 
  > ----- Original Message ----- 
  > From: cuttenv 
  > To: [email protected] 
  > Sent: Wednesday, March 24, 2010 8:01 PM
  > Subject: [flexcoders] PC Speaker Beep
  > 
  > 
  > 
  > Hi everyone I have a quick question about the PC Speaker. Is there a way to 
make a call from Flex to make the PC speaker beep? What about in Adobe Air? 
Thanks in advance!
  >



  

Reply via email to