Im currently doing a flash project at university and my intention is to make a magic 8 ball style animation, but i'm having trouble with coding the answers so they come out randomly.
I'm creating a magic 8-ball for my website, just a fun little thing to play with you know. I've got an input field called "question" where you can type whatever you want, an ASK button called "ask" and a response field called "answer". Once you enter a question and hit the ASK button I want flash to randomly reply in the "answer" field with YES, NO, MAYBE, DEFINATELY etc. Do I need some kind of answers array to store all the answers and then call them at random into the "answers" field? Am I on the right track?
I've got an input field called "question" where you can type whatever you want, an ASK button called "ask" and a response field called "answer". Once you enter a question and hit the ASK button I want flash to randomly reply in the "answer" field with YES, NO, MAYBE, DEFINATELY etc.
Do I need some kind of answers array to store all the answers and then call them at random into the "answers" field? Am I on the right track?
i wanna ask how do i make a ball bounce off something like a ball bouncing off a bumper in a pinball game? i've tried a lot of times but everytime the ball get stucked to the box and it doesn't move anymore...will be grateful if anyone noes the actionscript of it..
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.
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.
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.
I am in a pinch for time and know very little about Flash and even less about Actionscript, but I need to know how to make a ball fall according to gravity!
Thomas <a href="mailto:ttorrey@slc.edu">ttorrey@slc.edu</a>
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
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.
ball collision inside another ball using gravity.I have one large circle in the middle of the stage (its radius is 150 pixels). I have another circle inside of that one (20 pixels radius), this is the smaller ball that I would like to have bounce around inside of the larger one with gravity. When the small ball hits the edge of the larger circle, I would like it bounce inwards to the center of the larger circle. It keeps doing this until it eventually stops in the center of the larger circle at the bottom.
I have code that I wrote(myown and tutorials) and I am having some issues. The object is to make the ball walk to the box and pick up the item. When the pick up occurs the item(box) needs to disappear.
mcMain is the character(ball) mcCoin is the item(square)
Code: Variables for key downs var leftKeyDown:Boolean = false; //left key down false var upKeyDown:Boolean = false; //up key down false var rightKeyDown:Boolean = false; //right key down false var downKeyDown:Boolean = false; //down key down false var mainSpeed:Number = 7; // speed of character [Code] .....
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.
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
how to make a simple ball follow an oval motion path? Think of a molecule spinning (and looping) around a nucleus. This was five seconds work in previous versions where you could draw the motion guide then simply attach an object to it and say "orient to path" but I can't seem to find how to do it in CS4.
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!
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.
I have a feeling this would be easy or has already been accomplished with someone who's good at AS3... I was customizing "xml magic pages" which I found online, and doing pretty well with my limited knowledge. BUT I need to have "previous" and "next" buttons, so users won't have to click each button (one section has 14 pages).
I learned how to name the dynamic buttons, but I still can't use that info to show that page (or ultimately the next or previous page). Magic pages is free and easily found online, but I could post the code here (or my code).
this is the error Iam getting and my code below, I keep getting an error and can't understand why could someone with a bit more experience 'm at my wits end-TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@2edef11 to flash.events.KeyboardEvent.
var upArrow:Boolean = false; var downArrow:Boolean = false; var rightArrow:Boolean = false;
I need to build a flash learn game to my students. It is to explain the angles and phisics over the billiard/snooker Table. Something similar to this: [URL] The only thing I can do until now is drag the ball! My doubts are:
- How to make the stick move with the center in the point near the ball; - How to draw the yellow line; - How to calculate the corners; - And in the last, how to move the ball with accelerated motion when press a button.
I am making a breakout type game where you bounce a ball around and it hits & breaks blocks.The issue im having is with handling the ball after a collision is detected.Every frame the ball checks four points on its surface to see if they are colliding with any of the blocks. The problem occurs when the ball starts moving fast. The ball's radius is 7 pixels. If it is moving upwards at higher than7 px/ frame, then the ball might end up half way into one of the blocks.
In that case the ball detects a collision on its top AND on its side (which is bad -- If the ball is travelling upwards it should detect the collision at the top of the ball)how I could fix this so that I can make the ball move fast without sacrificing the accurate detection of collisions??