Articles 3D Audio Custom Controls General RB Graphics Hacks Mac OS X Menus Novelty Printing REALbasic 2005 REALbasic 2006 Registration Resources Reviews Serial Speech Sockets XML Video Resource Links News Current News February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 ![]() REALbasic for Dummies by Erick Tejkowski ![]() Learning REALbasic through Applications REALbasic for Macintosh REALbasic Cross-Platform Application Development
Older files are in Stuffit 5 or greater format. Newer files are ".Zip". Download StuffIt Expander |
|
Build the Interface NOTE: This project requires REALbasic 4.5 or newer! Launch REALbasic and open Window1 from the Project window. To this window, add the following controls:
Arrange the interface to your liking. It might look like this:
The final step in completing your interface is to add a control binding. Hold Cmd-Shift and drag from the RemoveButton to Listbox1. When you let go of the mouse, a Bindings dialog appears. Click OK to select the first (and only) item in the Binding list and close the window. Source Code Before you begin adding code, you need to complete a few preparatory steps. First, add a new file type to your project by selecting Edit-File Types. Fill out the fields to look this:
Close the File Types window and double-click Window1 to open its Code Editor. Using Edit-New Property, create three new properties.
Finally, it's time to add some code. In the Open event of Window1, add the following code: originalMovie as Movie Next, navigate to the KeyDown event of Window1 and add this code: if acceptLaughs then In the Action event of OpenButton add some code: //get a movie file In the Action event of RemoveButton add this code: listBox1.removeRow listBox1.listindex The final code goes in the Action event of SaveButton: Conclusion To test the project, select Debug-Run and follow these steps:
That's it for this week! As you might imagine, there are many improvements you could make to this project. For example, you could add more than one kind of laugh and trigger each one using a different key. That way, as you review the movie, you could add strong laughs for really funny parts, or maybe snickers for less funny sections. As usual, you can download the completed project here. Have fun and see you next week! |
|||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement.
[an error occurred while processing this directive]