I have a line that is 800 pixels long. The line is a gradual curve, that gets kinda steep at the end. I want this ball to go along the line. How do I make the ball move to the right, and stay on top of the line. All I have now is...
PHP Code:
onClipEvent(enterFrame){
this._x +=35;
}
Now I need to add something to make it follow the line. The instance name of the line is.... "line" without the quotes of course.
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've managed to follow some drawing tutorias which work fine (mouse down draws a line everywhere you move mouse like MS paint).I would like to adapt this now if I can so that when a user clicks down, a straight line will follow their mouse until they click again and this releases the straight line. This should leave one line on the screen, then they are free to move their mouse and repeat the action again.
I'm pretty new to Flash and I've ran into a bit of an issue. I'm trying to convert a AS2.0 code into a AS3.0 code, more specifically I'm following this guide:
I'm making a game and have zombies spawning on a stage using math.random()
What I want to achieve is their health bars follow them above their heads, However they aren't spawning when I use:
ActionScript Code: public function iceZombieSpawn(e:TimerEvent) { iceZombie = new IceZombie(Math.random()*stage.stageWidth, -100); // Create new ice zombie at random x position (width, height, health, hitCount)
[Code].....
They do work when I specify a specific coordinate however won't get the desired result.
In my latest project I'm trying to have a line follow my mouse, I succeeded doing this with the LineTo and MoveTo functions this is what i have come up with [URL]if you will play with it for a while you will notice that sometimes the line is burned on the screen and just stays there,Another thing i want to achieve is that the line will be created out of a movie clip and will have animations and graphics in it insted of just plain color.
i'm generating a horizontally scrolling image gallery and i want audio cues to fade in & out as well as pan with the images.so as the image enters frame left and moves towards center frame, volume increases, pan moves from 100% left to center.as image passes and leaves frame left, volume decreases, pan moves from center to 100% right.i have not worked with sound in flash in this way before & extensive searching hasn't returned any results!
I am trying to make the stage follow the player in AS3 (basically, so the 'view' follows the player and he remains in the center of the screen throughout).Here is what I tried:
Say I am moving an object around on the stage, walking from point A to B across the stage. I want to make the object the center, so the stage is centered on the object, so when I walk from point A to B the stage moves with me.
I've been working on a game for my AS3 class that involves enemies randomly spawning from all direction and following the player in an attempt to collide with him. I can get the enemies to spawn from one direction as well as move in a single direction but I can't get the spawning from all sides or the following the player around to work.
I've been at this for a couple of weeks now and followed several suggestions and tutorials (including one from here) with no success and this thing is due by tonight . Here's the code from my enemy class. All of the code of the game is done through AS files with no coding done within movie clips or on the timeline.
I know how to make something follow the cursor (e.g. a ball that moves where your cursor does). However, I'm having a lot of trouble figuring out how to do what I need to for an animation, namely make eyes follow a cursor.Here's the situation: I need to make a graphic (the eye in the middle of the eyeball) follow the cursor (i.e. look up, look left, look in any number of diagonal directions) depending on where the user moves the cursor. But the eyes, obviously, need to stay put in one static spot and move in a very limited region (the entire white part of the eye, but not beyond it).
Furthermore, the eyes start out staring at the user. How do I additionally make them dart to the edges where they'll be looking around once the cursor is moved?
I have a box that i made dragable by clicking at it. I would like a green line attached to a point in the frame and the other end of the line attached to the movieclip being dragged. Hope i made it clear lol.
How would i go about to achive this effect? If possible without having the line itself being within the dragable movieclip (because the dragable box is in more than one frame and i only want the line in one frame)
In my file, I've replaced the cursor with a custom cursor of a pencil.It roams around the screen and on mouse over, triggers various actions. While it moves, I'd really like it to draw, so the user has more of an active role in the narrative. Is there a way to do this?
I'm an actionscript beginner and trying to write a class to make the 'enemies' follow the 'player' (shown below). I'm trying to write it such that it takes two MovieClips as arguments, and moves the first one toward the second one. When I import the Class try to use it in Main.as by typing " var followPlayer:FollowPlayer = new FollowPlayer(fishMov0, player);", I get the following error:
I have 10 movieclips on stage called mc1 mc2 etc ect and then I have one button which makes one of the mc's alpha = 0;The only thing is I would love the evenlistener add the number created by the array to be put after mc & "array number".So what the button should do is create one of the mc's visible whilst all others are not, and this should happen randomly without an mc showing up twice.
I'm working on a game where you have a car that will drive along a side-scrolling terrain, and it needs to folllow the hills up and down and rotate accordingly. Because the front wheel and back wheel will need to be at different heights as the car moves, I'm wondering what the best way to make it rotate correctly is?
The height detection works, and the car will follow the hills but that's just using one point on the car movie clip to test with - it needs to use the front and back of the car.
I am making a ball move from left to right and back. but when I rollover twice quickly, it also accepts the second rollover command. I would like it to accept that second rollover only when the first one is finished. I mean, I want the first to be finished before it accepts another rollover.I know it is simple to solve this with a tween using frames instead of as, but I was wondering if someone knows how to adapt the script.
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..
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'm extremely new to flash programming, and suddenly my teacher give me assignment to make a flash about mirror reflection line. Here is my as code to draw a simple line after following some tutorial online.
I found this tutorial [URL] and is wondering if I could limit the area where the clip can follow? I'm planning to have my cartoon's EYEBALLS follow the mouse move.
I'm trying to figure out how I would make a line grow or fade in basically, such as in a line graph how it shows increasing growth as the viewer watches the line move up and down and more up etc.
I have a MovieClip with the instance name ball and another one called line. I want to test if "ball" touches "line". I got a class called HitLine and the class Ball extends HitLine. So the code for the class Ball is just:
[Code]...
I tried this in the class HitLine but it doesnt work: Actionscript Code: // checks if ball hits lineif(this.hitTestObject(line)){doSomething();} my guess is that the "line" is wrong.. but how do I have to change this? My objects (line and ball) are already on the stage and there i gave them an instance name. so I dont create them in the class... so my problem is: how do i use line as an object in the class...because i get an error that says: 1120: Access of undefined property line