win8_share_file

Share a file through the "Share Charm".

Syntax:

GML Code Example

win8_share_file(filename, title, description, immediate);


Argument Description
filename The name of the file to share
title The title of the file (a string)
description A text description of the file
immediate This flag can be set to true or false to share immediately or not.


Returns: N/A


Description

With this function you can share a file from your game. The file should be an included file (or one that your game has created) and part of the app "bundle", and you should give it a title and a description. Finally you should indicate whether it should be shared immediately (true) and shown in the slide-out share "charm" or not (false), in which case the user will have to manually call on the share "charm" to see the content.


Example:

GML Code Example

if keyboard_check_pressed(ord("S"))
    {
    win8_share_file(working_directory + "New_Level_Save.txt", "C.T.H. Level", "Catch The Haggis user level.", true);
    }
 

The above code will check for the "S" key being pressed and if it is detected it will take and share a file.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here