Click on Stage and using the keyboard arrows bring the disc to the base, and both will disappear !
CLICK HERE TO SEE A LIVE DEMONSTRATION OF THIS TUTORIAL COMPLETED
On this Actionscript 3.0 Flash HD High Definition Tutorial we create a base for our Flying Saucer and testing collision with an IF statement a visible property change is fired. X Files Theme is the background music.
DOWNLOAD THIS TUTORIAL TO YOUR HARD DRIVE
CLICK HERE FOR A COMPLETE ACTIONSCRIPT 3.0 CARTOON SMART TUTORIAL
Here is the source code
// Collision Between Two Objects on Stage Example
// by Avraham Saltoun
// solutions at say-web dot com
// FREE TO USE COPY AND DISTRIBUTE
stage.addEventListener(KeyboardEvent.KEY_DOWN,MoveSaucer);
//This will set the compiler
//waiting for a key stroke, and then
// execute the MoveSaucer function
function MoveSaucer (event:KeyboardEvent):void
// the void states that the function returns no value
// but receives the value of the key stroke
{
switch (event.keyCode){
case Keyboard.RIGHT:
FlyingSaucer_mc.x = FlyingSaucer_mc.x+5;
break;
// x is the coordinate for the horizontal position
// break will exit the switch and wait for
// next key stroke.
case Keyboard.LEFT:
FlyingSaucer_mc.x -=5;
// “FlyingSaucer_mc.x = FlyingSaucer_mc.x-5″
// is the same as
// “FlyingSaucer_mc.x -=5;”
break;
case Keyboard.UP:
FlyingSaucer_mc.y -=5;
break;
case Keyboard.DOWN:
FlyingSaucer_mc.y +=5;
break;
}
// This will check the collision
// between the Flying Saucer and
// the base.
if (FlyingSaucer_mc.hitTestObject(Base_mc))
{trace (“BOOOM !!!”);}
// Note both objects can be in separate layers
// instance names have to be identical to the objects
// This will happen every keystroke (Key Down) event
// Thanks for watching.
}




January 30th, 2012 at 11:17 pm
buy cheap ambien – buy ambien no prescription
January 31st, 2012 at 4:50 am
comment2, buy Avodart, 08810,
January 31st, 2012 at 5:59 am
buy cheap valtrex online – buy valtrex without prescription
January 31st, 2012 at 6:37 am
comment2, Lipitor buy, 4290,
January 31st, 2012 at 8:02 am
buy cheap tramadol online no prescription – buy tramadol online without prescription
January 31st, 2012 at 8:14 am
how long it takes to become a pharmacy technicians http://sundrugstore.net/products/serevent.htm pakistan online pharmacy
January 31st, 2012 at 8:37 am
comment3, buy Nasacort AQ, 20281,
January 31st, 2012 at 11:35 am
purchase valium 10mg – valium no prescriptions
January 31st, 2012 at 3:12 pm
order xanax online – buy xanax online
January 31st, 2012 at 4:04 pm
comment3, buy Levitra, vgtqtf,
January 31st, 2012 at 6:00 pm
comment1, Actoplus Met, =(,
January 31st, 2012 at 6:54 pm
ativan – buy ativan online no prescription
January 31st, 2012 at 7:33 pm
It’s hard to find well-informed people on this topic, but you seem like you know what you�re writing about! Thanks alot : )
January 31st, 2012 at 7:48 pm
purchase xanax – xanax buy online
January 31st, 2012 at 7:56 pm
comment6, Avodart, %DD,
January 31st, 2012 at 11:27 pm
cheap meridia online – purchase meridia online no prescription
February 2nd, 2012 at 5:39 am
xanax buy – buy xanax 2mg
February 3rd, 2012 at 3:54 pm
comment5, Doxycycline buy, kwcw, Accutane, tuzjpr, Retin-A buy, 58655, Flomax, >:-], Kamagra, 947, Diflucan buy, jzxkz,
February 4th, 2012 at 2:47 am
comment2, Doxycycline, jpnygd, Zithromax buy, rtqw, buy Propecia, =-))), buy Nolvadex, hxloqn, buy Retin-A, 573,
February 4th, 2012 at 4:45 am
Author, Shoot yourself a knee..!
February 4th, 2012 at 9:14 am
As I have expected, the writer blurted out..!
February 5th, 2012 at 3:13 am
comment2, Strattera, 8-DDD, buy Amoxicillin, 5724,
February 5th, 2012 at 3:22 pm
comment2, Imitrex, 813980,
February 5th, 2012 at 6:19 pm
comment3, Lexapro, llb,
February 5th, 2012 at 8:15 pm
comment4, Zithromax,
(,
February 6th, 2012 at 6:46 am
comment2, Propecia, 8DD,
February 6th, 2012 at 8:58 am
comment1, Imitrex, nfx,
February 6th, 2012 at 6:21 pm
comment4, Strattera buy, >:DDD,
February 6th, 2012 at 10:17 pm
comment4, Accutane buy, 22310,
February 7th, 2012 at 4:31 pm
comment5, Xenical buy, who,