mit ai2 1.1.2 demo start new program name “my first program”

of 20/20

Post on 03-Jan-2016




4 download

Embed Size (px)



MIT AI21.1.2 DEMOStart New ProgramName My First Program

Drag these 3 Components into your blank area.ComponentDesigner Drawer PurposeButtonUser InterfaceRespond to being clickedCanvasDrawing and AnimationProvide a touch-sensitive surface where you can draw and animateCameraMediaAccess the device's cameraRename Each ComponentsUse Component_Purpose namesTake a Picture!

Designer View

Block View

Block Locations Drag one of each to the blank area.BlockBlocks DrawerPurposeCamera drawerLets the user take a pictureCamera drawerEvent handler!This script will execute after the user takes a picture.Button drawerEvent handler!The script inside this block will be executed when the user releases a button.Canvas drawerSets the background image of the canvas.mouse over on the camera's "After picture" `blockRefers to the picture just taken. Only available locally, within the "After picture" event handler.

Arrange the times to look like this

Snip Designer and Block ScreensPaste them into a word document.Document header NameDateClass PeriodSave document 112SBurgess1.. Use your nameSubmit doc to LMS 1.1.2 First CodeFinish upYou program automatically saves.

Open My First ProgramWhen you first open a program it is automatically in Designer view.Designer ViewPull 1 of each of these componentsComponentDesigner DrawerPurposeLabelUser InterfaceDisplay textSliderUser InterfaceChange a value as the user slides a control back and forthHorizontal ArrangementLayoutCenter a component or place components side by sidePlace the Label and Slider in the Arrangement Box

Block View

The Drawers are color coded. Look at the Block color to see what drawer it comes from.Add buttons to change the color of the pen. Here we've add three buttons, placed them inside a Horizontal Arrangement, and set the Shape and Background Color property of each button. In the Components list of the Designer view, we've also renamed each button to a name like "ButtonBlue." That helps the programmer keep track of the components.

Designer View

Block ViewYou need a block set for each color.Look at the block color to find the drawer it is located in.

Designer ViewClear the canvas when you shake the tablet.Add an accelerometer sensor component.ComponentDesigner DrawerPurposeAccelerometer SensorSensorsDetect when the tablet is shaken. Also detects when the tablet is tilted forward or left/right.Block ViewRemember to look at the color of the blocks to find their location in the drawers.