Error getting tags :
error 404Error getting tags :
error 404 filename | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
filename
Basics
Expander triangle
Type
Property
Syntax

set the filename of {image | player} to {filePath | URL}

Introduced
1.0
Changed
1.1
Environment
Desktop,Server,Web
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Specifies the file associated with a player or image.
Examples

set the filename of image "Animation" to "/HD/Projects/blipvert.gif"

set the filename of last player to "http://www.example.com/myMovie.mov"

set the filename of image ID 10 to "binfile:Picture Example"

Additional Comments
Expander triangle

Use the filename property to reference a separate file that holds the data for an image or player that's a referenced control.

Value:

The filename of an image or player specifies either a file path or a URL. A file path specifies the name and location of the file. If you specify a name but not a location, Revolution assumes the file is in the defaultFolder. A URL specifies the name and location of a file on your system or anywhere on the Internet.

By default, the filename property of newly created images and players is set to empty.

Comments:

The contents of an image can reside either in the stack or in a separate file. If an image's filename is empty, the image uses its own data, which resides in the stack, instead of loading a separate file. (You can import an image with the import command, or paint an image with the paint tools.) Setting an image's filename property to the name and location of a file deletes the previous contents of the image.

Using an image from a separate file reduces memory use, since the image does not need to be loaded into memory unless it is in use. But it increases the time it takes to go to a card containing the image, since the file must be loaded from the disk it's on or from the Internet.

The contents of a player must reside in a separate file that is specified in the player's filename property. If a player's filename is empty, the player does not display any data. The file specified by the filePath or URL must be in a format supported by QuickTime.

Important! Setting a player's filename does not automatically update its currentTime property. If you play a movie file, then change the player'sfilename in order to play another, you must reset the currentTime to zero in order to start from the beginning of the second movie:

set the filename of player "My Player" to "SecondMovie.mov"

set the currentTime of player "My Player" to zero

If you specify a URL for a streaming QuickTime movie file, Revolution displays the movie sequentially as it downloads. Otherwise, Revolution must download the entire file before you can play it. To pre-fetch a file from the Internet in order to speed up access to it, use the load command before visiting the card that holds the player or image that references the file's URL.

Important! Don't use the URLkeyword when specifying a URL. The filename of an image or player is a file location, not the image or movie data itself. If you use the URL keyword, the filenameproperty is set to the contents of the URL, not the URL itself, and this is usually not what's wanted.

You can use the "New Referenced Control" submenu in the File menu to create a new image or player which references the contents of a file you specify. You can also set the filename to an absolute path or relative path by changing the Source field in the image's or player's property inspector.

Changes to Revolution:

The URL option was introduced in version 1.1. In previous versions, the filename of an image or player always specified a file path on the local system, and files on the Internet could not be used.

User Comments
Expander triangle