widget.newSpinner) appearing When it has not been called

Hi Guys, am new to corona sdk.

I have a spinner widget that suppose to appear when i call spinner:start() but instead its appears immediately you enter a scene, below is my code and its not placed in any scene or event

local options = { width = 140, height = 140, numFrames = 1, sheetContentWidth = 140, sheetContentHeight = 140 } local spinnerSingleSheet = graphics.newImageSheet( "images/load/loading.png", options ) -- Create the widget local spinner = widget.newSpinner( { width = 140, height = 140, sheet = spinnerSingleSheet, startFrame = 1, deltaAngle = 10, incrementEvery = 10 } )

Take a moment to read the code that you’ve posted.

-- Create the widget local spinner = widget.newSpinner( ... )

That widget.newSpinner() creates the display object. The “start” method only makes it spin. If you don’t want it to show (yet), then

  1. create it later,
  2. set “spinner.alpha = 0”
  3. set “spinner.isVisible = false”

Thank it worked