2017년 6월 10일 토요일

Sprites moving


In scratch I know sprites can move forward without coordinates in a      move(X)steps      block. Is it possible to replicate this in appinventor?

--
App Inventor is a little bit different, see also the documentation http://ai2.appinventor.mit.edu/reference/components/animation.html#ImageSprite

you could use the MoveTo method...

MoveTo(number x, number y)
Moves the sprite so that its left top corner is at the specfied x and y coordinates.

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn 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.

--
A sprite has a speed you can set, together with a heading, which indicates its direction and an interval which is the frequency of update of the position.
See here: http://ai2.appinventor.mit.edu/reference/components/animation.html#ImageSprite
And try it out!

-- 

댓글 없음:

댓글 쓰기