Visible

Hiya,
I am making a shooting game and I need u to help me.
How can I do that when my bullet mc, hit another mc, they both will disapear and a little explotion will apear in that area.

-thanks.

I know this I think.

Ok…

[color=black]if (this.hitTest( _root.missle ) ){

_root.missile.gotoAndPlay(2);
_root.bullet.gotoAndPlay(2);
}[/color]

The missile’s frame 2 will be a blank keyframe.

The bullet’s frame 2 will be the explosion.

I don’t know if this is totally right ,but from memory the principles are the same.

**Can you help me on rotating the cannon? **

I am making a game where you control this tank and a rotating cannon ,but I don’t know how to rotate the cannon as the mouse moves.

Can you help?

Main Character:

onClipEvent (load) {
walkSpeed = 12;
_root.laser._visible=false;
_root.missle._visible=false;
_root.bomb._visible=false;
laserCounter=1;
scrolly=_root.mainGround.ground._width/3;
scrollStart=false;

Redge=550-(_width/2);
Ledge= 0+(_width/2);
//UP AND DOWN MAX EDGE
Uedge=400-(_height/2);
Dedge= 0+(_height/2);

}
onClipEvent (enterFrame) {

if (Key.isDown(Key.CONTROL)) {
laserCounter++;
_root.laser.duplicateMovieClip( “laser”+laserCounter, laserCounter );
_root[“laser”+laserCounter]._visible=true;

} }
onClipEvent (enterFrame) {
if (Key.isDown(Key.SHIFT)) {
laserCounter++;
_root.missle.duplicateMovieClip( “laser”+laserCounter, laserCounter );
_root[“missle”+laserCounter]._visible=true;
}
}

**onClipEvent (enterFrame) {

if (Key.isDown(Key.UP)) {
_y-= walkSpeed;
}

if (Key.isDown(key.RIGHT)) {
_x+= walkSpeed; **
if (this._x<scrollx){
this._y+=moveSpeed;

} else {
scrollStart=true;
}

**}
if (Key.isDown(key.LEFT)) {
_x-= walkSpeed;
}
if (Key.isDown(key.DOWN)) {
_y+= walkSpeed;
}

} **
onClipEvent (enterFrame){
if(_root.Power==0){
_root.gotoAndStop(3);
_root.Power=100
}

}

LASER:

onClipEvent (load) {

laserMoveSpeed=20;
**this._x=_root.spaceship._x+90; **
this._y=_root.spaceship._y;

}

onClipEvent (enterFrame) {
if (this._name<>“laser”){
this._x+=laserMoveSpeed;
if (this._x>600){
this.removeMovieClip();
}

for (i=1; i<=_root.numEnemy; i++){
if (this.hitTest( _root[“enemy”+i])){
_root.score+=1;
_root[“enemy”+i].gotoAndPlay( 2 );
}

}
}
}

ENEMY:

onClipEvent (load) {

function reset(){
this._x=600;
this._y=random(200)+100;
enemySpeed=random(4)+1;
this.gotoAndStop(1);
}

reset();

}

onClipEvent (enterFrame) {

if (_root.spaceship.scrollStart){
this._x-=enemySpeed+_root.mainGround.groundSpeed;
} else {
this._x-=enemySpeed;
}

if (this._x<-10) {
reset();
}

if (this.hitTest( _root.spaceship ) ){
_root.Power-=1
_root.enemy1.gotoAndPlay(2);

}

}

FRAME 1

numEnemy=7;

for (i=2; i<=numEnemy; i++){
enemy1.duplicateMovieClip( “enemy”+i, i+100 );

}
score=0;
Lives=5
Power=100

if (_root.Lives<=0)
_root.gotoAndPlay (3);

if (_root.Power<=0){
_root.Power=100;
}

STARS:

onClipEvent (load) {

stars.duplicateMovieClip(“stars2”, 1000);
stars2._x = stars._x+stars._width;
starsStartx = this._x;
starsSpeed=4;

}

onClipEvent (enterFrame) {

if (_root.spaceship.scrollStart){
this._x-=starsSpeed;
if (this._x<= (starsStartx-stars._width)){
this._x=starsStartx-starsSpeed;
}
}

}

MAIN GROUND:

onClipEvent (load) {

ground.duplicateMovieClip(“ground2”, 100);
ground2._x = ground._x+ground._width;
groundStartx = this._x;
groundSpeed=10;

}

onClipEvent (enterFrame) {

if (_root.spaceship.scrollStart){
this._x-=groundSpeed;
if (this._x<= (groundStartx-ground._width)){
this._x=groundStartx-groundSpeed;
}
}

}
onClipEvent (enterFrame) {
if (this.hitTest( _root.spaceship ) ){
_root.Power–;

}
}

thanks for the quick reply but I have a problam.

when I am putting the blnk frame, the mc is blinking.
what should I do?

-thanks

I messed up the [color=black] _root.missile.gotoAndPlay(2); [/color][color=black]should be[/color]**[color=black] _root.missile.gotoAndStop(2);

[/color]**[color=black]or you could just put a stop action on the blank frame of the missile.

either way would work.

Can you help me on the problem I am having about the rotating cannon?
I mean I understand some trigonometry and I can’t get the cannon to work. If you have any thoughts please help.

[/color] [size=1]Spencer Wigginton[/size]

[size=1]Mrs. Hall[/size]

[size=1]Chemistry-I[/size]

[size=1]17/October/2005[/size]

[size=1] [/size]

[size=1] Science Abstract #1[/size]

[size=1] [/size]

[size=1]Author: Baxter, Roberta[/size]

[size=1]Finding the Chemical Clues[/size]

[size=1]www.chemistry.org/education/chemmatters.html[/size]

[size=1]April 2002[/size]

[size=1] [/size]

[size=1] [/size]

[size=1]In crime scene investigation, there is always a clue. Investigators make sure that there is no evidence lost in a crime scene. On February 26, 1993, after looking at the evidence the FBI and other federal official concluded a bombing under Tower One of the World Trade Center had occured. Forensic chemists checked the surfaces near and in the wreckage to find out the chemical makeup the bomb. The forensic chemists then collected samples, and analyzed them with a infrared microspectrope, which is a type of microscope they use to use visible light to pinpoint a miniscule part of a sample. Another case involved a poisoning of cyanide in Excedrin capsules. Forensic chemists saw some green specks in the Excedrin bottle during a supposed “natural” death. The chemists analyzed the situation, and later found out through examining that the green specks were 99% sodium chloride (NaCl), common table salt, and 1% of four chemicals used for fighting algae growth in aquariums. Some forensic researchers, Vass and graduate student Jennifer Love, were conducting researchers to find chemical methods for arriving at a precise time since death (TSD). This was thought to make crime investigating a lot easier. The thought behind this was that at death the proteins in the body begin to break down into amino acids and volatile fatty acids.[/size]

[size=1]Spencer Wigginton[/size]

[size=1]Mrs. Hall[/size]

[size=1]Chemistry-I[/size]

[size=1]17/October/2005[/size]

[size=1] [/size]

[size=1] Science Abstract #2[/size]

[size=1] [/size]

[size=1]Author: Allin, Shawn[/size]

[size=1]Fire at Your Fingertips-The Flammability of Synthetic Nails[/size]

[size=1]www.chemistry.org/education/chemmatters.html[/size]

[size=1]2001 February[/size]

[size=1] [/size]

[size=1] [/size]

[size=1]Plastics has shared a part in everyones lives if it’s from credit cards, to cd’s, even fake fingernails. Studies show that a property shared by most polymers is flammable. A lab discussion was started in a freshman chemistry class about fake fingernails being a safety hazard by a question about it being ok to wear fake fingernails in the lab. Since most polymers a have tendency to be flammable this might have been first considered a safety and a environmental concern. Ways to reduce the flammability includes making the material very low in energy . More studies and experiments are done about the polymers that are found in fake fingernails. Multiple tests were taken, but with every type of nail they tested 5 nails to be more accurate, and would be more assuring to express if something is flammable or not. They noticed that artificial nails could be ignited by coming in contact with any type of flame. The chemists tested this through the ignition times with a video camera, and counted the frames which it ran on 30 frames per second. A technical difficulty was found in some experiments, but one that stood out was one person saying “I forgot to press record”. Anyways a birthday candle had a greater average ignition time than the bunsen burner. They found out that the fingernails were highly flammable, and were told to the wearers that wearing them are a safety risk.[/size]

[size=1]Spencer Wigginton[/size]

[size=1]Mrs. Hall[/size]

[size=1]Chemistry-I[/size]

[size=1]17/October/2005[/size]

[size=1] [/size]

[size=1] Science Abstract #3[/size]

[size=1] [/size]

[size=1]Author: Powers, Angela[/size]

[size=1]The Weighty Matter of the Kilogram Standard[/size]

[size=1]www.chemistry.org/education/chemmatters.html[/size]

[size=1]1999 October[/size]

[size=1] [/size]

[size=1] [/size]

[size=1]Everyone uses many measurements everyday, but no one realizes or thinks about what they really mean, but metrologists do. A metrologist is a scientist that works to define and refine the units and techniques of measurement. Metrology is very important to the government, and is why each nation has a a national laboratory devoted to metrology. Metrology is important because of trade, and for science so there is a consistent set of units for measurement. Metrologist’s goal are to develop units that are based only on atomic properties or universal constants. For length, time, electric current, temperature, amount of substance, and light intensity are what this goal has achieved. The atom counters, a group working on redefining the kilogram, use Avogadro’s constant as the basis for their approach. They find the volume of a pure sample, and with that number they can calculate the mass of the sample based on unchanging atomic masses. Several problems complicate the process of atom counting. Carbon-12 which is said to be a standard to which the periodic table is built, but sadly this does not form perfect crystals which make complications to determine the number of atoms that are present in a sample. They started to later use silicon, a relative of carbon, which does form nearly perfect crystals.[/size]

[size=1]Spencer Wigginton[/size]

[size=1]Mrs. Hall[/size]

[size=1]Chemistry-I[/size]

[size=1]17/October/2005[/size]

[size=1] [/size]

[size=1] Science Abstract #4[/size]

[size=1] [/size]

[size=1]Author: Associated Press[/size]

[size=1]‘Green Chemistry’ work wins Nobel[/size]

[size=1]http://www.cnn.com/2005/WORLD/europe/10/05/nobel.chemistry.ap/index.html[/size]

[size=1]October 5, 2005[/size]

[size=1] [/size]

[size=1] [/size]

[size=1]A Nobel Prize in Chemistry was given out to a group of scientists Wednesday. They were Yves Chauvin, a french scientist, and two American scientists Robert Grubbs and Richard Schrock. This group of scientists won this award for their development of the metathesis method in organic synthesis, or focusing on how chemical bonds are broken and made between carbon atoms. They think metathesis has great potential for pharmaceuticals, biotechnology and foodstuffs production industries, and could also be used in the development of revolutionary polymers. It reduces potentially hazardous waste through smarter production. It is model of how the most basic science has been used for the environment said a committee. The process is used daily in the chemical industry ecspacially in the development of pharmaceuticals and advanced plastic materials. Chauvin, the french scientist, was the first Frenchman to win a Nobel Prize since 1997. They were awarded $1.3 million award for their great discovery that was presented on Wednesday. [/size]

[size=1] [/size]

[size=1] [/size]

[size=1] [/size]

[size=1]Spencer Wigginton[/size]

[size=1]Mrs. Hall[/size]

[size=1]Chemistry-I[/size]

[size=1]17/October/2005[/size]

[size=1] [/size]

[size=1] Science Abstract #5[/size]

[size=1] [/size]

[size=1]Author: MSNBC[/size]

[size=1]Arctic ozone layer is thinning, scientists report[/size]

[size=1]MSN

[size=1]Jan. 31, 2005[/size]

[size=1] [/size]

[size=1]Researchers were reported preparing a launch of a balloon that was hooked up to an ozonesonde, which is a device that measures ozone layer conditions. The ozone layer above the Artics were known to be thinning due to colder to normal temperatures. This was to determine if they should expect increasing ozone losses for the next couple of decades, and the thinning of the ozone layer is known to affect the Polar regions from Scandinavia and as far down as central Europe. They have noticed that in the Arctic ozone layer the temperatures have been the lowest for several decades, and have been lowering for past months. One indicator they used was the clouds in the sky, and they examined what kind of clouds they were. They noticed that on a November that the clouds in the ozone layer at an altitude of 12 miles which were polar stratospheric clouds. This type of clouds is a indicator of ozone depletion. The first signs of depletion at about 20 kilometers of altitude stated by one of the researchers with this assignment. Through more examining they noticed it has been colder than anything that anyone has seen in the Artic ever, and should bring up a concern to everyone. Clouds do cause much change, and speeds up the ozone destruction in the presence of sunlight.[/size]

[size=1] [/size]

-thanks.

PS: u rotate the canon with this code-
_root.onMouseMove = function() {
updateAfterEvent();
xdiff = _root._xmouse-gun._x;
ydiff = _root._ymouse-gun._y;
angle = Math.atan2(ydiff, xdiff);
angle = angle*180/Math.PI;
gun._rotation = angle;
};

[size=4]Put it on a layer on your main time lain.[/size]

sorry for the double post, but iut is still blinking…

Can you post me the action script of the bullet?

Sorry ,but I am leaving my computer right now and I will have to answer your questions some other time.

This is what u told mt to put-

onClipEvent (enterFrame) {
if (this.hitTest( _root.mc1) ){

_root.mc1.gotoAndStop(21);
_root.bullet.gotoAndStop(2);
}
}

and this is the only thing I put…

I am sorry I don’t know what is wrong. Can you post the swf. file?