ActionScript 2.0 :: Controlling Buttons By Pressing Keys?

Dec 10, 2002

I have 12 different buttons that are keyboard keys that play a sound when you click on them.I am wondering if, in addition to that, one could hit, for instance, the ` key for this first one, the 1 key for the second one, the 2 key for the third one, etc..etc

View 1 Replies


Similar Posts:


ActionScript 2.0 :: [Flash 5] Controlling Buttons By Pressing Keys?

May 15, 2005

(Flash 5) I have 12 different buttons that are keyboard keys that play a sound when you click on them. I am wondering if, in addition to that, one could hit, for instance, the ` key for this first one, the 1 key for the second one, the 2 key for the third one, etc..etc.. Is there a script for that, in addition to the click?

View 1 Replies

Changing The Value Of A Variable By Pressing Keys?

Jun 18, 2010

There is probably a better way to do what I'm trying to do, but I simply want to make a variable change its value when I press the arrows keys. For example if I wanted to cycle through weapons, if weapon=0 then the character is holding a certain weapon, then I press the down arrow key and weapon=1 and if weapon=1 the character is holding another weapon. And if I press up weapon=0 again so he's holding the first weapon again. And say there's 8 weapons, if weapon>8 then weapon=0 again so its a cycle. I tried arrow key functions and all they worked for was making a symbol move. I think I knew how to do this stuff in gamemker pretty well but Flash is very different.

View 2 Replies

ActionScript 2.0 :: Getting Symbol To Move By Pressing Keys?

Jun 27, 2010

I'm completly lost, I'm rather new to flash, and I'm trying to get a symbol to move when I press a key. The following is what my code looks like:

onClipEvent (load) {
speed = 5;
} onClipEvent (enterFrame) {
if (key.isdown(37)) {
_x -= speed;
} if (key.isdown(39)) {
_x += speed;
} if (key.isdown(40)) {
_y += speed;
} if (key.isdown(38)) {
_y -= speed;
}}

View 4 Replies

ActionScript 3.0 :: Detect Caps Lock Without Pressing Any Keys?

Dec 18, 2010

I am trying to make the password login and would like add this feature to my website and don't know how to do it.
 
I wrote the code below to detect the Caps Lock but it couldn't detect the cap lock at start up.
 
if(flash.ui.Keyboard.capsLock){trace("CAP WAS ON")}else{trace("CAP WAS OFF");}; The result for this code is always return "false" unless I put this code in the eventlistener and have to press the keyboard

View 3 Replies

ActionScript 2.0 :: (F5) Get A Button To Work By Pressing Keys And Sound

Dec 11, 2002

(Flash 5) Ok guys, I am trying to get a button to work by pressing keys. Problem 1) I want the keys that are pressed to be ,1,2,3,etc... and those keys aren't in Flash's actions, can they still work? Or do I have to use keys like SPACE, RETURN, etc...??? Problem 2) Here is the code I'm using. I also want a sound to be played while the button is going down. The sound is in the "down" of the button, but I linked it. THe linkage name is "sound1" here is the code;

[Code]...

View 1 Replies

Flash :: PC Control - User Mouse Clicks Or Eventually Keyboard - Pressing Some Keys

Nov 23, 2009

I'm completely new to AS3/Flash programming, though I program in C/C++/C# in my job. These days I got a project idea which I think Flash would better fit than the other languages I mentioned above. I want to create an on-line automation application that can:

1. Control user mouse clicks, or eventually keyboard, pressing some keys;

2. Communicate/connect to the user's bluetooth device, establishing connections to the mobile devices attached to it - the web application in this case would act as a server.

View 2 Replies

ActionScript 2.0 :: Controlling Loaded SWF By Pressing Button

Dec 6, 2005

I made an empty movie clip and named it "container" and then I made a button.. Here's the code for the button in main movie..
on (release){
container.loadMovie("movie1.swf");
movie1.play();
}
Then I put stop(); on the first frame of the swf to be loaded. What I want is to play movie1 by pressing the button in the main movie..

View 5 Replies

ActionScript 3.0 :: Buttons Stop Working After Pressing Other Buttons?

Sep 14, 2009

I have three buttons and when I click the second one, the first stops working (e.g. no trace event and it won't go back to the frame "tab1") but the third still works. Then when I press the third button both the first and second no longer work. If I take out the gotoAndStop lines, the buttons work fine. The subsequent frames simply have stops on them.
 
b1.addEventListener(MouseEvent.MOUSE_UP,b1Pressed);b2.addEventListener(MouseEvent.MOUSE_UP,b2Pressed);b3.addEventListener(MouseEvent.MOUSE_UP,b3Pressed);
function b1Pressed(event:MouseEvent){    trace("b1 pressed"); 

[Code]....

View 4 Replies

ActionScript 3.0 :: Slider Component - Arrow Keys Stop Controlling Game Characters

Mar 1, 2009

I was hoping to use the slider component to control some parameters in a game. However, after clicking on the slider to adjust it, the arrow keys start controlling the slider and stop controlling the character in the game. Is there a way to disable arrow key control of flash's built in slider component?

View 3 Replies

ActionScript 2.0 :: Listing Mcs By Pressing Buttons?

Jan 30, 2012

What im trying to acomplish is to list some mcs by pressing buttons.I got 5 buttons and 5 mcs.If the user press for example 3 buttons the objective is to list that 3 selections in same selection order and if the user deletes the 2nd of the 3 selections the 3rd selection takes the place of the 2nd selection (a population list). I attached a link to the source file.

View 3 Replies

ActionScript 3.0 :: Pressing Buttons In A Certain Order To Progress

Apr 27, 2011

So I'm making a game which has different scenes. One of my scenes has six buttons, of which need to be pressed in a certain order to progress in my game.

View 9 Replies

ActionScript 2.0 :: 3 Buttons And 3 MC's - After Pressing Each Button A Few Times The Script Stop Working?

Feb 13, 2006

I have 3 buttons and 3 MC's .each button tells it's MC to play and then stop at frame 15 and then tells the other two MC's to play if they are already at frame 15 and if not do nothing.i have it working to a point but after pressing each button a few times the script see's to stop working.

View 7 Replies

Use Keys To Activate Buttons/

Jun 24, 2010

I have done up a flash demo which uses the computer mouse to navigate. Now instead of using mouse, I want to use keyboard (arrow up, down, left, right) to highlight buttons and then hit "enter" key to click the button.

View 2 Replies

ActionScript 1/2 :: Using Keys To Activate Buttons?

Jun 24, 2010

I have done up a flash demo which uses the computer mouse to navigate. Now instead of using mouse, I want to use keyboard (arrow up, down, left, right) to highlight buttons and then hit "enter" key to click the button.

View 6 Replies

Flash :: Move MovieClip Using Onstage Buttons, Not Arrow Keys

Mar 23, 2010

To move the MC, using arrow keys I used the following and it worked:

var timer:Timer;
var direct:String;
initStage();

[Code].....

I tried to convert this to use my onstage buttons: up_btn, down_btn, left_btn, right_btn to move MC box but couldn't figure it out.

View 1 Replies

ActionScript 3.0 :: Dictionary With String Keys: Slower Than Object Keys?

Apr 27, 2011

whether using a String as the key in a Dictionary results in slower lookups than using an Object, Class or Custom Object (an instance of developer defined Type)?

When using a String as a key, does the literal String have to be parsed, or does the Dictionary key point to the String Object?

View 2 Replies

ActionScript 2.0 :: Get The AWSD Keys To Work As Smoothly As The Arrow Keys?

May 16, 2003

How do I get the AWSD keys to work as smoothly as the arrow keys. I can put the arrow keys inside an enterFrame

[AS]onClipEvent (enterFrame) {
//move the tank
if (Key.isDown(Key.RIGHT)) {

[Code]....

If I put the AWD keys inside an enterFrame they run until I push another button

View 6 Replies

ActionScript 3.0 :: Controlling Multiple Buttons Within A MC?

Feb 23, 2010

I am trying to control my main Scene 1 via a navigation bar within a movie clip.

I am using the following code for each button:

btn_2.addEventListener(MouseEvent.CLICK,btnClickHa ndler);
function btnClickHandler(event:MouseEvent):void{
MovieClip(root).gotoAndPlay("frametwo","Scene 1");
}

If I just put that code in for one button, that one button will work, but once I add another line of code for my next button, the only one that works is the first one, then the rest of them don't do anything.

View 4 Replies

ActionScript 3.0 :: Controlling Timeline With Buttons?

Apr 3, 2010

i have forward/back buttons to control the timeline. what happens in the following code is that if the button is clicked while in the < or > range of frames, it gets buggy. heres the code.

[Code].....

this doesnt seem to go to the exact frame i need if i click while the current sample is still animating in. It would be much better if i could tell flash to a specific frame instead of asking flash to determine a range. that way, if a button is pressed during an animation it wont just advance one frame, it would jump to a specific frame.

I wish i could just do this:

[Code].....

i thought about creating a var that would be a string. i could then add a number to the name of that string each time the button is clicked. then i could make frame labels the name of the string. but i couldnt get my head around it. also, i didnt know how to make the button stop adding to the string name once it reach a certain value (6 in this case). or how to make it play the last sample animation if the user kept clicking the advance button at the end of the samples.

View 1 Replies

ActionScript 3.0 :: Controlling Sounds With Buttons?

Mar 22, 2011

I'm making a section in my production with 4 audio files which are controlled with a play and stop button. I've managed to make the first one work on the page with this code -

Code:
import flash.media.SoundChannel;
var mySoundReq:URLRequest = new URLRequest("audio/track1.mp3");
var mySound:Sound = new Sound();

[Code].....

What would I need to copy to control 3 other files the same way? (i.e "audio/track2.mp3" with play_btn2/stop_btn2). I've tried copying part of the code and changing the instant names but I keep getting errors so I'd rather ask somebody who knows what they're doing.

View 3 Replies

ActionScript 2.0 :: Controlling MC Highlite Via Different Buttons

Nov 27, 2003

I am trying to make ThumbNail Highlite via button and MC.

Each of the Thumbnails has a same button with instance named "item" 1 to 40. Also, I have the highlite MC instance named "highlite" 1 to 40 as well

I am able to triggar the "highlite" MC with the following:
=================================
onClipEvent (enterFrame) {
_root.main_nav_mov.item1.onRelease = function() {
_root.main_nav_mov.highlite1.gotoAndPlay("play_lit e");

[Code]....

View 3 Replies

ActionScript 2.0 :: Controlling Flv With Custom Buttons?

Feb 6, 2009

I have created a presentation which is mostly graphics and voiceover. I have created a few custom buttons to allow the user to pause, start over, etc. (not video). In a few places I am calling to external flv files which have been placed inside movieclips. I want to be use my custom pause button to pause the flv as well, as opposed to using a flv player/controller. I have made several attempts such as:

_on (release) {
_root.myvideo_mc.pause();
}

[Code]....

and trying stop/play instead of pause, etc...all to no avail. the appropriate scripting to control an flv with a custom button?

View 5 Replies

ActionScript 2.0 :: Controlling MC Highlite Via Different Buttons?

Nov 27, 2003

I am trying to make ThumbNail Highlite via button and MC.Each of the Thumbnails has a same button with instance named "item" 1 to 40.Also, I have the highlite MC instance named "highlite" 1 to 40 as wellI am able to triggar the "highlite" MC with the following:

onClipEvent (enterFrame) {
_root.main_nav_mov.item1.onRelease = function() {
_root.main_nav_mov.highlite1.gotoAndPlay("play_lit e");

[code].....

View 3 Replies

Slideshow - Controlling MovieClip Using Simple Buttons

Aug 19, 2009

I'm trying to build a simple slideshow with AS3 consisting of one movie clip which should be controlled backwards and forwards using simple buttons. I can get the slideshow to play forward once but, apart from getting slide 2 to go back to slide 1, I can't get it to work with the remaining slides.

View 11 Replies

CS3 :: Buttons Controlling Timeline Frame Rate?

Sep 10, 2010

Is there a way to have a button click change the main time line frame rate?

View 4 Replies

ActionScript 1/2 :: Buttons Controlling Navigation Between All Frames?

Nov 1, 2010

I have a 4 frame file that is a dvd menu. Buttons controlling navigation between all frames. There is a main page, and 3 child pages that link back to main.  I have an mp3 file that I need to add as background music.  I have created a new layer and added the following to the action of frame 1.
 
soundInstance = new Sound();soundInstance.attachSound("Music name from library"); My problem is that every time I navigate back to main from one of the child pages a new instance of the song begins so  I end up with a round of music. I need the initial instance to persist throughout and not loop til the end of the song.

View 9 Replies

ActionScript 3.0 :: Controlling Cross-Fades With Buttons?

Feb 23, 2009

I need a button initiated cross-fade. This, for me, began as a MooTools adventure, but I've been advised by the JS developers on MooTools to pursue this with Flash. For reasons that I'm that I'm sure are obvious to you AS wise ones.I've just joined AS.org joined and have just used Awilderbeast's cross-fade AS3 snippet here:Awilderbeast's code being [my needs are explained below the code]:

import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

[code].....

View 0 Replies

ActionScript 2.0 :: Controlling External Loaded SWF With Buttons

Nov 23, 2009

Can we control the external loaded swf with buttons created on another swf. Let me simplify this: I have one swf in which I have created one small timeline animation and the second swf has the buttons to play and stop the animation.

Now I load this 2 swf in my main file and want to control the animation through that buttons.

View 1 Replies

ActionScript 3.0 :: Controlling Custom Scroll Buttons

Sep 26, 2010

I'm updating my website and found out that I originally created it using AS1. I now need to update to AS3 and am having difficult time learning AS3 or even catching on to the basics. On two of my pages, I created a static text box, which I turned into a movie clip to have controlled by buttons. I got my down button to work, but I'm still having a problem with my up button. I can get it to work if I use the same code as my "down", but then my movie clip text continue scrolling down, instead of up. Here is my current set up:

Movie clip controller that is 3 frames:
Frame 1: stop action
Frame 2: blank
Frame 3: gotoAndPlay(2);

[Code].....

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved