Skip to first unread message

Toby P

unread,
Mar 31, 2015, 11:25:14 AM3/31/15
to mitappinv...@googlegroups.com
Hi all,

I am trying to create a test app which has 3 screens, each screen with its own player/sound that starts as soon as the screen is opened. I simply want to be able to select any of the three screens from the spinner, but am finding it increasingly difficult. I have scoured the web for tutorials on the spinner and most of them only contain basic info that I already know. Can anyone help? I've attached my blocks screen, and I'm sure it is just the case of missing blocks!

Thanks.

Spinner trial.jpg

Taifun

unread,
Mar 31, 2015, 11:39:54 AM3/31/15
to mitappinv...@googlegroups.com
and most of them only contain basic info that I already know
so if you already know the basic info, why don't you use the Spinner.AfterSelecting block together with the Spinner.Selection or Spinner.SelectionIndex to find out what has been selected?
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Toby P

unread,
Mar 31, 2015, 11:53:23 AM3/31/15
to mitappinv...@googlegroups.com
Thanks for your reply, Taifun. Sorry, my screenshot didn't include all my blocks. I have tried using the spinner.afterselecting block, but I am struggling to link the Spinner.SelectionIndex and Spinner.selection to specific screens. I have only managed to make the entire spinner (when clicked) go to a different screen.

I should also qualify that when I say 'basic info', I mean really basic. I have yet to find a tutorial that covers spinner selection >>>multiple screens.

Taifun

unread,
Mar 31, 2015, 12:25:06 PM3/31/15
to mitappinv...@googlegroups.com
I should also qualify that when I say 'basic info', I mean really basic. I have yet to find a tutorial that covers spinner selection >>>multiple screens. 
 
Do the tutorials to learn the basics of App Inventor.

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do. 

in your case you can for example use the SelectionIndex like this
if Spinnner.SelectionIndex = 1
then open another screen Screen1
else if Spinner.SelectionIndex = 2
then open another screen Screen2
etc

alternatively use the Spinner.Selection
Taifun

Toby P

unread,
Mar 31, 2015, 2:00:10 PM3/31/15
to mitappinv...@googlegroups.com
I did make the mistake of choosing to do some tutorials and not all, so I will work on them next.

As for the selection.index, is the attached correct? The spinner is still unresponsive with those commands, am I missing a line?

ps. The correct file is now attached/

Spinner trial2.jpg

Taifun

unread,
Mar 31, 2015, 4:10:06 PM3/31/15
to mitappinv...@googlegroups.com
I prepared a small spinner example for you
to open another screen, just add the open another screen block...
Taifun


spinner.aia

Toby P

unread,
Mar 31, 2015, 6:42:20 PM3/31/15
to mitappinv...@googlegroups.com
Many thanks for this, Taifun. In addition to the tutorial, this kind of help is priceless for beginner app developers.

Sabariprasad ramachandran.

unread,
Jan 12, 2020, 6:28:15 AM1/12/20
to MIT App Inventor Forum
Thank you ! 
Reply all
Reply to author
Forward
0 new messages