How do I... ?
AnswerList of Questions
Control Volume Settings at Run Time
As an example, we will create a project with two buttons: a volume increase button, and a volume decrease button.
1. Insert the following code into the On Click event of the volume increase button:
audio_channel = CHANNEL_USER1;
Audio.SetVolume(audio_channel, Audio.GetVolume(audio_channel)+20);
2. Insert the following code into the On Click event of the volume decrease button:
audio_channel = CHANNEL_USER1;
Audio.SetVolume(audio_channel, Audio.GetVolume(audio_channel)-20);
How do I... ?
AnswerList of Questions
Copy a File to the Hard Drive
It is often useful to copy a file from a CD-ROM (or other media) to the user's computer. In AutoPlay Media Studio, this is accomplished with a File.Copy action.
As an example, we will load a specific font onto the user's computer:
--get the destination directory (in this case, where the fonts are stored)
fonts_dir = Shell.GetFolder(SHF_FONTS);
--copy the file from your cd to the user's font directory File.Copy(_SourceFolder .. "\\my_font.ttf", fonts_dir..\\"my_font.ttf", false, true, false, true, nil);
--register the font with windows
System.RegisterFont(fonts_dir .. "\\myfont.ttf", "My Font Name", true);
How do I... ?
AnswerList of Questions
Create a Button that Closes the Application
In AutoPlay Media Studio, to create a button to close your application:
1. Choose Object > Button from the menu and select a button file to use.
2. Double click on the button you've just created, and click on the Quick Action tab.
3. Select Exit/Close as the action to run.
4. Click OK.