Name
GetAsset -- get handle to Android asset (V6.1)
Synopsis
handle$ = GetAsset(f$)
Function
This function can be used to get a handle to an Android asset linked to an APK file compiled by the Hollywood APK Compiler, which is an external add-on for Hollywood. The string returned by this function can then be passed to all Hollywood functions that deal with files, e.g. LoadBrush() or OpenMusic(). Keep in mind, though, that assets are read-only. Trying to write to an asset handle will result in an error.

Note that since Android is based on Linux, asset names are case sensitive. Thus, the name you pass to this function must exactly match the name specified with the Hollywood APK Compiler or Hollywood will report a "File not found" error.

For convenience reasons, GetAsset() is also supported by all other Hollywood versions but it simply returns the string passed to the function in all non-Android versions of Hollywood.

Inputs
f$
name of the asset to obtain
Results
handle$
handle to the asset which can then be passed to all Hollywood functions that deal with files
Example
LoadBrush(1, GetAsset("test.png"))
The code above loads the asset "test.png" into brush number 1. For this code to work you need to link a file named "test.png" (case must match exactly!) to your APK with the Hollywood APK Compiler.

Show TOC