Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

Print:
PDF:

Beginner's Corner

File Things, Part Two

Working with "folderitems"

Issue: 4.1 (September/October 2005)
Author: Marc Zeedar editor-at-rbdeveloper.com
Article Description: No description available.
Article Length (in bytes): 12,315
Starting Page Number: 30
RBD Number: 4113
Resource File(s):

Download Icon 4113.sit Updated: Monday, September 19, 2005 at 12:20 PM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

In the last issue I explained, in general terms, how folderitems work, and how to use them to read and write text and binary files. But folderitems can do a lot more. There are built-in methods for reading pictures, styled text, movies, sounds, and more. Today we're going to explore those features.

Built-in Folderitem Methods

Working with a folderitem's built-in methods for reading in pictures, styled text, movies, and sounds is easy: in most cases you simply read the item into a variable you've created for the purpose. For example, if f is a folderitem that points to a movie file and qt is designated a movie object, the following would read in the movie and place it inside the qt property:

qt = f.readAsMovie

Of course you also need some simple supporting code. Here's an example from today's demo project:

dim f as folderItem

dim qt as movie

f = getFolderItem("catsumo.mpeg")

if f <> nil then qt = f.openAsMovie

if qt <> nil then

moviePlayer1.border = true

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com