Hi everyone, OK, this one is a bit of a challenge…
I’m using Corona’s UI template (Corona SDK/SampleCode/Interface/WidgetDemo), which uses storyboard to move between different (not separate LUA files) scenes, ie;
<code>
function newScene:createScene( event )
local group = self.view
</code>
Obviously I wanted to a little customising, so within one of ‘those’ scenes, I imported the ‘draw a line’ code (excellent script for drawing on the stage http://sree.cc/corona-sdk/easy-finger-drawing-in-corona )
The lines that are drawn are assigned to new display groups, like this:
<code>
local lineTable = {}
local newLine = function(event)
local function drawLine()
local line = display.newLine(linePoints[#linePoints-1].x,linePoints[#linePoints-1].y,linePoints[#linePoints].x,linePoints[#linePoints].y)
line:setColor(lineColor.R, lineColor.G, lineColor.B);
line.width=lineWidth;
lineTable[i]:insert(line)
</code>
The problem is getting this function within my main display group, I just can’t get it to work… Is there anyway to ‘nest’ lineTable[i]:insert(line) within my local group?, so it responds with the rest of the scene?
Thanks very much if you can help.
Mark