SACC

/ / navigation

Textboxes
Textboxes and Lists

/ / Text Boxes



  1. Go to http://appinventor.googlelabs.com and sign in.


  2. Start the Designer by creating a new project.

    Click New on the left side, near the top of the page.


  3. Enter the project name (one word, with no spaces) in the dialog box that appears, click OK.


  4. The browser will open the Designer, the place where you select components for your app, and should look like this:



  5. Drag these components from the Palette onto the Viewer and assign their names.
    • A Canvas. Name it myCanvas Put myCanvas on top and set its dimensions to 300 pixels wide by 300 pixels high.
    • A ImageSprite. Assign a small image to it (no more than 100 x 100)
    • Two Textboxes. Name one xLoc and the othe yLoc.
    • A Label. Name it spriteLoc. It will show the where the sprite moves to.
    • A Button. Name it moveSprite



  6. Set the Text of spriteLoc to The sprite is at:.


  7. Set the Text of moveSprite to Move.


  8. In the Blocks Editor complete the program so that the sprite moves to the location entered in the two text boxes.

    When a user presses the moveSprite button, the text boxes should clear and the label should update to reflect the change of location of the sprite.

    Add another button named moveRandom. When you press this button the sprite should move to a random location.


Source:
 
$("p:not(p:eq(2))").css("border","2px solid pink").css("padding", ".5em");