Task08 :: providing user control with sound effect :: H J Chae
 
animation (1) :: astrodoggy
:: first click on anywhere on the scene to get started
:: use SPACEBAR or MOUSE CLICK to LAUNCH astrodoggy
:: use ARROW KEYS of UP, DOWN, LEFT, RIGHT to MOVE astrodoggy
 
 
 
animation (2) :: cat vs dog
:: first click on anywhere on the scene to get started 
:: MOUSECLICK on each pet to see my recent attitude to them
 
code ::
animation (1) :: astrodoggy  
go to flash file to view code
code ::
animation (2) :: cat vs dog
var Meow = new Sound(this);

// assign code to button events to trigger sound effects
kitty.onRollOver = function() {
	Meow.attachSound("mm");
	Meow.setVolume(10);
	//Meow.start();
};

kitty.onPress = function() {
	Meow.attachSound("mm");
	Meow.setVolume(50);
	Meow.start();
};

kitty.onRollOut = function() {
	Meow.attachSound("mm");
	Meow.setVolume(0);
	//Meow.start();
};

this.stop();

var Bark = new Sound(this);

// assign code to button events to trigger sound effects
doggy.onRollOver = function() {
	Bark.attachSound("bb");
	Bark.setVolume(30);
	//Bark.start();
};

doggy.onPress = function() {
	Bark.attachSound("bb");
	Bark.setVolume(100);
	Bark.start();
};

doggy.onRollOut = function() {
	Bark.attachSound("bb");
	Bark.setVolume(30);
	//Bark.start();
};

this.stop();