Corona in 5 minutes

Let's start with a quick introduction to the Corona SDK. We'll focus just on the essentials without getting stuck in the details. We're not trying to be complete or precise. Rather, we want to get you as quickly as possible to the point where you can start creating cool, useful, or engaging apps.

We'll talk about some basics like variables and functions as well as incorporate animation and interactivity so you get a sense of what's possible. Keep in mind this is just a tutorial, so you won't find a complete explanation of any one feature.

Our aim is to address multiple audiences. Experienced programmers should be able to extrapolate the information in this chapter for their own needs. Beginners can use this as a springboard for writing their own small, simple apps.

Download Tutorial Files

The files for this tutorial are available for download. HelloWorldTutorial.zip

Hello World

The best (only) way to learn how to use the Corona SDK is by writing an app. To do that we write programs in a language called Lua. In keeping with tradition, let's write a some Lua code that prints “Hello World”.

The big roadblock, here, is figuring out the details of how to actually use the Corona SDK to do this. Once you've got these details mastered, everything gets a lot easier.

So let's get started! What you'll need is a text editor to write your program in. Later, you'll save that file to a folder so that the Corona Simulator can run and show you the results.

In the text editor, type the following:

print( "Hello World" )

Corona folderThen save it to a file called main.lua in some folder that's easy to locate. Generally, every program should have its own folder on your system.

To run the program, you need to launch the Corona Simulator. All Corona SDK files should be in the Corona folder in your Applications folder (see Getting Started Guide for more information on how to install the Corona SDK.)

The contents of the SDK will look something like the picture at right. Double-click on the icon for Corona Terminal (the circled icon below).

This will launch a Terminal window and bring up a file dialog. In the dialog, navigate to the folder containing your main.lua file and click the Open button.

At this point, you will see “Hello World” in the Terminal window:

You will also see a blank simulator window (right) that simulates what would display on the actual phone. In this case, the phone screen remains blank because we're told the program to output to the Terminal.

Let's explain how this program worked. The app launches from the file called main.lua. The simulator loads this file and follows the instructions contained inside. Generally, an app consists of statements and variables. Statements provide instructions on what operations and computations need to be done; variables store the values of these computations.

In this program, we use a function called print. A function is just a collection of statements that perform some task. You send inputs into the function called parameters (or arguments). Some functions return results. In the case of print, all it does is output the arguments as strings to the Terminal.


Simulator vs Terminal

So why did “Hello World” only display in the Terminal window and not in the simulator? That's because print is designed to output messages to the Terminal. Its purpose is to output you to send diagnostic messages about what's happening in your program. And in general, the Terminal window gives you the ability to see warning/error messages that the simulator generates or print your own messages.


Hello World on the Simulator

To get things displaying on the simulator screen, we need to use different functions that come from Corona's graphics library. A library is a collection of functions that provides useful, but related functionality. To show “Hello World” in the simulator, you need to add the following two lines:

local textObject = display.newText( "Hello World!", 50, 50, nil, 24 )
textObject:setTextColor( 255,255,255 )

Let's explain what's happening. newText is a function of the display library that returns an object that will represent the text on the screen.

Library functions deserve some more explanation. In this example, you can think of newText as belonging to the display library. This relationship is known as a property relationship. So to access the newTextproperty of display, you have to use a dot. Hence, you write “display.newText” but not “newText” by itself.

The function setTextColor is a special method called an object method. It uses a special colon syntax that means it is related to the text object you created. Typically these methods modify the variable before the colon (i.e. textObject ). In this case, the text object has no color by default, so we need to assign the Red, Green, and Blue color channels. These numbers range from 0-255. So for white, we need 255 for each channel.


Rapid Prototyping

One of the most powerful things about the Corona SDK is the ability to make quick changes and see those changes instantly.

Let's revisit our previous example to see how this works. You can also start with the “HelloWorld” project in the Sample Code. Launch the simulator, navigate to the folder for your program, and click open as you did before.

Now, open up the main.lua file in your text editor and try changing the 3 arguments to setTextColor. For example, you might have done something like:

local textObject = display.newText( "Hello World!", 50, 50, nil, 24 )
textObject:setTextColor( 255, 0, 0 )

Now, save the file and then go back to the simulator. Under the File menu, click the Relaunch submenu item (File > Relaunch) — or use the keyboard shortcut ⌘R (command-R) in the simulator. This reloads your main.lua file without having to restart the simulator. Notice how the color of the text changes immediately. In the version above, the text would appear red.

As you develop your application, you'll find yourself doing this sort of thing very often. You'll load your app in the simulator, make some edits to your main.lua file in text editor, switch back to the simulator and relaunch your code to see the results. This makes it really easy to make edits and see the results, all while avoiding the time and trouble of quitting and restarting the simulator.


Basic Interactivity

Let's add some interactivity by creating a button that will change the color of the text randomly. Starting with your “HelloWorld” project, add the following lines at the end of main.lua to load an image:

local button = display.newImage( "button.png" )
button.x = display.contentWidth / 2
button.y = display.contentHeight - 50

This loads an image called button.png and positions it at the bottom center of the screen. It uses another display library function ( display.newImage ). This function returns an image object that we store in the variable button. We could have called the variable anything, but the name button seemed natural since we are going to turn this image into a button.

The image object that we created has built-in properties that we can modify. These include the x,y positions on the screen which refer to the position of the center of the image relative to the top-left corner of the screen.

To get a position towards the bottom of the screen, we took advantage of the display properties of the screen display.contentWidth and display.contentHeight to help us center the position of the image.

To turn the image into an actual button, we need to make it respond to events. There are various kinds of events. For this example, we will make the image respond to “tap” events (which are similar to single mouse clicks on a desktop computer). When you add the following lines at the end of main.lua, you can click on the image and the text color changes.

function button:tap( event )
        local r = math.random( 0, 255 )
        local g = math.random( 0, 255 )
        local b = math.random( 0, 255 )
 
        textObject:setTextColor( r, g, b )
end
 
button:addEventListener( "tap", button )

Let's see how this works. The code above has two parts. The first part defines an object listener for the image object button. An object listener (usually called a table listener) is an object method whose name matches the name of the event. Object listeners are just another name for object methods where a specific convention is followed: the name of the method is the same as the name of the event we are interested in, so in this case, we call the method tap. The colon is present because that's the syntax for defining object methods.

The second part is where we register this object listener to receive “tap” events. Fortunately, the image object button (like all objects created by the display library) has a built-in object method called addEventListener that allows us to make it interactive. Because it's an object method, the image object variable buttonis to the left of the colon and the object method addEventListener is to the right. The first argument is the name of the event and the second argument is the image object itself.

When the user taps on the image, the system sees that an object listener has been registered. It looks for an object method named tap inside that object and then calls that method. In our implementation of the tap object method, we generate 3 random numbers between 0 and 255 and use those to set the new text color.

The final code for this is available in the “HelloWorld2” folder.


Animation and Sound

Let's animate the text and add some sound every time the user taps the button. Start with the “HelloWorld2” project and add the following lines at the end of main.lua so that the text will move vertically down by 100 pixels:

transition.to( textObject, { time=1000, y=textObject.y+100 } )

Here, we are using the transition library which does a lot of the heavy lifting on our behalf (see Animation).

We can add some sound by adding one line to the tap object method:

function button:tap( event )
        local r = math.random( 0, 255 )
        local g = math.random( 0, 255 )
        local b = math.random( 0, 255 )
 
        textObject:setTextColor( r, g, b )
        media.playEventSound( "beep.caf" )
end
 
button:addEventListener( "tap", button )

Here we are using the media library which provides multimedia support.

You're All Set

So that’s it for the quick tour of Corona. There's plenty more to explore like using the accelerometer to create novel user interactions, getting GPS information to enable location-based functionality, storing data in a database, and much much more.

Hopefully, you've gotten a taste for how easy Corona makes it to create cool apps and games. If you want to learn more, head over to our Overview page.

Or, if you’d really like to dig into a book, check the book list for titles available for sale online or at your local bookseller.

Replies

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Philippe Chapuy
User offline. Last seen 16 weeks 2 days ago. Offline
Joined: 9 Aug 2010

Pretty cool, i want to learn more after reading this...

dario
User offline. Last seen 24 weeks 3 days ago. Offline
Joined: 18 Aug 2010

Thank you guys. I am euphoric ;) Want to learn more.

wizball
User offline. Last seen 1 year 13 weeks ago. Offline
Joined: 20 Oct 2010

remove the :tap from the function, and change the event type to "touch" when adding the event listener. For some reason I kept getting addEventListener as nil and when I did this it worked.

DavidBFox's picture
DavidBFox
User offline. Last seen 2 days 21 hours ago. Offline
Joined: 10 Oct 2010

Works fine for me as is, wizball... if you replace "tap" with "touch" you'll get two events... one when you touch the screen, and one when you release (so you'll hear two beeps and get two color changes for each screen touch). You'd have to then check the event.phase to see if it's equal to "began" (beginning of touch) or "ended" (release of the touch).

magnp01
User offline. Last seen 49 weeks 6 days ago. Offline
Joined: 29 Nov 2010

This tutorial makes it clear to me that I can learn "lua"

Antheor
User offline. Last seen 22 hours 22 min ago. Offline
Joined: 22 Sep 2010

I have the message following runtime error : "please check console output for detail".

WHen opening /utilities/console, I have no corona message at the moment the error occured (but some from the day before).

Am I checking the right console ???

BTW, I got the error trying to do something as simple as trying to catch a tap on screen (not on a button, just on screen) (launching a function)... could you help me to get the single line code -I suppose- for this tremendously hard task :))

Gilbert's picture
Gilbert
User offline. Last seen 4 weeks 2 hours ago. Offline
Ansca Staff
Joined: 5 Apr 2010

Hi @Antheor,

To open the console that the message is referring to you have to use "Corona Terminal".

First, close the simulator if you have it open now. Then go to the folder where you have the "Corona Simulator" (which should be in the Corona folder in your Applications folder) and you'll see "Corona Terminal" in there.

Double click "Corona Terminal" and you'll see the Terminal window come up. This will then trigger the simulator. From here on you can open apps as you normally would in the simulator, but keep the terminal where you can see it.

Regarding detecting taps anywhere on the screen, there are two ways to do that. You could create a large black rectangle, the full width and height of the screen, then detect tap events on that. It's basically like a big button.

You could also do it by detecting runtime events. Try this code:

(Make sure you have Corona Terminal open. You should see a message in the terminal each time you tap the simulator: "tap detected".)

1
2
3
4
5
6
7
8
9
10
11
12
13
local textObject = display.newText( "Hello World!", 50, 50, nil, 24 )
textObject:setTextColor( 255, 0, 0 )
 
function tapListener( event )
        local r = math.random( 0, 255 )
        local g = math.random( 0, 255 )
        local b = math.random( 0, 255 )
 
        textObject:setTextColor( r, g, b )
        print('tap detected')
end
 
Runtime:addEventListener( "tap", tapListener )

Danieljh75
User offline. Last seen 1 year 3 weeks ago. Offline
Joined: 17 Jan 2011

What's changed? The text works in the simulator up to the point where it turns red. Appending the main.lua file with the code for a button didn't work. I read the comment regarding the beta and a different version. I tried the code with the display.stageHeight and also the display.contentHeight. No difference. I copied and pasted just to be sure I wasn't making a typo. No go. So if the everyone else is / was successful, what did I miss?

Gilbert's picture
Gilbert
User offline. Last seen 4 weeks 2 hours ago. Offline
Ansca Staff
Joined: 5 Apr 2010

Hi @Danieljh75,

The button in this example requires an image named "button.png" to be in the same folder as the main.lua file. Without the image, you won't see a button.

To try this example without using an image, you could draw a rounded rectangle on the screen and make that tappable. Try this code:

(Notice on line 4 that a rounded rectangle is created and named "button".)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local textObject = display.newText( "Hello World!", 50, 50, nil, 24 )
textObject:setTextColor( 255, 0, 0 )
 
local button = display.newRoundedRect(0, 0, 290, 75, 12)
button:setFillColor(0, 255, 0)
button.x = display.contentWidth / 2
button.y = display.contentHeight - 50
 
function button:tap( event )
        local r = math.random( 0, 255 )
        local g = math.random( 0, 255 )
        local b = math.random( 0, 255 )
 
        textObject:setTextColor( r, g, b )
end
 
button:addEventListener( "tap", button )

Danieljh75
User offline. Last seen 1 year 3 weeks ago. Offline
Joined: 17 Jan 2011

I couldn't see the color blue where it said to get the tutorials. Someone had to show me that it was there. But I see that it has been modified. Thanks and thank you for the quick response.

Gilbert's picture
Gilbert
User offline. Last seen 4 weeks 2 hours ago. Offline
Ansca Staff
Joined: 5 Apr 2010

I just added that blue box to try to highlight the tutorial files available for download. I can understand how they were easily missed. Hopefully this helps other people as well.

And here's a direct link to the download:

http://developer.anscamobile.com/sites/default/files/HelloWorldTutorial.zip

Anchor45
User offline. Last seen 1 year 3 weeks ago. Offline
Joined: 18 Jan 2011

I am unable to select the Corona Terminal on my mac.
The icon is dim and I get the error message "Please select a main.lua file or a directory that contains that file."

What did I do wrong!?
or,
what am I doing wrong?

Danieljh75
User offline. Last seen 1 year 3 weeks ago. Offline
Joined: 17 Jan 2011

Let me help you with text edit first (trust me on this one) then help you with CoronaSimulator.app.

-On your mac, go to applications and open TextEdit.
-Go to TextEdit's preferences.
-Change the document format from 'Rich Text' to 'plain text.' It may assist you in the future. Then just close the preferences window.

-On the text edit app, close the first blank text window that appeared. Go to file menu and select new. The window will look very plain and bland. This is good.

-On the first line, type

print("Hello World!")

-Select file menu and 'save as.'
-Save the file as "main.lua" and save it somewhere like your desktop for this example.

Corona:

Navigate to your applications folder and open the Corona directory. From here, you'll want to open the CoronaSimulator.app. Ignore the terminal or anything else that appears. With the CoronaSimulator.app still selected as the application that you're using, click on the file menu and select open. Navigate to the "main.lua" that you saved on your desktop. Now, the little terminal window will display a line of text that says, "Hello World!", although, without the quotations being displayed.

After this, read along the tutorial and use the demo files that are linked at the top of the page. I'm sure a moderator will assist you if you need more in-depth guidance.

Dan

naytronic5000
User offline. Last seen 1 year 2 weeks ago. Offline
Joined: 18 Jan 2011

How do you code for a difference in touching and releasing similar to onclick and release kind of actions?

Gilbert's picture
Gilbert
User offline. Last seen 4 weeks 2 hours ago. Offline
Ansca Staff
Joined: 5 Apr 2010

Hey @naytronic5000,

You can do this by checking the phase property of the touch event. There are five phases for a touch: "begin", "moved", "ended", "stationary" and "cancelled". Generally, the first three are all you need.

Here's an example of a touch listener that will do things based on the touch phases:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function myButtonListener(event)
  local phase = event.phase
 
  if phase =="begin" then
 
    print('touch started!')
 
  else if phase == "moved" then
 
    print('the user is moving the touch now')
 
  else if phase == "ended" then
 
    print('the touch ended')
 
  end 
 
end

Take a look at some of the articles in this section:
http://developer.anscamobile.com/content/application-programming-guide-event-handling

Also, take a look at this sample app:
http://developer.anscamobile.com/sample-code/transition

The startDrag function in this sample app uses the different event phases and also uses setFocus() to maintain the touch even if the user passes over another object that has a touch listener. You don't want other touch listeners interfering while your user still has his or her finger on the screen.

Antheor
User offline. Last seen 22 hours 22 min ago. Offline
Joined: 22 Sep 2010

Thx for the answer Gilbert.

timecmdr
User offline. Last seen 5 weeks 3 days ago. Offline
Joined: 19 Jan 2011

Cool I love this stuff Man!

naytronic5000
User offline. Last seen 1 year 2 weeks ago. Offline
Joined: 18 Jan 2011

@Gilbert

I'm a uber newb! I guess i'm just not grasping it! I read the articles and they all deal with ui.lea files? It just doesn't make since to me!

jvega
User offline. Last seen 1 year 1 week ago. Offline
Joined: 22 Jan 2011

Great tutorial! I have some previous C++ and iPhone SDK background and I'm already finding Lua to be much easier. Can't wait to dig deeper!

Paul Williamson
User offline. Last seen 1 week 4 days ago. Offline
Joined: 28 Jan 2011

Newbie here, top stuff but ran into a minor glitch.
Got the "Hello World" up and changed the text color but when I tried to add the button got an error..
WARNING:Failed to find image(button.png)

How can I point the simulator in the right direction to find the .png file?
thanx

jvega
User offline. Last seen 1 year 1 week ago. Offline
Joined: 22 Jan 2011

Fellow newbie here, Paul. Ran into the same problem. There is probably a way to direct Corona via an explicit path to the file but the easies thing to do is run a search for the button.png (which is buried in your Corona example files somewhere) and simply copy and paste it into the same folder that contains your "Hello World" main.lua file. The code as it's written expects the image file to be located in the same file as the main. Hope that helps!

tdbriscoe
User offline. Last seen 44 weeks 18 hours ago. Offline
Joined: 27 Jan 2011

I've worked through this demo on the Windows beta. It worked fine except for playing the sound file. I switched the ".caf" file for a ".wav" and it worked.

Paul Williamson
User offline. Last seen 1 week 4 days ago. Offline
Joined: 28 Jan 2011

Great, thanx..

LTG
User offline. Last seen 1 year 1 week ago. Offline
Joined: 31 Jan 2011

Very good information. Thanks!

LTG
User offline. Last seen 1 year 1 week ago. Offline
Joined: 31 Jan 2011

@ naytronic5000 they are .lua files and if your using mac try textwrangler. If your using pc, try something like Notepad++

@Paul Williamson and jvega
See Post #9

Hope that helps : )

Hammoud
User offline. Last seen 1 year 6 days ago. Offline
Joined: 3 Feb 2011

Can this work on a PC? Textwrangler didnt work so i downloaded notepad+++ like some of you mentioned. Im not understanding how to get it as a main.lua file? If someone can please help i will be very thankful.

troynall's picture
troynall
User offline. Last seen 6 days 22 hours ago. Offline
Joined: 8 Nov 2010

when saving the "main.lua" from your editor make sure you dont include the default .txt extension.

Some editors by default add the .txt extension to your files.

I put "main.lua" in the filename box
and then select file type as "txt" but do not
save it with a txt extension.

There should be a box that remembers your preferences.

RGgamer
User offline. Last seen 2 weeks 3 days ago. Offline
Joined: 17 Jan 2011

I am trying to display pictures from my files but can't. can you help me?

p.s. I am a windows user

RGgamer
User offline. Last seen 2 weeks 3 days ago. Offline
Joined: 17 Jan 2011

same problem

RGgamer
User offline. Last seen 2 weeks 3 days ago. Offline
Joined: 17 Jan 2011

thanks alot jvega!!!!!! really helped!!

elizabeth
User offline. Last seen 16 weeks 6 days ago. Offline
Joined: 14 Jan 2011

Okay just did my first hello world test. I always knew a tool like Corona would come along but OMG things move fast in Mobile development!!!
@ElizabethBoylan

MacMusings
User offline. Last seen 50 weeks 5 days ago. Offline
Joined: 22 Jan 2011

Hey guys I have a separate .caf file that is stored in the same folder as my main.lua file but fo some reason that .caf file is not playing.

Can you help me out!!!

troynall's picture
troynall
User offline. Last seen 6 days 22 hours ago. Offline
Joined: 8 Nov 2010

1) double check your .caf file name.
2) make sure extension to cat file in not capitalized.

also try posting you code.

its probably a very small mistake
like missing a double quote.

also try quitting the simulator completely.
and then restarting again just for good measure.

DavidBFox's picture
DavidBFox
User offline. Last seen 2 days 21 hours ago. Offline
Joined: 10 Oct 2010

MacMusings, right, to double-check the file name, click on the file and hit command-I (if you're on a Mac) and make sure the file extension isn't hidden. I've seen files that look ok in the finder, but then find there's actually another hidden extension (so maybe sound.caf.aif for example, with the .aif portion hidden).

alarcine
User offline. Last seen 5 weeks 1 day ago. Offline
Joined: 16 Jan 2011

Where could I find information for the Corona library functions?. The tutorials delve into just a few of them.
I cannot find any compete listing and explanation of the functions available...

troynall's picture
troynall
User offline. Last seen 6 days 22 hours ago. Offline
Joined: 8 Nov 2010
kites
User offline. Last seen 48 weeks 3 days ago. Offline
Joined: 16 Jan 2011

Sorry for the noob question but, every time I try to launch the code it says unexpected symbol near '{'.

kites
User offline. Last seen 48 weeks 3 days ago. Offline
Joined: 16 Jan 2011

Now the sound won't play when i click on the button i have gotten every thing else down except for the sound

qianlima210210
User offline. Last seen 9 weeks 4 days ago. Offline
Joined: 26 Jan 2011

why the cat file can not play?

class0402
User offline. Last seen 17 weeks 1 day ago. Offline
Joined: 13 Oct 2011

About the Caf sound not playing.
The HelloWorld tutorial unzips into three folders. There is no beep.caf in the first one. If you start by launching main.lua in the first one, it doesn't see a beep.caf sound file. It's in the HelloWorld2 folder.
So the main.lua file in the HelloWorld folder seems to only see the resources in that folder, an important fact not mentioned in the tutorial.

Also, the tip on setting text editor preferences is great, after half hour of frustration on a 5 minute tutorial... note to tech writers...

terasaki
User offline. Last seen 33 weeks 4 days ago. Offline
Joined: 27 Mar 2011

I can't play sound too.
So beep.caf file is broken?

I get other caf file(aiff) and replace beep.caf.
I can play sound.

binyu1749
User offline. Last seen 30 weeks 5 days ago. Offline
Joined: 13 Mar 2011

What?
1 function button:tap( event )
2 local r = math.random( 0, 255 )
3 local g = math.random( 0, 255 )
4 local b = math.random( 0, 255 )

5 textObject:setTextColor( r, g, b )
6 end
7
8 button:addEventListener( "tap", button )

This representative is assorted the meaning?

rwgeorge
User offline. Last seen 41 weeks 3 days ago. Offline
Joined: 22 Apr 2011

Holy cow people...change Beep.caf to Beep.wav and it will work. Now, was that hard?

Cisco Antonio
User offline. Last seen 19 weeks 1 day ago. Offline
Joined: 3 Nov 2010

The .caf file is short for Core Audio Format sound file for Mac based computers. Make sure your image and sound targets that you refer to in your code are spelled the same way for the files they refer to.

If you are using a Windows PC, use a .wav or .mp3 file in the same folder as your main.lua file it should work properly.

perseusspartacus
User offline. Last seen 6 days 19 hours ago. Offline
Joined: 9 Aug 2011

In the 'Bridge' sample code, the background picture is created with this code:

local background = display.newImage( "jungle_bkg.png", 0, 0, true )

I know what the 'true' parameter is (it explains it just above this code in the file). What I want to know is what those '0's are. Are they x and y coordinates for the top left corner of the picture?

natecope
User offline. Last seen 21 weeks 4 days ago. Offline
Joined: 11 Sep 2011

How can I start the console on a PC? I do not see the console executable.

stevenljackson1
User offline. Last seen 21 weeks 3 hours ago. Offline
Joined: 13 Sep 2011

I was able to start CoronaSimulator.exe and the console popped up as well as the simulator. I saw both "Hello World!" messages, one in each window.

Hope this helps.

underwaterdiver's picture
underwaterdiver
User offline. Last seen 2 days 18 hours ago. Offline
Joined: 28 Oct 2011

Wow, this is the stuff. I've been a newbie for two months and reading all the iPhone material I could get and doing the chapters and exercises getting lost on where to put certain snippets of code.

Corona SDK is the bomb. Make that Bomb with a capital B!!!

I'm going from trial today straight to the PRO. Why wouldn't I???

It just makes sense to publish to all the markets with the same app.

Thanks ANSCAMOBILE!!!

Richard

BareJonas
User offline. Last seen 4 days 11 hours ago. Offline
Joined: 18 Nov 2010

When I change the "View As" form iPhone to iPhone4 for the image button and text gets rezized to half the original size (or something)
How come? How do I fix this?

robleong
User offline. Last seen 1 week 5 days ago. Offline
Joined: 31 Dec 2011

Love the relative simplicity of the Corona interface/Lua programming language.

However, the example here may be somewhat confusing for a beginner who is typing the program him/herself, who may not know that the command "display.newImage" requires a graphics file "button.png" to be present in the same folder, or that the command "media.playEventSound" requires a sound file "beep.caf" to be present in the same folder. Additionally, "beep.caf" does not work in Windows, so will need to be substituted with a different sound file.

Still, I look forward to programming in Corona!