ActionScript 2.0 :: Make Follow In Movieclip?
Feb 22, 2009I have 2 movieclips i want to make the gray movieclip follow the black moveclip that draged by mouse
i attach the project
I have 2 movieclips i want to make the gray movieclip follow the black moveclip that draged by mouse
i attach the project
Is there anyway to make a movieclip follow the mouse. I have a menu, as a movieclip and when i roll over the menu i want something to pop up where the mouse is that says 'click & drag to scroll' my main menu is called: container_mc the movieclip i want to appear i have exported it for actionscript and is called mouseovermenu.This is the AS3 i have so far:
Code:
container_mc.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
container_mc.buttonMode = true;
container_mc.useHandCursor = true;
[code]....
At the moment the pop up appears when i roll over but it dosnt follow the mouse. Also, i am getting more than one instance of the rollover movieclip appearing.
I have this code is AS3
Code:
var xMouse = mouseX;
var yMouse = mouseY;
[Code]...
But unfortunately, the ship does not follow mouse rotation. The ship only rotates with respect to the mouse when you move the ship, not when you move the mouse.
As the topic indicates, i'm trying to create a curved path and make a movieclip follow that path up and down with a bit of rotation.
This could easily be done animating the timeline, however I need this to be done through pure AS - as when I mouseOver the MC, the MC need to stop and go to the top. [url]...
I'm not sure what to call this particular way of making the movieclip follow the mouse.When the mouse moves up, the movieclip plays through the frame. If the mouse moves down, the movieclip plays in reverse? I think that's how it works.
View 2 RepliesI need a movieclip to follow another movieclip at a constant speed.
View 5 Repliescan someone giveme a sample code of making a mc follow a mc's x position
View 3 Repliesmake eyes move and follow a mouse on the _x and _y axis, but the eye needs constrained with in an eye socket.I have used two mc to constrain while mousedown.
// mc_1
onClipEvent (enterFrame) {
bounds = getBounds(this);
[code].....
sorry for this dumb one i am having a blond day, how do i make a movie clilp follow the mouse at all times without ease or anything fancy, i found lots of documentation of fancy things and was unable to strip them down to just a simple follow,
View 13 RepliesHow can I make a MC to follow the mouse?
View 1 Replieshow do i make a movie clilp follow the mouse at all times without ease or anything fancy, i found lots of documentation of fancy things and was unable to strip them down to just a simple follow,
View 13 Repliesim making a platform game at the moment and i need for the screen to follow the character, at the moment i've got the code on the background symbol and all the baddies in that symbol so when you press the arrow key the symbol moves to the side the code i have on this is
onClipEvent (load) {
walkSpeed = 2;
}
onClipEvent (enterFrame) {
if (air == true) {
[Code]....
if anyone knows a way to put this on the camera
I have made a simple Drag and Drop map, where its the map being dragged by the mouse. The thing is, i need to have a grid of buttons on this map, which you can click. But since im dragging the actual map, my buttons wont follow. They stay where they are.An example would be the united states world map, then each state is a button i can click. A problem would be that if the entire map is covered in buttons, then my mouse cant drag the background map as im selecting a button when i drag. perhaps i can make the buttons drag the map instead?This is the code for dragging the map:
Code:
Map.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
Map.buttonMode = true;[code]..........
How can i make the stage follow a object?
View 3 RepliesI have moving movie clip on stage and I want to draw a line so that it fallows my MC
ActionScript Code:
var sp:Sprite = new Sprite();
addChild(sp);
[Code].....
The problem is that on EnterFrame keeps drawing the line from coordinates 500, 200, but I want just one line so it follows constantly my movie clip.
I want to make a mc stick to a cursor from the start and then drop the mc.So far I know how to make a mc follow the cursor and drag and drop a mc.I need an AS3 code for "dropping" a mc at a position (cursor must transform into regular arrow again)The position the cursor needs to snap to is another mc - it should be the nearest, so the distance needs to be measured. So the position is not a grid, but the mc's is can be dropped onto are always on the same positions.
View 0 Repliesi want make a clip follow a path, i want that it follow a path in move and rotation.
View 5 Repliesi am trying to make the tooltip follow my mouse, i did the motion but i do not know if it is the correct way. the problem is when i rollover the movie or button and after the tooltip appears, the tooltip blinks when i move my mouse around the objects correct the code
[Code]...
I need to know the action script to make a movie clip follow my mouse on the x axis only, you see it used a lot in banners.
View 7 RepliesIs there a way that I could make a symbol/button follow my mouse without having to drag it? for example, a car following the cursor.
View 4 Replieshow to make the camera follow my hero (mc), I think the problems involve me using the mouse to move my player instead of the keyboard. This is my code:
var distx:Number;
var disty:Number;
var gravity = 0.6;
[code]....
The result is my Hero following my mouse and when I click it jumps. But the camera is not following it.
im making a platformer with this code...
import flash.events.*;
import flash.utils.*;
import flash.display.MovieClip;
import flash.ui.Multitouch;
[Code]....
And i want to make the screen to follow the character when falling.. for the side horozontally i made the Boundries go the opposite way and keep the character in the center but how can i do that with falling and jumping up off screen?
make my hero go back to his shelter when he finds some food or when he approaches an enemy. It looks like this:
1. The hero is in the shelter.
2. The hero is hungry.
3. The hero leaves the base to hunt some animals down.
4. The hero is full and is headed back to the shelter.
5. He moves in the direction of where the base is.
So, once again, how do I make my hero go back to where he came from? How do I make my hero's x and y position to fit the way back home?
I am working on a first person shooter game, however i dont know how to make all the enemies that get created, to all move towards the character every few seconds then moving randomly for a few seconds, with the frequency increasing as the enemies move closer to the player. Getting that part is easy enough, the problem is i dont know how to make each enemy be able to do anything really independantly. Since my game works in a an external AS file, i cant access any of the class variables from within the movieclip of the enemies. Is there a way i can do this?
i already have code which rotates and moves the enemy towards a given point, as well as random movement, what i dont know how to is access the variables of the main class from the movieclips of the enemies, and vice versa ive found a way to do this, however it means i have to out the movement code within the enemies, as well as collision code, and that just laggs the hell out of the game when there is 5 or more enemies.
How can i make a circle follow a mouse pointer?
View 1 RepliesI am making my second flash game, I am still very much a beginner. This time i am trying to make a platformer in the style of fancy pants adventure. To do this i obviously need to make the camera follow my character. The problem is; i simply don't know how. I have yet to find a CS5 compatible solution with my less than good google skills, and so here I am.
View 6 RepliesI'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.
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.
View 1 Replieshow 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.
View 3 RepliesI have a mouse trailer which trails pixie dust and would like it to follow a movie clip instead of the mouse. Here is the script I have for the mouse trailer... the mc is named mc_fly.
[Code]...