Special

Special Print Offer

Get the RBD Archive 7 printed book for FREE when you buy an Ultimate Combo printed back issue package! This perfect-bound book is over 300 pages and contains the full year 7 of RBD. Normally this book sells for $50, but with this special offer you not only save 25% off the normal package price, you get the book included for free!

RBD Magazines

Supplies are limited, so take advantage of this offer before it goes away.

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