You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Hi,
How to make an image flash 120 beats per minute.
I dont know how to configure that
Thanks a lot
Chris Ward
unread,
Jul 6, 2019, 6:02:55 AM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Hi Martial
Depends on what an Image flash actually is, but hopefully you can modify the code below to suit your requirements. Project File "Image_Flash.aia" attached.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
OOhh that's a great starting point. you're so quick
I have some difficulties to know how to organise the code
If I want 5 buttons with each one a specific BMP, is the best way to copy the block "When Button_1 clic" and change the name of the button and the divide operation ?
Or there is a simpler way to do that ?
I don't want a long code if i can do it shorter
Thank
TimAI2
unread,
Jul 6, 2019, 8:03:02 AM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
You could use a listpicker with a selection of beats per minute listed
User picks one, then use the after picking event to set things in motion
Martial Foucault
unread,
Jul 6, 2019, 8:09:01 AM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
yes the list picker can be an option, but I need something really simple => push a button and the picture blinks
Chris Ward
unread,
Jul 6, 2019, 8:18:45 AM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Hi Martial
I think a List View or List Picker would be easy to use. If you only require a few selections, you can do it with buttons, something like this (untested!):
Right-click on the above image and select "open image in new tab" to view it full scale, with mouse zoom.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
That's work like a charm.
How can I indicate to change the button color when selected, I tried with "when button .click " but it don't change to its original color when I click other button
Angel M
unread,
Jul 6, 2019, 1:09:13 PM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
You need to set the button colour to 0 or -1 (can't remember which) to get back to the standard button colour.
Chris Ward
unread,
Jul 6, 2019, 1:56:38 PM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Hi Martial
We already have an If - ElseIf to know which is the Active Button, so we can just set it's colour there. Just before, set all buttons back to their normal colour:
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Thanks Chris, i don't know how much time I need to find and organize project like you do :))
I have one doubt, for exemple, when I chose the button 120, the image is shown each 2 beats, One beat visible, one beat invisible. So in fact the image beats 60 BPM.
Is it right ?
Hope I'm clear
TimAI2
unread,
Jul 6, 2019, 5:17:45 PM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Correct, selected bpm needs to be multiplied by 2
Chris Ward
unread,
Jul 6, 2019, 6:35:27 PM7/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MIT App Inventor Forum
Hi Martial
You and Tim are right :)
What we have (Image_Flash_04 example) is one minute divided by required beats per minute - since it is hard coded, you can just change the BMP number in the "when any Button .Click" block: