ActionScript 2.0 :: Using The Mouse For Movement In Isometric?
Nov 7, 2007
I've been reading a bunch of the tutorials about using isometric in flash but they all seem to have one thing in common. They all use the arrow keys for movement. I've been trying to use the mouse for movement but have only met with frustration so far. I can get the movement to work but then the object collision on the tiles doesn't work or vise versa.
I am currently working on a very simple isometric3d game with a hero to move to mouse click position, using path-finding. I am trying to code everything myself step by step,as a beginner , i am well aware of asolib3d but I don't want to use it...I have read tutorials and few books I completely done with my isometric3d map. i create my path finding A-star class which is working perfectly with 2d grid tiles, but when i try to use it with isometric3d grid world it doesn't work properly.
my character movement is not correct. If hero position=0,0 and I click 0,10 on my iso grid instead of moving down he will move on the right side. If I am in the middle and I click on the left he will move right. and like few steps for where it supposes to stop... my pathfinding is ok in 2d but isometric the movement is weird...
I am currently creating a game similar to cafe world, farmville etc (social game). Would like to know how could I make an object move in an isometric direction when my mouse move. For example, when I want to build a house, I click on the house build button, and when my mouse move, I want my house object (stored in the library) to be move together with my mouse in an isometric direction. To give you all a better impression of the solution i am looking for, click on this link for a sketch: [URL]. So I want something like only when my mouse move 20 units more than the original mouse position, then my house item should move to the next grid.
I have a mc (fStrip) which looks like a piece of filmstrip with thumbnail images in it. I want this mc to move when the users mouse is positioned over it, but I only want it to move only along it's x-axis and in a direction opposite that of the mouse. And I want it to move or flow smoothly.
I've been trying to figure this out (see my lame attempt below) but without much luck.
onClipEvent (mouseMove) { buffer=20 //movement buffer mousePos=_root.fStrip._xmouse //store mouse position if (mymouse!=_root.fStrip._xmouse){ //if the mouse has moved
I'm trying to dynamically draw out an isometric grid but I'm hitting a few problems, currently I'm using a matrix transformation to get the grid to look more isometric that tile based but it has it's problems so I want to add the grid with out using the matrix transformations. currently I have..
[Code]....
I tried to draw it out using Sin ,Cos and Tan functions to try to set the coordinates but it didn't behave like I had expected,
Im looking for a quick solution (if its out there) using the autohide feature using the FLV Playback Component.
Current situation: Using ActionScript 2. The FLV component fills the stage. Autohide is set to true.
It looks to me that since the video fills the stage, the skin will not hide. What I would like to do is have the skin fade out if the mouse doesnt move for a certain period of time.
I'm trying to make a dummy from a circular menu that reacts (rotate) to mouse movement, I uploaded a fla example, different colors, size, etc, but essentially the same in
function; but for now I'm freezed how to do somethings, I'm not a programer or actionscripter, but I want to learn.Currently using CS3 and AS2, downloading the FLA example may help.
Ok, in the "fla", you will see a circle who rotates versus mouse movement (I would like to make a delay rotation for a smooth feelling when mouse is moving, those like "_x += (_xmouse/5)" but with rotation. Other thing I would like to do,is... that the movement stops progressively a few degrees before the mouse reach de cian angles(a1,a2), and then, the circles doesn't move if the mouse is moving under those angles, like a... an inactive area(U1), and if it could work with instances.
I've seen couple of websites [URL]...in these websites the text & the objects move with the mouse moves. I just wanna know how to move the objects with mouse movement or you can say how to make an object follow the mouse (left-right-up-down)
P.S. In the 2nd website there's a 3d character also which I don't have in my project so there's nothing to worry about 3d in flash. I've just couple of images & text
i need to record the movement of the mouse. The actual position and recording works, but i need the recorded 'mouse' to trigger all of the MouseEvents for the buttons and other interface elements.Does anyone know a way to store these events? This is the code for recording the mousemovement
Code: private function recordTut(modes:Number,frame:Number,gumD:Boolean,paintD:Boolean) { if(prevModes != modes)[code].........
I'd like to control a mc movement on_x direction (or _y) when the mouse mouves horizontaly (or verticaly). So when I mouve the mouse to the right the mc mouves to the lefht and it mouves to the right when the mouse moves to the lefht. It's for a window effect.
I am looking for a script to detect if the mouse has not moved for say 15 seconds or 30 seconds, and if this is the case then, its plays some movie-clip or follows with the next scene.
I have a white square(mc) on my stage. In the top left corner of that square is a little arrow. I want that arrow to move along the _y axis when the mouse is moving on the square. So I want the square to move along with the mouse. I like the movement to be easing.
How do you create an action to happen when the mouse is static for 1min. I need an animation to loop in an application kinda like "Pop Up Video" and when the mouse moves or the touch screen is "Touched" it will move to the second frame
i'm trying to build a "circular" menu that rotate on rollover and mouse move but with no good results. Just something like the yugo sliding menu but with buttons placed around a circonference.I don't need a dinamic menuI need a function that let the menu rotate up when cursor is below the half of the circle and viceversa.I've done a search and found a compass example but i really can't edit it. I'm a newbee and can't really figure out how to rotate a movie clip around its own axes on mouse move..
I am making an interactive map and am trying to contain my mouse movement to only stay within a certain box instead of the whole page / flash movie template.I have made a Movie Clip and given it an Instance Name of "menu"This is the code I have used to make the mouse move all around at free will.
i was looking at the circular movement tutorial on this site and am now trying to make it so the object points towards the mouse but only moves around that circular axis. any ideas on how i can do this in as3?
I have a problem with a button i want to create. I want different buttons (simple circles) that become bigger and 100% visible when the mouse becomes closer (at a certain distance), visa versa. till 0% visibility
Searched on forumI found this couldn't find anything helpful. I found the code here below, but i don't fully understand it to change the code. I tried changing it in many (probably very bad) way's, as result that it only got worser... :(
Frame 1:
Code: //this objects x position posx = this._x; //reaction boundaries
Im using this piece of code in the Main stage, on the first frame, while my Mc is called bg_mc.
[code]...
BUT, it only works if the code is applied to the first frame on the main stage.How do i make an Mc, inside another MC (ex: Stage ->Mc1->Mc2), scroll when i move the mouse?
I am doing a website where the background is moved with the mouse horizontally. I want it with a edge size ti avoid too much movement when the mouse is in the middle of the stage.
var mousePositionX:Number = 0; var speedX:Number = 0; var edge:Number = 100;[code]...
Can anyone tell me how could I be able to move a movieClip in opposite direction of the _xmouse?That means when I move the mouse pointer to right side, my movieClip would move some distance to the left side. And when I move the mouse to the left ,the movieClip should also move to right.I have done something in the attached file but i dont want to continue the movieClip's movement when the mouse movement stops.
so in as3 there is a nifty event listener for if the mouse has left the stage area, there is however, nothing of the sort in as2. so, Im trying to figure out how to go about this, Im thinking an onEnterFrame function that listens for eitherA.) no Movementor B.) the same x and y position for an extended period of time.Im thinking the no movement would do the trick but what should I be checking for on the onEnterFrame, and how would I tie setInterval into it? what properties would I check for if I used an IF/THEN statement?
how to detect the distance of the mouse movement in a certain time. I d like to be able to calculate the distance the mouse was moved from one point to another in certain time (one second) and compare these values.
I am making an animation that shows roughly how an airplane's localizer works. (It is a guage in the cockpit that tells you the angle of the plane) This explanation might be a bit hard to follow, bear with me. Anyway, when the user moves the mouse side to side, the verticle line on the guage moves side to side. And when the users moves the mouse up and down the horizontal line moves up and down. I have set up limits to how far these lines can move in the guage. The problem I am having is that when you move the mouse in one direction, the coresponding line hits its limit and stops, but if you keep moving the mouse in that direction, stop, and then move the mouse in the opposite direction, the line begins tracking immediately from that point, so now your mouse location is off center from where it should be.
So, is there a way to also limit the active area on the screen so that mouse movement only registers in that area?
Code:
var lastPointX:Number; var lastPointY:Number; var diffY:Number;
I've posted once before in relation to this topic hoping to find an alternative to the coveted MouseX and MouseY. I was attempting to build my first flash site when I ran into this problem with a SWF becoming the child of its new timeline and thus losing its original stage mouse movements. SO hopefully you guys can elaborate, is there an alternative to using the stage as a listener for mouse movement, is finding an alternative be futile, or should one just resort to using JQuery in conjunction if its possible?