Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

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