Press The "X" Key And Have It Move To Frame 2?
Jun 26, 2010I want to press the "X" key and have it move to frame 2.
View 1 RepliesI want to press the "X" key and have it move to frame 2.
View 1 RepliesHow do you press a key (like "L") and go to the next frame?
Which event must I pick?
I assume it's something like: stage.addEventListener(Keyboard., but after that I don't know what to do.
This is for AS 3.0 by the way.
I want to make a button that makes you got to a random frame within a certain range (eg frame 41-50) when you press it. I have tried various codes but so far no luck. Im using AS 2
and the button is within a couple of movie clips, but you can still click it when you test
i want a my_mc to move when i press the < LEFT> arrow but also to fire and onEnterFrame event so it will move.. and also to delete the onEnterFrame when the key is not pressed so the onENterFrame is not going on in the background
View 4 RepliesI got a character to move. I want the player to be able to move the character to a button then press spacebar on it. Which will take them to another frame.
This is the code I got for the button but the trouble is u can press spacebar anywhere to go to the next frame.
on (keyPress "<Space>") {
_root.gotoAndPlay(23);
}
Before I start I would like to point out Im new at actionscipt. I want to move an object from a to b on a mouse press using actionscript to ease out. The only threads I can find involve huge scripts I know it should only be a couple of lines!
View 1 Replieswell i'm trying to get this object to move on the press of a key (keeps moving if you hold it down) and stop when you release it, but all i'm gettin, is when you press it, it moves on forever and never stops....
View 12 RepliesHow would i make it so that i can make something move at an x/y coordinate and have it move there with ease?
View 1 RepliesThis is what i have to do:
-Place 10 buttons on the screen
-Make 10 objects randomly move as i press each of the buttons.
eg: press button 1, object 1 moves to a random position press button 2, object 2 moves to a random position...
, i want to make a carousel -type gallery like the one from the tutorial but with a slight variation: i want it to move only when i press a button.(move left when i press the left arrow and to the right when i press the right).And i want it to move by one image at a time and i want to know which image is to the front(i've created a dynamic text field called imgName).I hope i'm explaining this correctly and i'm attaching an example with two arrows with no actions on them.
View 11 RepliesI'm trying to make a series of images move on button press. The first will appear on the stage when the pages loads. There will be a next button which will make the current image move off to the left of the stage and the next move in to the stage from the right and stop in the center. There are about 10 images.
I also have to do the same to another page but with text and moving in vertically instead of horizontally. I have posted this at the bottom (as the images one is too big to post). Although this version is the one I did with tweens that did'nt work, you can have a play with it if you like?
i am doing this: press buttons on screen to move character left or right, "swipe" elsewhere on screen to do other stuff.
This is how i have handled it:
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
stage.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
buttonContainer.addEventListener(TouchEvent.TOUCH_ OVER, tOver);
buttonContainer.addEventListener(TouchEvent.TOUCH_ OUT, tOut);
this works fine, just wondering if anyone has another way to handle it. it seems excessive to have 4 handlers for touch input, but i cant figure out any other way.
TOUCH_OVER and TOUCH_OUT check a switch statement to enable/disable buttons within buttonContainer.
TOUCH_BEGIN and TOUCH_END are used to store points and get a "swipe angle" (only if TOUCH_END is not over a button)
my only problem is i started having glitch's i think becuase so many listeners including: ORIENTATION_CHANGE, KeyboardEvents, Event.DEACTIVATE
this is why i ask if perhaps im missing someway to simplify the touch input listeners
How do I move an image across the screen when I press a button and change its property.[code]...
View 3 Repliesi have a MC with 2 MCs inside. [MC1 & MC2 for arguments sake] When MC1 is clicked i want MC 2 to go to the next frame. //code on mc1 onClipEvent(enterFrame){ on(press) { _root.MC2.nextFrame(); }} just 1 of the trial and errors ive tryed how do i do this ive tryed many different combinations and on different movie clips but nothings happening for me :S
View 7 RepliesI'm still struggling with going from a loaded swf to the next frame in my timeline, where a new swf file will be loaded.Ths is my current code which is trying to move onto the next frame in my timeline is located at the end Frame of a 10 second animation:
[Code]...
How can i do that when you press on a button you will go to another frame of the layer?I am using Macrome6dia Flash Professional 8!
View 1 RepliesI have some buttons on the frame. I also have an event listener that is waiting for the user to press the Tab key to advance to the next frame. Is there any way, using ActionScript 3, to have the Flash player not recognize the buttons, because when I'm testing it, using the Tab key, it goes through the progression moving from one button to another, and then finally it advances to the next frame where I want it to go directly to the next frame and bypass the buttons. The simplest way is not to have the buttons, but I need them.
View 3 RepliesI'm detecting key presses with the follow code:
main.as
ActionScript Code:
package
{
import flash.display.MovieClip;
[Code]....
Im trying to add a slow motion feel to a game (like bullet time), when the player presses a key, however, I cannot find any answer whatsoever.
View 3 Replieshow can I make it so when I press the button it jumps to a certain frame?
View 3 RepliesI have a question, I am in the process of creating a flash presentation that I have to intergrate a keyPress left and right, but also have a nav system that if you click on the title it will take you to that frame and play it. Here is how I have this layed out... I have set up the main nav as Nav_mc. It contains 20 different titles that have to when pressed gotoAndPlay an animation in the presentation e.i.(areil view, view from 400 etc...)
So, my question is two fold... adding the function to the mc is not a big deal no problem, but I usually use labels when I do this and if I am using a keyPress function Left and Right to go to the the next animation and play it, I am having a little trouble grasping how to set up the key press so that if you pressed it left it would go to the next fram label and play that and vis-versa. so if I do this...
[Code]...
Im trying to add a slow motion feel to a game (like bullet time), when the player presses a key, however, I cannot find any answer whatsoever.
View 3 Repliesi want to capture a <tab> press on a frame action, not a mouse. how do i...
[Code]...
i am creating a simple quiz. I want to go the next frame if the player press a button 3 times. I use the code:
on (release) {
_root.total = _root.total + 1;
if (_root.total == 3){
nextFrame;
}
}
I have a movie that plays as an introduction. If a user wants to skip the movie and go to frame 225 but continue playing the movie then I thought I would use this code:
[Code]...
what actually happens is the movie skips to frame 225 but then stops. Now if I leave the movie to play from the start it will get to 225 and continue playing... strange??? Yes... Here is the file:
[Code]...
i want to capture a <tab> press on a frame action, not a mouse. how do i...
key.TAB = function(){
that's what i have to start..
Here's my AS, just get this error
ActionScript Code:
**Error** Symbol=movieclip, layer=Layer 1, frame=1:Line 3: Statement must appear within on handler
movieclip.gotoAndStop ("framelabel",random(4)+2); **Error** Symbol=movieclip2, layer=Layer 2, frame=1:Line 3: Statement must appear within on handler
movieclip2.gotoAndStop ("framelabel"random(10)+2);
. The AS is on said button within the MC, and the MC has an instance name.This is the AS I'm using. I'm trying to make a randomize button that generates a random frame in my flash file instead of one MC..
ActionScript Code:
on (release) {
movieclip.gotoAndStop ("framelabel"random(4)+2);
movieclip2.gotoAndStop ("framelabel"random(10)+2);
}
i'm looking for a code for a keycombmanager in AS3, if anyone have played the advergame from cokezero, you have to press a certain keycombination the movieclip kind of jumps to and play another frame, that's the kind of kombination i'm looking for. [URL]
View 1 Repliesi've imported a flv video file to Flash for the intro and i create skip button to go next frame..but when i press skip..it stop at next frame but the sound of intro still playing.
View 3 RepliesI am trying to make a light comparison chart where the lights can be turned on inividually by the user and one can be compared to another depending on which of the 6 lights you want to view.So far i have managed to make this work with 5 lights over 33 layers and diffferent buttons and different handlers for each of the buttons on each layer but as soon as the 4 and 5 light come into play everything slows down struggles and sometimes gives up.Is there a simple way of doing this which i am unaware of.I am currently using the gotoandstop comand to go to a specific frame based on the button press.
View 8 Replies