ActionScript 2.0 :: Make "laserbeam" Bounce Between "mirror" And "mirror2" When "mcShape1" Hits "mcShape2"

Sep 29, 2004

I am still a beginner with actionscript. I got the hittest_example.FLA and used some of the code on a frame in my movie.[URL]..can't get it to work right in my project. I am trying to make "laserbeam" bounce between "mirror" and "mirror2" when "mcShape1" hits "mcShape2"

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Bit101-collision-agony - Make Them Collide, And Make The Ball Bounce Away?

Apr 13, 2003

I followed the bit101 tutorial on gravity and now have a movie clip called "ball" (instance name) with an embedded invisible button (so you can throw it all over the place).I also have a movie clip called "block1" (instance name too! what a coincidence, isn't life lovely). I want to make them collide, and make the ball bounce away.

View 1 Replies

Make A Visitor Hits Counter Using Just AS2?

Jun 4, 2009

Is it possible to make a visitor hits counter using just AS2 ?

Or what is the other way to do this ?

The site is totally in flash only.

View 4 Replies

ActionScript 2.0 :: Make A Ball To Bounce ?

Oct 4, 2005

I'm trying to make a ball to bounce on something realistic.How can I make it work? It's impossible.

View 3 Replies

ActionScript 2.0 :: How To Make Bounce And Squash

Aug 4, 2006

Okay, so I have a movieclip of a letter (done in photshop to look like jelly). I want to animate it to fall from above, bounce on an invisiable plane, squash when it hits, and squash and go back up and decrease it each time until it comes a rest.I have the bounce but I need to squash.

Code
Code:
onClipEvent(load){

[code].....

View 1 Replies

IDE :: Make A MC Bounce Off The Sides Of The Stage

Jan 17, 2010

I am just restarting my flash adventures and am trying to learn AS3. I can a real quick code request. I am trying to make a MC bounce off the sides of the stage. When I use the following code, the MC gets stuck going -2 then +2 at the edge of the stage.

[Code]....

How do I get it disregard the first part of the if/else and then go the other direction? know this is a really beginer question,

View 14 Replies

ActionScript 2.0 :: Make A Movie Clip Bounce

Dec 18, 2009

ive been working on boucing code and ive got this

onClipEvent(load) {
gravity = 2;
speed = 0;
}
onClipEvent(enterFrame) {
speed += gravity;
[Code]...

this will make your movie clip bounce. that i need to know is why does it bounce. i cant quite get my head around it. i start of and accelerate, hit 300 on the stage but then go up decreasing my speed by 0.8 every frame..

View 2 Replies

ActionScript 3.0 :: Make The 'cannonball' Bounce Of The Walls?

Sep 10, 2011

I have this game, got various levels. The point of the game, is you have to shoot all the zombies in the level to proceed. But I need it so the 'cannonball' bounces of the walls so there is more of a chance to hit multiple zombies.
 
Incase you wanted to see my document class here it is below.
 
package {
import flash.display.*;
import flash.events.*;
import flash.text.TextField;

[Code].....

View 8 Replies

Flash :: How To Make The Object Bounce Back

Feb 15, 2012

for (var k:int = 0; k < 1; k++)
{
money = new Money;

[code].....

View 1 Replies

ActionScript 3.0 :: Make MovieClip Bounce Off A Wall?

Jan 4, 2010

Imagine loop that contains a ball_mc that bounces off walls for how ever long the loop. I am asking what the math part would be to make the ball_mc bounce off at the correct angle and such.

View 1 Replies

ActionScript 3.0 :: Make A Ball Bounce Around The Screen?

Feb 13, 2011

So I am trying to get a ball to move around the screen, and when it gets to the walls of the stage I want it to change directions. So far, I have this code:

Code:
import flash.events.Event;
var ballVelx:Number = Math.random() * 15;
var ballVely:Number = Math.random() * 15;
var ballDirx:Number = 1;

[Code].....

This is not in the main timeline, it is in the symbol timeline for Ball. With this, I have the ball moving around and when it reaches the end of the stage it resets with a random velocity/angle. When I uncomment the ballDirx and ballDiry lines and comment out the this.x = 0 line, the ball doesn't change directions, it just stops moving when it reaches the end of the stage.

View 6 Replies

ActionScript 2.0 :: Make Something Stop When It Hits Another Thing?

Jan 7, 2004

I am wanting to make a game, and I need a gravity code that works great. I want gravity, a jumpibg code, and then a code to make something stop when it hits another thing.

View 2 Replies

ActionScript 2.0 :: Make Bouncing Balls Bounce Off Each Other?

Oct 19, 2004

I have a number of random balls bouncing around the stage.What I am having difficulty with is making them bounce off each other when they run into each other.The balls bounce off the walls just fine, but I can't seem to figure out the hitTest thing.

View 3 Replies

ActionScript 2.0 :: [FMX] Make A Ball Bounce Across The Stage

May 1, 2005

I haven't done much actionscript stuff ...and at the moment im trying to make a ball bounce across the stage, but im unsure how to go about doing that.

View 3 Replies

IDE :: Using The HitTest To Make Ball Bounce Off Of The Players

May 5, 2010

I'm having problems with my flash game, i am making slimeball and im using the hitTest to make my ball bounce off of the players, but because my players are semi circular when it hits off the back of my player the ball still goes forward when it should bounce off the player in the direction that it came from, if that makes sense

[Code]....

View 1 Replies

ActionScript 2.0 :: Make A Mc Bounce Then Travel Forward Again?

Apr 24, 2011

I managed to get the bounce working how do I make it continue to move forward after the collision?

View 5 Replies

ActionScript 2.0 :: Make A Ball Bounce Across Stage

May 1, 2005

I haven't done much actionscript stuff ...and at the moment im trying to make a ball bounce across the stage, but im unsure how to go about doing that.

View 3 Replies

ActionScript 3.0 :: Make A MC Look Like It Has A REFLECTION In A "Mirror"?

Apr 5, 2011

how to imitate a reflection of a movie clip in a "mirror." I don't know if I should have the initial movie clip on custom cursor or have it set to drag... but either way I don't know how to make the second clip the "reflection follow along. Obviously it would need to follow at a slightly offset pattern so that you would be able to see both clips (or majority of them) at the same time. Any ideas would be helpful... let me know if you have any questions. It's for a school project that is due at 9am tomorrow so time is of the essence!

I have already looked at the Adobe files about creating move clips with reflections and mine is much simpler than that. I literally just need a movie clip to follow/attach itself (with an offset) to the mouse/custom cursor and be visible within a defined space (mask)...

View 1 Replies

ActionScript 2.0 :: CS3 Collision - Make The Balls Bounce Off Eachother

Oct 11, 2009

I have a MC (a ball) with this AS on it:

[Code]...

This bounces the ball off each 'wall'. how to add more balls (using actionscript - ie not copying and pasting on the stage) and to make the balls bounce off eachother too?

View 1 Replies

ActionScript 3.0 :: Make A Bullet Disappear When It Hits A Target?

Jul 30, 2011

I have created a class named Bullet() and I create a child named bullet_mc every second.This bullet_mc moves to a direction on the stage.I also created a class named Plane() and I create a child named myPlane_mc every two seconds. Also, every myPlane_mc moves to a direction on the stage.

View 5 Replies

ActionScript 3.0 :: HitTestObject : Make A Box That Will Bounce Slowly Between 2 And Repeat?

Dec 2, 2010

im trying to make a box that will bounce slowly between 2 and repeat ( i hope that makes sense 0_o) so far the code i have is

import flash.events.Event;
var speed:int = 3;
var hit:Boolean = false;

[code]....

but one it hits wall 1 it moves 3 pixels to the right and stops =/ i tried changing the if(hit == true) to

if(ball.hitTestObject(wall1)){
ball.x += speed;
}

but it does the same thing.

View 4 Replies

ActionScript 3.0 :: Make It So Once One Instance Hits The Last Frame It Is Removed?

Oct 16, 2011

I have a movie clip that I want to be generated over and over again from the library at a random interval, and when the movie clip hits last frame I want it removed.Here is how I am generating it:

function Spawn():void {
var Poof:Puff = new Puff;
addChildAt (Poof,0)

[code]........

View 9 Replies

ActionScript 2.0 :: Make Ball Move And Bounce Around Stage?

Oct 29, 2003

I cant figure out how to make the ball move and bounce around the stage. and i also need help on the paddle that the ball bounces off of. if u could help me out that would be awesome.

View 11 Replies

ActionScript 2.0 :: Make A Ball Bounce Off A Wall With The Same Angle?

Mar 17, 2002

I am familiar with hit test, but how do you make a ball bounce off a wall with the same angle that it bounced on it with?ex. it hits the wall at 45 degrees, and it bounces off the wall at 45 degrees

View 6 Replies

ActionScript 2.0 :: Make Bouncing Balls Bounce Off Eachother?

Oct 19, 2004

I have a number of random balls bouncing around the stage. What I am having difficulty with is making them bounce off each other when they run into each other. The balls bounce off the walls just fine, but I can't seem to figure out the hitTest thing.

View 3 Replies

ActionScript 2.0 :: Make A Ball Bounce Of A Wall And Stll Carry On?

Apr 26, 2011

i want to make a ball move at a constant speed into a wall and bounce of, initially it should move back but then It should carry on moving towards the wall.

I managed to make it bounce but once it hits the wall it carries on in the opposite direction!

View 4 Replies

ActionScript 3.0 :: How To Make Ball Roll Down Slope / Fall And Bounce

Jul 5, 2009

I followed this tutorial to make a bouncing ball in flash. Its AS2 so it took me some time to make it work in AS3 Now I want to make the ball roll down a slope, fall and bounce when it hits the ground. I have attached my .fla.

View 1 Replies

ActionScript 2.0 :: Make A Custom Cursor - When Hits A Wall It Bounces Off

Dec 5, 2004

im trying to make a custom cursor that when it hits a wall it bounces off and i cant seem to get the right AS. ive got the cursor and i can write AS for a hittest. ive typed in

[Code]...

View 2 Replies

Professional :: Make Background Move Over / When Movie Clip Hits Edge

Mar 25, 2012

the conent will not be able to be seen unless the user hits the arrow keys on there key board. So i need to make a group of objects i can make into a movie clip and than inside that movie clip make an animation that plays the squirrel running. i will pause here to ask two things i dont know how to do i want the squirrel to have an animation when standing still where it flicks its tail (like a real squirrel would). and also how would i flip the squirrel so when the left key is pressed it points left and when the right arrow is pressed it faces left? and my main question when it reaches the edge of the stage the extended background that runs off stage moves over to reavel more content. as well as not have the squirrel run off stage? in short i am using the squirrel to view the full pages content.

View 2 Replies

ActionScript 2.0 :: Pong - Make The Ball Move And Bounce Around The Stage And Paddle

Oct 29, 2003

how to make the ball move and bounce around the stage. and i also need help on the paddle that the ball bounces off of.

View 11 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved