Tag Archives: contentWidth

How to download an image in corona SDK?

By | January 26, 2012

Downloading an image in corona is really easy. Check out the example. [java] module(…, package.seeall) _W = display.contentWidth; _H = display.contentHeight; function new() local grp = display.newGroup(); local myImage; local function networkListener( event ) if ( event.isError ) then print ( "Network error – download failed" ) else myImage = display.newImage( "helloCopy.png", system.TemporaryDirectory, 60, 40 ) myImage.alpha =… Read More »

Gradient Text in Corona

By | January 24, 2012

To create gradient text in corona, you have to download ‘Corona daily build 612’ which has functions like setFillColor() etc. You create a new gradient object by calling graphics.newGradient(). You can pass (and reuse) the object in calls to text:setTextColor() and rect:setFillColor(). Here is an example. [java] local myText = display.newText( "Hello, World!", 0, 0, native.systemFont, 40 )… Read More »