A different hand will follow the mouse depending on which side of the stage it is of, this will enhance the user experience as they have more control. In this we have also hidden the mouse.
//Hide the mouse
Mouse.hide();
function arms(event:MouseEvent):void{
//If the mouse is on the right hand side of the stage then the right arm will follow it. The mouse can not operate the hand outside of the
//dimentions that we difined
if (mouseX>400){
var rect = new Rectangle(400, 0, 800, 450);
hand2.startDrag(true, rect);
}
//Same as above for the left hand side of the stage
if (mouseX<400){
var rect = new Rectangle(0, 0, 400, 450);
hand1.startDrag(true, rect);
}
}
OBJECT FOLLOW THE MOUSE
var maxSpeed:int = 10;
addEventListener(Event.ENTER_FRAME,myFunction);
function myFunction(event:Event) {
var diffX:int = mouseX - fish.x;
//To convert it to a percentage
var percX:Number = diffX/fish.x;
//Finally moving it based on the percentage
fish.x += percX*maxSpeed;
var diffY:int = mouseY - fish.y;
//To convert it to a percentage
var percY:Number = diffY/fish.y;
//Finally moving it based on the percentage
fish.y += percY*maxSpeed;
}
AQUARIUM PRESENTATION
Points that could improve the interactive experience
- Include less well know fish.
- Quiz at the end of the info section so that the user can test the new learnt knowledge.
- Hand scale relevant to child's hand, as they will be the main users.
- Semi-transparent hands so they don't dominate the stage.
- Create a section on the environmental damage to the reef.
FISH TWEEN DEMO
No comments:
Post a Comment