So I'm designing a game for my flash class final, and I want to have my character spin based on mouse movements. So if I move the mouse to the left, character spins counterclockwise, to the right, clockwise. But I also need to have things spin with the character, like the gun he's holding. And if the gun shoots projectiles, how would I keep the direction of the projectiles constant with the character's direction? Also, I'm using wasd for walking, then the mouse for directional control, so how do I make it so W doesn't make the character go down in Y value, but it makes the character travel at a velocity in whatever direction it's facing (so if the character is facing like northeast, pressing W will make him walk northeast. Then pressing A facing the same direction would make him strafe northwest)?
I am currently working on a interactive map that I am building in flash. I need to figure out if there is a way to code something so that we can have our map zoomed in, so it is only showing a section of the map in the veiwport at a time, but when the mouse reaches the edge of the screen I want it to automatically scroll with it, up, down, over, etc.
I have a banner, and on this banner there are three wheels which spin continuously by way of motion tweens.What I want to do is have them stop spinning for a few seconds and then continue spinning, this process will be repeated every time.
So my question is: How would I accomplish this?I know I could just add a bunch of frames to stop the wheels from spinning, but I was wondering if there's a script that will do this without having to add frames.
I am creating mouse scroller and when I insert actionscript my images wont move depending on the mouse movements..I am using Flash cs5 and Actionscript 2.0...this is my actionscript:
Is it possible to copy the mouse movements, but rather than making a movieclip follow it exactly, to make up with the mouse move the movieclip up and left at a certain angle?
i've got a little actionscript that makes a shape follow my mouse about the screen. it works fine when i place it in a layer. however, when the code is in a mc and i place the mc in my layer, then i get no joy.i expect i need a line like tellTarget when using buttons within a mc to target places outside the mc?
In ActionScript 3, I need to detect a sequence of movements made by the mouse when the button is down.I've read this question, and it seems a bit overkill. I only need to detect the 8 basic directions (up/down/left/right/diagonals), so that I can detect a "Z".
i wanted to create scrolling gallery which loop continously without mouse movements i have used oman3d.com dynamic scrolling gallery codei only wanted to scroll the dynamic gallery continously
I have researched all over and have found some that "kind of" work, but the coding always has issues with CS3 (my version). I am more proficient in AS2, but would be willing to try AS3 if that is the way to go.I need a script that will allow the user to use their mouse to drag a wheel that will slow down to a stop. Think "Wheel of Fortune" style. Where it stops will trigger an event.
how to get the X and Y coordinates of a character in a string based on index? I find it odd that I can get the exact letter and index by clicking a character in a text field, but I haven't found anything in code that can get those coordinates without a user click. Seems like they would have to know the x,y of the individual indexs to be able to tell you what letter you're clicking based on your own mouse coordinates.
I'm using an auto complete component and a labelFunction so that user have the ability to search by their name or id. Once the search is completed I'd like to extract the data to a query.
The only problem is that I only need the name or id for the query not both, so I'd like to pull from just the id variable...
Currently if the user types - Joe or if they type - 13
Both would return a result of Joe - 13 via the auto complete component.
I'm using a dash - To separate the results visually. So I'd like to know if theres a way to extract text from a text field up to a certain character in this case a dash.
sample codes. In those codes they are using a verticalChange variable for the time-based character movement.But I can't figure out how this code works and why we needthose calculations - char.dy*timeDiff + timeDiff*gravity?So here is the code:
Code: // assume character pulled down by gravity var verticalChange:Number = char.dy*timeDiff + timeDiff*gravity;
Wanting to be able to move multiple characters around a map (one at a time)First selecting them either by keyboard shortcut of by clicking them.then being able to move them with WASD of by clicking the mouse to a certain position on the map and the character would move in that direction.
How would I go about doing this but not directly like 360. like lets say my mouse is to the left of the character the character would than face its left frame I made for him like lets say his left frame is frame 2.
what does the /: do?? why is it necessary? couldnt u u use a _global.klick instead? (when i tried to change to global i used trace to see if it worked and the global doesnt get any character set when i press mouse..why is that? )
I am trying to create a character whose head will follow the mouse. I have made a character whose eyes are following the mouse, but I would like the head to turn with the mouse as well - like the cyber pets here.
i'm trying to setup a scrolling list of products but without the use of a scrollbar. It would be really thankful if someone would assist me in getting attached fla integrated with mouse based scrolling. So if the user moves his mouse to the upper corner of the product list then it would scroll up and vice-versa.
So I'm working on my portfolio and I got this problem. The code posted scrolls the sprite "cellContainer" based on the position of stage.mouseY. Perfect.Problem is that I want stage.mouseY to equal the entire cellContainer height. Kind of like how a small tablet equals a huge monitor. So when stage.mouseY = 0,cellContainer.y = 0 and when stage.mouseY = stage.stageHeight, cellContainer.y = stage.stageHeight - cellContainer.height. Right now, it scrolls, but it takes a while to scroll throught the entire height of cellContainer. I want it to be proportional to stage.mouseY.
Actionscript Code: private function scrollStart(e:Event)[code]....
I tried my best to search the forum before posting, but if this issue has already been addressed, I apologise in advance. My goal is to create a movieclip that will scroll vertically based on mouse movement, rather than mouse position.I've found many tutorials on the yugop scrolling menu, but my problem with this menu is that the scrolling continues even when the mouse has stopped moving, if the mouse position is on either side of the stage.
I'm doing an online advertising format (728x90 leaderboard). I have embedded a video into the flash file which covers 1/3 of the format (242x90).What i need to do is seek this video from 0% to 100% based on the mouse position over this area (242x90). I'm guessing it would be easier if i created a button over the video which is 242x90 but i would still be looking for the code that seeks the video based on the mouse position over the button.
Searched the forum and couldn't find the mouse movement using the ._x/._y tween class to move based on another mc's dimension to give me the idea how to work on it.
I would like to scale a movie clip based on how close the mouse gets to it, but flash slows when there are a ton of these. I'm looking for a new method
onMouseMove = function(){ var dx:Number = this._x - _parent._xmouse; var dy:Number = this._y - _parent._ymouse;
One of my Clients wants a certain type animation on his buttons and he wont budge. here it is. a set of buttons (home - about - products - contact) with a line running parallel to them on top. when you roll over (lets say products) he wants that section of line to bend up and away from mouse. this 'bend' in the line 'unbends' when mouse is completely rolled off the button section but moves along the line if next button is rolled onto. This Isn't all. he says If possible he would like an object (lets say an apple) to move along the down slope of the line bend. however the more i think about this the less it works. so im only worried about the line bend for now. Im still waiting for him to send me an example he saw on another website i will post it as soon as i get.