(Example: +cartoon +desktops)
Advanced Search & Tips
See the Home Page side bar for links to more sections!
App Makeovers Desktop Pictures Icons MacOS X Mods Safari Stuff
Application Splashes Dock Poofs iTunes Skins MacOS X Themes Snapshots
Boot Images Download Stats Links Page Mouse Cursors Uploads
Boot Panels GUI Software Login Panels REALbasic User Forum
Clocks Home Page
Download a free demo of REALbasic!
Download a free demo of REALbasic!
Recent Articles...
3D
3D Photo Gallery Part 2 (12-06-01)
3D Photo Gallery Part 1 (11-29-01)

Audio
iPod Tricks (Part 1)
Laugh Track Machine
Audio Player with Reverb
Shepard Melody(11-08-01)
RB Phone Home (10-25-01)
Build a Drum Machine (10-04-01)

General RB
Hey! You got your Checkbox in my Listbox!
Background Applications (5-02-03)
Listbox Auto-Find
iTunes-style Listboxes
Virtual Volumes
Time Tracker
Software Distribution Part 4
Software Distribution Part 3
Software Distribution Part 2
Software Distribution Part 1
Exceptions
Custom Controls (8-2-01)
Living on the Edge (6-21-01)
Tips and Tricks (6-14-01)
Review of REALbasic 3.0 (2-19-01)
Text Clippings Made Easy (5-10-01)

Graphics
Image Spinner
Cropping Graphics (Part 4)
Cropping Graphics (Part 3)
Cropping Graphics (Part 2)
Cropping Graphics (Part 1)
Shimmer Graphics
Lissajous Figures
Simple Screen Capture
Vector Graphics
Kaleidoscope Images
Stegonography
Spirals!
Image Table (11-15-01)
RB Magnifying Lens (10-11-01)
Screen Capture (8-9-01)
Color Picker Tutorial (6-7-01)

Hacks
Ghost Grab
Speedy Mouse Extension(11-01-01)
iTunes Plugins (8-23-01)
iTunes Skinner (7-26-01)

Internet
HTML IMG Tags
Version Tracking
Even Smarter Instant Messaging
Web Tiler
JavaScript and REALbasic (10-02-01)
Stock Ticker - Part II (9-06-01)
Stock Ticker - Part I (8-30-01)
AIM Mate (8-16-01)

Mac OS X
Using Sheets in REALbasic
Build a Bundle Part 2
Build a Bundle Part 1
Dock Your Passwords
Mac OS X Debugging
REALbasic Mac OS X Icon Tutorial (12-13-01)
Animate Your Dock (5-17-01)
RB and the Command Line (5-3-01)

Novelty
Guessing Game
Calendar Trivia
Tile Mixer
Zip Code Finder
Happy Valentine's Day
Merlin Simulator Part 3 (01-24-02)
Merlin Simulator Part 2 (01-17-02)
Merlin Simulator Part 1 (01-10-02)
Buzzword Machine (10-18-01)
AppleSoft BASIC (9-20-01)

Printing
Print to PDF

Resources
Picture Extractor 2 (5-31-01)
Picture Extractor 1 (5-24-01)

Serial
Caller ID Part 3 (7-12-01)
Caller ID Part 2 (7-5-01)
Caller ID Part 1 (6-28-01)

Speech
Speech Recognition (9-13-01)
Video
Big Brother Video Capture

Newest Dev Tools!

Book Alert !
REALbasic for Dummies
by Erick Tejkowski
$19.99 @ Amazon

Made with REALbasic!

Problems?
Downloads are in StuffIt 5 format (free download).
Tell me about a bad link (Thanks!).
Submission Policy

9-06-01

Create a Stock Ticker with REALbasic (Part 2) by Erick Tejkowski

Last week, we started building a stock ticker application. In that tutorial we looked at one way to retrieve stock information from the Internet with REALbasic. This week, we'll discuss how to display and animate the stock information. The animation will mimic a "Times Square style" stock sign.

Preparation

If you are following along from last week, open the Stock Ticker project and create two new Window1 properties: a Sprite and a Picture. To create these properties, open the Window1 Code Editor and select Edit->New Property.

09_06_properties.jpg (2833bytes)

Build the Interface

Since this is Part 2 of the tutorial, much of the interface is already built. This week, we'll continue using the interface from last week, adding the following three controls:

Control Settings
SpriteSurface Name : SpriteSurface1
Height=40
Timer Name : AnimationTimer
Period = 100
Mode = 0
PushButton Name : StopButton

Arrange the interface however you wish. To give you some ideas, here's how the demo interface is arranged:

09_06_interface.jpg (16k)

Add the Code

Before adding any code to the new controls, we will begin by appending some code to a control from last week. Scroll to the end of the DLfinished event of httpSocket1 (after all existing code) and add the following code:

09_06_dlfinished.jpg (44k)

To help you understand what's going on here, we'll look at this code in reverse order. The AnimationTimer periodically refreshes the stock animation. So, we simple turn it on here.

The heart of our animation is the SpriteSurface control. It takes care of running our animation and we have to do amazingly little work to make it do so. To animate with a SpriteSurface, you must first create a Sprite object, passing it a picture (named "p"). Thus, before creating a Sprite, we create a Picture object and draw the stock quote on it.

Since we want this code to execute anytime we request a new stock quote and a stock animation may already be running, we start this code off by clearing out any existing Sprite graphic with a black square. So, to recap in the forward order, we erase any existing sprites, create a new picture, draw the stock information on that picture, and create a sprite using the picture. Finally, we start the animation timer.

Navigate to the Action event of AnimationTimer and enter this code:

09_06_animationtimer.jpg (2996bytes)

This lonely line of code forces SpriteSurface1 to redraw its sprites. When you call the Update method of a SpriteSurface, it causes the NextFrame event of the SpriteSurface to execute. That's where we move the Sprite. Of course, if it falls off the edge, we want to bring it back to the opposite side to start the crawl all over again.

09_06_surface1_nextframe.jpg (5k)

Once the animation is running for awhile, you may want to turn it off. Open the Action event of StopButton and add some code to stop the animation process.

09_06_stopbutton.jpg (3400bytes)

Conclusion

To give you a taste for how the finished product should look, here's a screenshot. Following last week's recommendation, this graphic shows the interface shrunken to conceal the editfields where all the parsing takes place.

09-06_stock.gif (5k)

Test the project and when you're happy with the results, build the final application. You can download the application and completed project if you don't feel like working through the tutorial. See you next week!


9-04-01

REALbasic News by Erick Tejkowski

Slow RB Week. With Labor Day celebrations demanding the attention of U.S. developers, it's been a fairly quiet week for RB news. We still have a few goodies for you, though.

New REALbasic Beta. Get over to the REALbasic Prerelease section to download the latest prerelease of REALbasic: Version 3.5.1b2

DB Reports. Aaron L Bratcher has posted a bug fixe update of db Reports.

OSAXen Fixer.

OSAXen Fixer makes it possible for REALbasic applications to invoke AppleScript Scripting Additions directly (i.e. without using AppleScript) on Mac OS X systems. On classic Mac OS systems it is possible to invoke a Scripting Addition by simply sending the addition's AppleEvent to yourself. It is also possible to invoke Scripting Additions in other applications by sending the addition's AppleEvent to any other process.
Download version 1.0

Back to School The REALbasic University has posted Part II of last week's tutorial. This week Marc Zeedar shows you how to build an EditField that automatically supports unlimited undo capabilities.


See the Home Page side bar for links to more sections!
App Makeovers Desktop Pictures Icons MacOS X Mods Safari Stuff
Application Splashes Dock Poofs iTunes Skins MacOS X Themes Snapshots
Boot Images Download Stats Links Page Mouse Cursors Uploads
Boot Panels GUI Software Login Panels REALbasic User Forum
Clocks Home Page

Maintained by the Staff of ResExcellence. This entire site ©1997-2003 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement.

[an error occurred while processing this directive]on the ResEx LinuxPPC Server