How do I... ?
AnswerList of Questions
Remember Runtime Preferences
As an example, let us assume that your application asks the user if videos should be visible in the application. But you only want to ask the user the first time they launch the program. On each subsequent launch, you wish to show/hide the video object based on the user's initial preference.
To accomplish this in AutoPlay Media Studio:
1. Insert the following code into the On Preload event of the page containing the video object:
visible = Application.LoadValue("Application", "Video"); if visible == "" then
visible = Dialog.Message("Visible videos", "Do you want the Video Objects to be visible?", MB_YESNO);
Application.SaveValue("Application", "Video", visible);
end
if String.ToNumber(visible) == 7 then Video.SetVisible("Video1", false);
end
Note: This script does not give the user a second choice. Once they choose yes/no, that choice is permanent. If you wanted to offer the user a second choice, or the option to change the setting later, include the following code in the On Click event of a button object:
visible = Dialog.Message("Visible videos", "Do you want the Video Objects to be visible?", MB_YESNO); Application.SaveValue("Application", "Video", visible);
How do I... ?
AnswerList of Questions
Remove Unused Files from My Project
During the development of an application, inevitably files are included in your distribution that are not used in the end, and therefore are taking up precious space.
In AutoPlay Media Studio, these files can be automatically removed:
1. Choose Tools > Optimize Resources from the menu.
2. Select the project folders you want to clean.
3. Click OK.
This searches out files in your project that your project does not use, and allows you the option of removing any useless files.
Tip: Enable the Confirm deletion option to ensure nothing gets deleted without your knowledge.