Home » D2k » PLAY_SOUND built-in in Oracle D2k Forms Description

PLAY_SOUND built-in in Oracle D2k Forms Description

PLAY_SOUND built-in in Oracle D2k Forms

Description
Plays the sound object in the specified sound item.
Syntax
PLAY_SOUND(item_id ITEM);
PLAY_SOUND(item_name VARCHAR2);
Built-in Type restricted
Enter Query Mode No
Parameters:
item_id The unique ID Form Builder gave the sound item when you created it.
item_name The name you gave the sound item when you created it.
PLAY_SOUND examples
/* Example 1: This procedure call (attached to a menu item)
** plays a sound object from the specified sound item:
*/
GO_ITEM(’about.abc_inc’);
PLAY_SOUND(’about.abc_inc’);
/* Example 2: These procedure calls (attached to a
** When-Button-Pressed trigger) read a sound object from the
** file system and play it. Note: since an item must have focus
** in order to play a sound, the trigger code includes a call
** to the built-in procedure GO_ITEM:
*/
BEGIN
IF :clerks.last_name EQ ’BARNES’ THEN
GO_ITEM(’orders.filled_by’);
READ_SOUND_FILE(’t:ordersclerkbarnes.wav’,
’wave’,
’orders.filled_by’);
PLAY_SOUND(’orders.filled_by’);
END IF;
END;