Pause Menu Activated When "p" Is Pressed?
Jun 22, 2010
ok, so i know there's a Key.isDown() function, but i need a key is pressed function,i simply don't know the function name, i've tried Key.is Hit (not cussing here, but without the space) and Key.isPressed.i've done some research and the closest i've seen is key.isToggled, but that only works with caps and num lock. the reason i need this is for a simple pause menu activated when "p" is pressed.
View 1 Replies
Similar Posts:
Nov 1, 2010
I have a button on my page and when I click it, I'd like a sendAndLoad event to happen. The button's instance name is button. I'm not sure how to get the sendAndLoad to be activated when the button (in this case a submit button) is pressed. I know that sendAndLoad is with the LoadVars class so I'm not sure it can even be called within a button actions. Here is the sendAndLoad I'm trying to use:
[Code]...
View 7 Replies
Mar 12, 2009
I'm using the code below for an infinite looping menu but this menu code makes it move on its own. I want the looping/movement to be activated by the user literally dragging up and down. Does anyone know how I can alter this code so it responds to the user dragging up and down.
[Code]...
View 2 Replies
Sep 10, 2004
i built this navigation bar where there is an arrow and menus - when u roll over a menu the arrow slides to it....now what i'm trying to do is that when u press a menu and then u roll over another menu and when u roll out that menu it slides back to the pressed menu - like a magnet affect..
View 9 Replies
Oct 21, 2009
Im trying to make some sort of hearing check to see if your ears are still functioning the way they should be. In my program the user is shown 9 images (for example an image of a cat) The images correspond to the 1 - 9 keys. (Im not sure if this is relevant but i'm programming for a Flash Lite application to be run on a mobile device)So let's say the image of the cat is number 1. The sound of the cat is being played and the user has to press the 1 key on his keyboard. However for this to be possible the script must pause and give the user the oppertunity to press the correct key.How can i make sure the script does not continue until a key is pressed after playing a sound.Below is my code so far:
Code:
stop();
var pressedKey = new Number();
[code].....
View 1 Replies
Sep 28, 2009
i want to check a boolean value whenever pressed pause button in flv player.Any Event for play/pause button pressed like
_mc.addEventListener(MouseEvent.CLICK,pressed) ?
View 3 Replies
Jun 12, 2010
I am making a simple radio interface and i have 6 preset buttons which i want to have play the specific preset button's song which is in the library and stop/pause the current song when any preset button is pressed.
i tried using the attachSound function, with associated identifiers but not sure if that is the right way to go. It plays the songs, but doesnt stop them.[code]...
View 12 Replies
Jun 16, 2004
im using the following code for my main four buttons.[code]it also gets removed due to a slide down menu refresh everytime a button is pressed.
View 4 Replies
Feb 21, 2009
I have no idea how to make it so that if you press p once, it pops up, and if you press it again, it dissapears.I want it to start off screen and when you press the button it goes to coordinates inside the screen.here's what I have:
ActionScript Code:
if (Key.getCode() == 80) {
if (_root.pause1 == 1){
[code]....
View 1 Replies
Jan 9, 2009
[code]Is there a way to check for when a key is released? Because here is the problem. It's a pause button, but what happens if you hold it down for too long? First it will check to see if the 'p' button is pressed and that the game is not currently paused. "It's not, ok, pause the game." But since it's checking this same if statement 24 times a second, say you accidentally hold it down too long and it goes through the same if statement again: "Ok, the 'p' button is pressed, but the pauseGame is false. Ok skip that and move down to the else. The 'p' button is pressed and the pausegame is true. Cool, set the game to unpaused." In less than a second it managed to pause and unpause the game because the conditions were correct both times.Is there a way to avoid this error? With a button they have the onRelease to solve this problem. How do I fix it for a keypress?
View 1 Replies
Jan 30, 2012
I'm creating a game with movie clips that are generated using getnexthighestdepth, and have a pause menu too. However, as the movie clips are generated after the pause menu, they appear above it, partially obscuring it. Is there a way to make the pause menu permanently on top?
View 2 Replies
Mar 8, 2004
i need to find a way to pause and start again from that same position the 'infinite menu' found here on kirupa URL...A friend of mine attempted to help me, and gave me some code to fiddle with. I did fiddle with it, but problem was, the code was for Flash MX 2004. So it didnt work on my MX. Here is the existing code i have, but doesn't function (i.e. works fine when control>Test Movie, but doesnt work when actual .swf from folder is opened)[code]
View 10 Replies
Oct 16, 2007
I'm trying to put together a sideshow using a modification of load_images.fla (a sample file supplied with Flash) combined the the 'Kirupa Menu with Slider' tutorial ([URL]) The slideshow uses a 'next' & 'previous' button to click thought the images. In addition to this I have a separate slide menu navigation (currently just numbers 1-7), with a rectangle highlighting the number of the image being viewed. I would like to move the rectangle to show which image is being viewed, when the 'next' or 'previous' button is pressed. The follow code shows the actionscript for the 'next' & 'previous' buttons....
[Code]....
View 2 Replies
Aug 8, 2011
So i am working on a pause menu for my game. I have an inventory box that has slots for weapons, powerups, and other items. I wanted different boxes that are specific to each type of pick-up (weapons, powerups, other). So I drew a box with 3 frames, it is set up similar to tabs in a web browser; click on weapons tab and you see your weapons in your inventory, click on powerups tab and you see the powerups etc...
In each frame I gave the inventory slots different instance names, i.e. in weapons; weaponSlot1, weaponSlot2, and in powerups; powerupSlot1, powerupSlot2.
When the player bumps into an item, i use gotoAndStop('frame number') so that each item is added to the proper inventory slot. the only problem is that if i bump into a key then pause the game, the key is there (under 'Other' tab), but if i click the 'weapon' tab and then go back to 'other', the key is no longer there.
This makes sense because when you click on each tab, i use gotoAndStop('frame number'), and in each frame the inventory slots are blank, so im stumped on how to keep each item in the proper slots?
I am going to i upload all my files in a zip, the main file that you will want to look at is the PauseMenu.as file
Also you will notice 3 public functions called 'checkWeaponSlots', 'checkPowerupSlots', and 'checkOtherSlots'. These are called in my main file, when the player bumps into an item, these functions are called to check which slots are empty.
View 3 Replies
Nov 16, 2004
I have a function on root:
_root.fadeBox_mc.onEnterFrame = function (){
if (fade){
this.nextFrame();[code]....
This causes a mc to fade in and out on rollover/rollout. But what I wanna make is a box that fades in when pressed on the button and fade out when pressed for the second time. But if I say
on (press){
_root.fade = true;
}
the mc fades in, but I cant do another on (press) to fade out. Is this too confusing?
View 2 Replies
Dec 6, 2010
I am struggling a bit with keys on the keyboards controlling a movieclip to happen.Ive got a person moving when pressing right and left, and a movieclip with three frames: First frame is a movieclip with the person standing still, looking bored. The second frame is the person moving right, and the third frame is the person moving left.This is the code that Ive inserted into the persons actions on scene1:
if (Key.isDown(Key.RIGHT)) {_x += speed;this.gotoAndStop(2);_xscale = +scale;}
if (Key.isDown(Key.LEFT)) {_x -= speed;this.gotoAndStop(3);_xscale = -scale;}
this code works alright accept that when the keys are not pressed it doesnt stand still, the legs are still moving, so I tried to include this code aswell:
if (!Key.isDown(KEY.RIGHT)) [code]....this makes the person standing still when not pressed but not moving the legs when turning right and left.
View 3 Replies
Sep 19, 2009
The "size" is 1200x800 pix, and here is were the problem is. When a person look at the site with a 1280x800 or smaller a bit of the site is not there. I don't want to resize the file, so i thougt that the easiest way to solve this problem were to input a scroll, but I can't get the damn scroll activated. Do i need a huge actionscript or is it as simple as mark somewhere in publish (when you create the html-file) need answer as fast as possible.
View 2 Replies
Sep 22, 2011
I have an object that has been added to the stage, exported properly for actionscript, and given an instance name.It's class file is this:
PHP Code: [code]....
And yet none of this works. The trace doesn't even go off, meaning the constructor is never activated. It's linked properly; if I go to the movie clip's preferences and hit "edit class file" it takes me to the proper one.It's possible that the problem lies with the frame numbering. The first time this object is added to the display list is in Frame 2...and it says "export in Frame 1" but I'm not exactly sure what that means or how it affects the class definition or how to get around it. I tried adding it (var sb:SoundButton = new SoundButton in the first frame,
View 3 Replies
Jul 24, 2009
I'm trying to figure out how to get buttons to be activated by keyboard presses. I have found how to do that with specific keys ... but not with ANY keypress. I'm making a game for tiny children and they can't manipulate the mouse well. So I'm setting up a few things on stage that will run in a certain order when the child presses any key on the keyboard. For example, any key is pressed, dog wags his tail .... any key is pressed again, cat jumps, any key is pressed a third time, cow munches hay, and so on till it goes through a bunch of animal animations, then goes back to the first one. I'm pretty new at this stuff and have been banging my head against google for days trying to find the answer to this out there with no luck! I could do either movieclips or movie clips inside buttons if that makes sense.
View 1 Replies
Feb 3, 2010
When the user mouses over a button, it brings up a menu. I want the user to be able to click things in that menu that pops up, but of course when the user moves the cursor off the button and onto the menu, it deactivates the button and the menu disappears. Is there a way around this?
View 3 Replies
Jun 5, 2009
I'm trying to create a scrollpane that is activated by a button. I've already created the scrollpane and linked it up with the text I want, I just need to know how to make the button activate it.
View 15 Replies
Feb 21, 2012
anyone got an idea of how I can create sound or voice activated animations? What I want to do is set up a microphone so when a viewer speaks, a movie will either activate a sound clip or an animation?
View 3 Replies
Aug 13, 2009
I have a mc that when clicked moves off screen, however when it starts to move, once the mouse cursor is off it, it moves back to its original position because my onOut event is to have it move back to the original position.
How do I avoid the onOver activating after the mc has been clicked?
(p.s. - I'm wanting the button to also lead into the next frame and to never be seen again).
View 2 Replies
Mar 26, 2007
I am trying to create a pause button that will pause everything on the screen including movieclips/audio. Right now I can't figure out how to pause the movieclips.
View 2 Replies
Aug 2, 2009
I have some banners I am doing right now and have a pause timer question. I am fairly green at coding. In my first frame I have this:
[Code]...
I want it to pause each time in the last frame for 8 seconds and loop only 3x. Is there a better way to write this? I know all my code should be in the first frame but I still suck.
View 2 Replies
Nov 25, 2006
I am using Macromedia Flash Pro 8. I have a flash intro that has words (phrases) which slide in. I would like to add a 7 second pause between each phrase to give people time to read them (no buttons). Could someone tell me the script(s) to use with all functions, etc. included - as I am so new to all this. I have been looking for weeks & tried many codes but none seem to work - or I don't know exactly where to place them - or both
View 3 Replies
Dec 16, 2010
I have a timeline of 30 frames, each it's own mc (page01_mc, etc.). In each mc I show a picture or two and hear narration.I have a first, prev and next nav on the main timeline. I need to add a play/pause btn that will pause both pictures and sound. I assume I do that in each mc, but do not know where to find the code.Here is what is in each mc now:
var mySound:Sound = new Sound();
mySound.load(new URLRequest("english/Intro01.mp3"));
mySound.play()
View 1 Replies
Jan 19, 2009
I'm creating a platform game, and I want the character to hit a button which would take them to the next level (keyframe).
I want it to work like a normal button, except for the character on the screen, on contact with the button to transport into the next keyframe, rather than the user having to click the object.
Also, is there anyway to do this while at the same time (while changing to the next keyframe) keeping the score, so it adds up with the next levels points?
View 4 Replies
Jul 8, 2009
I am trying to have a link on a web page open up a flash video that appears to hover over the html. I have read web pages explaining parts of this but I cannot get it all to work together.
I am using swfobject to embed the flash object into the web page. I think I need to use javascript to handle the event of clicking on the button and then use z-index to have it appear to hover. Ideally the flash would center itself in the middle of the browser
View 1 Replies
Aug 13, 2009
I have a mc that when clicked moves off screen, however when it starts to move, once the mouse cursor is off it, it moves back to its original position because my onOut event is to have it move back to the original position. How do I avoid the onOver activating after the mc has been clicked?
View 3 Replies