Monday, May 15, 2017

Graduation Video, Drag& Drop, Yearbook

DO NOW:
Download and print Drag & Drop Rubric
Read the objectives and reply to this blog with what you plan on getting done. (Finish drag & drop)

OBJECTIVES:
Finish and submit Drag & Drop Game (See video links from yesterday)
Start adding text and images to Yearbook Page (See video links from yesterday) in Google Classroom
May Research 
Submit Projects to STUDENT ART SHOW

**Make sure to document ALL you do in your blog...include images or link to .SWF file
***Jersey Shore Festival this weekend, bring in pictures or video for $50

CODE FOR 4 Items:
//Coding for potato head demo. The names of the objects can easily be changed to a,b,c...etc. :)
sto();
var orig1X:Number=item1.x;
var orig1Y:Number=item1.y;

var orig2X:Number=item2.x;
var orig2Y:Number=item2.y;

var orig3X:Number=item3.x;
var orig3Y:Number=item3.y;

var orig4X:Number=item4.x;
var orig4Y:Number=item4.y;

var myBoing:boing  = new boing ();

item1.addEventListener(MouseEvent.MOUSE_DOWN, dragTheObject);
item1.addEventListener (MouseEvent.MOUSE_UP, itemRelease);
item2.addEventListener(MouseEvent.MOUSE_DOWN, dragTheObject);
item2.addEventListener (MouseEvent.MOUSE_UP, itemRelease);
item3.addEventListener(MouseEvent.MOUSE_DOWN, dragTheObject);
item3.addEventListener (MouseEvent.MOUSE_UP, itemRelease);
item4.addEventListener(MouseEvent.MOUSE_DOWN, dragTheObject);
item4.addEventListener (MouseEvent.MOUSE_UP, itemRelease);


function dragTheObject(event:MouseEvent):void {
var item:MovieClip=MovieClip(event.target);
item.startDrag();
var topPos:uint=this.numChildren-1;
this.setChildIndex(item, topPos);
}

function itemRelease(event:MouseEvent):void {
var thisItem:MovieClip=MovieClip(event.target);
thisItem.stopDrag();
myBoing.play();
};

function reset(event:MouseEvent):void {
     item1.x=orig1X;
     item1.y=orig1Y;
item2.x=orig2X;
     item2.y=orig2Y;
item3.x=orig3X;
     item3.y=orig3Y;
item4.x=orig4X;
     item4.y=orig4Y;
}
           
item1.buttonMode = true;
item2.buttonMode = true;
item3.buttonMode = true;
item4.buttonMode = true;

reset_btn.addEventListener(MouseEvent.CLICK, reset);
reset_btn.buttonMode = true;

3 comments:

  1. How are we supposed to finish our yearbook pages if we haven't taken the photos yet?

    ReplyDelete
    Replies
    1. i guess you weren't listening. there will be no formal pictures unless you request them

      Delete