Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

widget.newSpinner) appearing When it has not been called
Started by noahlinus Nov 02 2019 12:15 PM

2 replies to this topic
spinner widget

Best Answer noahlinus , 03 November 2019 - 12:04 PM

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

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

noahlinus

[GLOBAL: userInfoPane.html]
noahlinus
  • Observer

  • 2 posts
  • Corona SDK

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
    }
)


[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 981 posts
  • Corona SDK

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"



[TOPIC: post.html]
#3

noahlinus

[GLOBAL: userInfoPane.html]
noahlinus
  • Observer

  • 2 posts
  • Corona SDK

  Best Answer

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




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: spinner, widget