Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








On Spacebar?


I need two actionscripts.

1. I need an actionscript that will on spacebar go to next scene

2. I also need an actionscript that on spacebar will play a .flv 12 times then go to the next scene.

I know this all sounds complicated, or maybe it doesn't, I don't know I just would like some help




FlashKit > Flash Help > Flash General Help
Posted on: 01-22-2008, 07:44 PM


View Complete Forum Thread with Replies

Sponsored Links:

HELP With Spacebar In Javascript
HI! my problem is the following:
All I wanna know is if there is any code (action script or javascript) that let me write spacebars in a javascript cookie. Cos ive used the code to write variables written in an input from flash into a cookie using javascript, and then taking it for the next time i open the movie. The thing is that i can´t write spaces because it doesn´t seem to save it on the cookie. Is there any code that converts spaces into something else and then when i want to read the cookie transforms again that into spaces???
Hope i´ve explained properly.
Thanks in advance, my mail is rman@millic.com.ar

RouMaN

View Replies !    View Related
Detecting Spacebar
delete this thread please... i solved my own problem >< sorry for waste of space

View Replies !    View Related
Press Spacebar?
Hello

I am using Flash MX 2004 and have created a movie.

When I go to it I notice a kind of white frame around it and a message suggesting I need to click on the spacebar before I can see the site properly.

Is this usual and if not, how can I get rid of it, please?

Many thanks for any help.

Steve

View Replies !    View Related
Vb Spacebar Problem
i am currently working on a little shooting game and im trying to put a limitation on the amount of bullets used...i have it so when you press the spacebar a bullet is shot and the number of bullets subtract 1 from 5 everytime..and when it gets to 0 the label says "reload"....what i am trying to do is when the label says "reload", i need the spacebar to basically disable and quit so you cannot shoot anymore bullets until the ctrl button is pushed which takes your bullets back up to 5. if code is needed to be seen then i will gladly post it, but it is very appreciated for your help

View Replies !    View Related
Button + Spacebar
I need help. I 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);
}

View Replies !    View Related
Button + Spacebar
I need help. I 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);
}

View Replies !    View Related
PowerPoint Spacebar
I am designing a Flash Presentation taken from a PPT and I want to assign the spacebar a command to go to the next slide as it is done in Powerpoint. I want the presenter to just press the spacebar and NOT use buttons to go to the next slide. Your help will be greatly appreciated! Thank you.

View Replies !    View Related
Key Press - Spacebar - To Just Play
Hi
Just trying to make almost a pause button with the stop action..and then let the End User continue playing with the use of any key or the spacebar (key code = 32) ...
so i have this movie clip (lets call it "hello" that i drop onto the main layer0
with a small animation ... and on frame 10 i have the stop action ... and a movie clip called fake button..... and the code i have on that is...

onClipEvent (keyDown) {
if (Key.isDown(83)) {
play ();
}
}

what i want is for the MC "hello" to keep on playing.. so with the key press it will play frame 11 and onwards.

what is this numptey doing wrong.... its either

im having the wrong timeline play... not referencing it right..or
I havent graduated from actionscripting 101 yet !

aghhh... thanks for your help.
Rye

View Replies !    View Related
Navigating Labels With The Spacebar
Hi, I have a flash project (flashmx) that I wish to use for presentation purposes.
I have an animated background looping and in the foreground I need to bring up animated titles but I need to be able to control when the names come up.

In otherwords I would like to hit the space bar and have the playhead move to the next label and stay put until I hit the space bar again so the playhead moves to the next label and sticks until I hit the spacebar and so on. Sort of like a slideshow alla powerpoint.

Can someone help me out with the correct actionscript for this as my script isn't working and I am new to this.

This is what I have but it doesn't wanna work:

gotoAndStop("begin");
if (Key.SPACE) {
}
play();


Thanx,

Bill D.

View Replies !    View Related
Fullscreen Launch With Tab To And Spacebar
I would like to get to open fullscreen usign tabbing and spacebar when on my button that launches fullscreen via the mouse. It does work with enter when tabbed to but not space bar. Does anyone know why this is and if there is a work around ?

thanks for r's

View Replies !    View Related
Disable The Spacebar During A Hittest?
Is it possible to disable the spacebar key on a hittest with two movie clips?

Basically I have my character running along the ground and when he comes to the ladder I dont want anybody to use the space bar only the up arrow.

Now I have tried stopping all the code that has anythingto do with the space bar but it aint working. So I had a though is it possible to disable/enable a key via a hittest?

View Replies !    View Related
Press Spacebar At Anytime
Hello, I am trying to create a function that is called anytime the spacebar is pressed, no matter what item is focused.

thanks for any help.

View Replies !    View Related
Moving A Movie Clip With The Spacebar
I have got a bit of script as follows:


Code:
on (keyPress "<Space>") {
this._y = _y-16;
}
onClipEvent (enterFrame) {
this._y = _y+8;
}
this is actionscript which is attched to the object that I want to move.

The problem is, is that the movement of the object depends on the repeat rate of the keys. I would like to have a script that has got an 'if' operator in it, that it everytime it hit that frame, it checks to see if the spacebar is depressed, and if it is, it moves the object accordingly

View Replies !    View Related
Playing A Sound When Spacebar Is Pressed...
Can someone help me with a script on how to play a certain sound from the library when the spacebar is pressed? So far all I've got is this:

PHP Code:



if (Key.isDown(Key.SPACE) 




Not a whole lot, as you can see. I'm making a platform game, and I've got the jumping code and the platform code, though a sound is supposed to be played when the player jumps

Thanks in advance.

View Replies !    View Related
Spacebar Toggles Play/pause
hello, all,

i know this should be simple, but i can't figure out why my script doesn't work. it is on the main timeline, on a keyframe in an "actions" layer. i want to have the spacebar be a play/pause toggle.

---
stop();

on (keyPress "<Space>") {
if (_root.isPlaying == true) {
stop();
} else {
play();
}


---

help? thank you.
aya.

View Replies !    View Related
I Need A Movie Does Not Pause On Press Spacebar
Hi, I am new in the forum.
(Sorry for my poor English.)
I am making a flash movie in wich the user has to press the spacebar key and flash application has to detect it and notify to user if the spacebar was pressed.
The problem I have is that the movie stops when user presses spacebar and he has to press it again to get the movie go on. I need the user presses Only One Time spacebar.
I need the move goes on Without have to press spacebar The Second time. I mean, how I can do to get the movie goes on even if the user presses one time the spacebar key?
Thanks for your help.

View Replies !    View Related
Make The Spacebar Display A Different Character
Hi everyone,

I am making a simple word processing widget, like this one: http://www.edenpr.k12.mn.us/prview/m...pv_writer.html for my kindergarten classroom.

The problem is that the embedded font does not use a lined space when you hit the space bar. It makes a space. The lined space is created by hitting the "" key --just above enter. I have been trying to use a key listener to add the lined space to the text box when you hit the space bar. It works, only it also gives you the "space" created by the space bar.

Basically, on the stage is an input text box (myTextbox) with the font embedded. Here is my script:


Code:
stop();
var keyListener:Object = new Object();

makeSpace = function() {;
myTextbox.text = myTextbox.text + "u005C";
};

keyListener.onKeyDown = function() {
if (Key.isDown(Key.SPACE)) {
makeSpace();
}
};

Key.addListener(keyListener);
Am I going about this the right way? Is there a way to remove the space from the text before adding the lined space?

Any ideas or help would be greatly appreciated!

View Replies !    View Related
Making Flash Stop And Go With Spacebar
Hello,
I was just wondering if anyone could help me make flash stop and then go when you press the space bar
i tried to stop
and then go to
functions but i dont think i did it right.
please help

saraaimee

View Replies !    View Related
Mouse Click Or Spacebar; Stop / Start
Flash gurus!

I am attempting to create a presentation entirely in Flash. I want it to stop at certain frames, and then run again at the click of the mouse or spacebar (without needing to click a button preferably). I can't figure out if I should be creating tweens directly in the main timeline, or dropping in separate MC's. And, when I try to add "onClipEvent" to a main frame, or to an MC, it is dim and I can't select it!

Any other suggestions also on how I should be going about this?

AaaahhhHHHHH!!!

nokturnal mee

View Replies !    View Related
Spacebar In Flash MX 2004 Doesn't Repsond?
Anybody else have this problem?

I open a Flash MX .fla in Flash MX 2004 and all the text has no spacing!

Thereisnospacebetween words as static text. I can't even use the spacebar to correct this. Hitting the spacebar does nothing! I have to hold down the option key and then hit the spacebar.

I'm running MX 2204 on a Mac w/ oS 10.3.5.

Thanks!

J

View Replies !    View Related
Keystroke Control: Toggle Start/top With Spacebar
Greetings all,

This is my first post. Thanks in advance for your help and support.

I am trying to control playback via keystrokes. I have a test movie with three scenes. I am using the left and right arrows to move between scenes and the spacebar to toggle between play and stop.

The left/right arrow functionality seems to be working fine. I have it set up so that pressing the right arrow takes you back to the beginning of the current scene (and stops the movie). Pressing it again takes you to the beginning of the previous scene (and stops the movie). If you are already stopped at the beginning of a scene, the first press of the arow will take you to the beginning of the previous scene. The left arrow works the same way but for the next scene.

I am having a little toube with enabling the spacebar functionality. I need it to start/resume playback if the movie is currently stopped and stop playback if the movie is currently playing. here's the priblem:

If the movie is stopped by using the spacebar, everything works fine. However, if the movie is stopped by using one of the arrows (say you press the right arrow to return to the beginning of the scene, the movie also stops), the fact that the movie is stopped does not register and hence it takes two presss of the spacebar to resume playback. It's as if one press is necessary to register the stop (even though the movie is already stopped) and then the second one to resume playback.

Is this making sense? I am happy to post a copy of the test *.swf if that would be helpful.

My apporach was to define a variable and determine the behavior of the spacebar based on whether the variable was true or false. I then set the value to treu of value as necessary. but that doesn;t seem to work. Would it be better to simply check if the movie is currently playing and base my logic on that? And, if so, how do I check the playback staus of the movie?

Again, thanks in advance for the help.
TN

View Replies !    View Related
Press Spacebar Or Enter To Activate This Control
press spacebar or enter to activate this control, why am i getting this message? On the top link bar on this site.
Black Mesa Cues
You have to click it twice or press spacebar or enter to make the links work?

Thanks
JOptionPane

View Replies !    View Related
Press Spacebar Or Enter To Active This Control
When my Flash images load on the web page I have suddenly began to get the above message. It is also accompanied by a gray box.
I must have set or unset a trigger somewhere.
Any ideas.

Brian

View Replies !    View Related
Select Choices Using Up And Down Arrow Keys And Spacebar?
Hi all! im working on an rpg game and so far i have it so the character walks around the world and you can press space bar next to another character and have them talk with you. once you hit space bar the characters 'chatbox' comes up and gives you 2 options to choose from that lead you to different places.

i can make it work with buttons right now, but you have to switch to the mouse to click the buttons. is there any way that i could have a chatbox come up and have the user select the option? like have the user select while using just the up and down arrow keys, and then when they have what they want selected they hit space bar to accept the decision?

i guess what im asking is if there is a way to have a character move with the arrow keys in the world and select answers with the arrow keys when speaking with other characters? and use only the space bar as a selection?

sorry if this sounds confusing, if you need more id be glad to elaborate!

thanks for all the help in advance! (btw im using CS3)

View Replies !    View Related
Spacebar Pause/resume Flash Movie?
Hi, im sure this is pretty basic but am attempting to create a keyboard control to enable the spacebar to pause a swf, then press again to resume. Do i need a button offscreen with an onclipevent on it....? I am using as2. Im sure this is pretty basic but Ive not found anything that seems to work for me....cheers

View Replies !    View Related
How To Get A Tabbed Component To Respond To ENTER Instead Of Spacebar?
Hi,

The spacebar way to respond to a component seems awkward since the normal way to do this in Windows is with the enter key. So, if you tab from one v2 component button to another, you have to press spacebar instead of enter to press the button.

How is it possible to change or add ENTER as a way to do so? I found somewhere else a mention of modifying FPushButtonClass.prototype.myOnKeyDown but cannot find this class on my system. I'm surprised that there is little discussion of this topic anywhere since it seems like an awkward departure from the norm. Any thoughts?

View Replies !    View Related
Spacebar Launches Puck? Breakout Related.
I've got trying to program a Breakout clone in Flash 8 and I've got this so far:
http://dump.theleafyisle.com/breakout.fla

I want it to launch the puck directly upwards by pressing spacebar. I want this to occur everytime the game starts (so nothing happens until you hit spacebar) and everytime the puck goes out of bounds.

At the moment I have it so it bounces off the bottom since I haven't setup anything to deduct lives or anything like that yet.

Any help on this would be great.

View Replies !    View Related
Have The Movieclip Move Once When The Spacebar Is Pressed And Then You Must Release I
What I want do do is have the movieclip move once when the spacebar is pressed and then you must release it and press it again for it to move and so on i made this:
Quote:




onClipEvent (load) {
var space:Boolean = false
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE) and (space=true)) {
this._x = _x+1;
} else if (Key.isDown(Key.SPACE) and (space=false)) {
this._x = _x+0;
} if (!Key.isDown(Key.SPACE)) {
space=true;
}
}




currently it continues to move regardless of the space variable and I don't know why can some one please help?

View Replies !    View Related
Press SPACEBAR Or ENTER To Activate And Use This Control - Eolas
For those of you who havn't been keeping up with this microsoft IE update due to the lawsuite with EOLAS -- you prob got a smack in the face this weekend like me. Microsoft latest automatic update implmented a new tooltip to activate flash content. See this article:

--- QUOTE from http://weblog.motion-graphics.org/archives/news/
March 10, 2006
Click to activate and use this control
You may have started seeing tooltip text that reads 'Click to activate and use this control' or 'Press SPACEBAR or ENTER to activate and use this control' whenever you open a Flash web page. Worse still, the Flash page will not work until you actually click the Flash content. This makes many (all?) Flash sites appear broken...

You will see this new 'feature' if you have Windows update enabled and you use Internet Explorer. Microsoft have added this feature after losing a legal battle with Eolas.

The feature actually has no practical use (its not a security measure) and has occurred purely because of a legal issue.

The background issue revolves around the use of plugins on a webpage, which Eolas claim patents on. Any content that is included within a web page via the applet, object or embed tags will be affected, and this includes Flash. It is important that you fix this issue for any Flash sites you are maintaining because the user cannot disable this new operation through their browser. You have been warned!

There is a fix for this issue here. http://www.pixelmill.com/support/kb101593.htm


-----

So if your like me and wondering why your setfocus commands and everything else stopped working - read up!.. Thought i would post this so everyone else that searches for "'Press SPACEBAR or ENTER to activate and use this control" knows what its all about!

there is also another fix here: http://blog.deconcept.com/2005/12/15...-flash-plugin/

-SM

View Replies !    View Related
Spacebar Key Listener Calls Function Multiple Times
My problem:
I have a file, index.swf, which contains a movieClip name loader_mc. As you might expect, I have four separate .swf files that load into loader_mc from a menu on index.swf.

On two of my .swf files, movie1.swf & movie 3.swf, I have placed code that allows the user to advance the page by clicking the spacebar as well as by clicking the next_btn.

The code works fine the first time that you open movie1.swf or movie3.swf from index.swf. However, after returning to the menu and loading a new .swf into loader_mc, the spacebar now advances two pages instead of one. The third time I've loaded a .swf into loader_mc, the spacebar will now advance 3 pages (and so on). It doesn't matter whether I load the same .swf into loader_mc or a new one (i.e. I can open movie1.swf from the main menu on index.swf 5 times and the spacebar will now advance the page 5x when moving through movie1.swf).

My Code:
Here is the code which controls page navigation. It is placed on frame 1 of movie1.swf (similar code is placed on frame 1 of movie3.swf).
// Page Navigation________________________________________ _____//
function nextScreen() {
// I don't think that the code here is the issue, it advances the page or screen 1x
}
function previousScreen() {
// I don't think that the code here is the issue, it moves the page or screen backward 1x
}
// Button Code
next_btn.onRelease = nextScreen;
previous_btn.onRelease = previousScreen;
// SpaceBar (Hitting the spacebar rather than clicking the next button)
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.getCode() == Key.SPACE) {
nextScreen();
}
};
Key.addListener(keyListener);


The next_btn correctly calls the nextScreen() function and appropriately advances the page 1x (no matter how many times I load movie1.swf into loader_mc). Since the spacebar listener is tied to the same function, I can only assume that somehow the spacebar code is being called multiple times simultaneously.

Any idea why the spacebar code duplicates itself when movie1.swf is reloaded into loader_mc?

View Replies !    View Related
Spacebar Launches Puck? Breakout Related. Urgent Help Needed.
I've got trying to program a Breakout clone in Flash 8 and I've got this so far:
http://dump.theleafyisle.com/breakout.fla

I want it to launch the puck directly upwards by pressing spacebar. I want this to occur everytime the game starts (so nothing happens until you hit spacebar) and everytime the puck goes out of bounds.

At the moment I have it so it bounces off the bottom since I haven't setup anything to deduct lives or anything like that yet.

Any help on this would be great.

View Replies !    View Related
HOW TO DISABLE "..press Spacebar To Activate This Button" That Appears On My Swf File
Hi... i don't know which category should i post this, but since im using mx2004 I just posted it here.

Why do my swf files need to be activated by clicking with a mouse or spacebar while i see other pages like yahoo no longer requiring the user to do it?

Please tell me... i know this may seem simple to others but I don't have any idea how to fix it.

Thanks

BUDDY

View Replies !    View Related
= "ENTER", How Abt "SPACEBAR" ?
How I know i can use
for enter key. But if there a code for spacebar. For example: I want to leave a 5 spaces area in my text field.

Thanks..

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved