ActionScript 3.0 :: Stop User From Spamming A Button

Aug 24, 2010

I have a little turn-based combat app where I use a Timer so enemy units can attack in sequence, and to allow time for animations to play.Works great for them. But if the user hits the attack button too rapidly, friendly units miss there turn.I tried inserting a toggling Boolean var and saying "It's not your turn!" when you click to attack. That works, there is indeed a text prompt, but friendly units still miss turns.Any techniques to address this welcome, especially if they don't involve a Timer.

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Sound - Stop Button To Allow The User To Stop Mid Song

Mar 13, 2007

i have programed a play button using:

[Code]...

now i am trying to program the stop button to allow the user to stop mid song....

View 4 Replies

ActionScript 3.0 :: Getting FLV To Stop Playing When User Clicks On Nav Button

Jul 22, 2009

I have a portfolio_mc that is inside of a content_mc (stage->content_mc->portfolio_mc). There are 3 buttons that take the user to an appropriate frame designated by a frame label and this loads up an FLV. The problem is that when I click on any of the navigation buttons on the main timeline, the FLV that is currently playing, is still playing (I can hear the audio). How to stop this.

Here is the code used for controlling the buttons in the motion_mc timeline:
stop();
var naviArr:Array = new Array(btn01, btn02, btn03);
btn01.addEventListener(MouseEvent.CLICK, navigate);
btn02.addEventListener(MouseEvent.CLICK, navigate);
btn03.addEventListener(MouseEvent.CLICK, navigate);
[Code] .....

View 18 Replies

ActionScript 3.0 :: Stop Timer Until User Clicks A Button On Second Swf

Jul 7, 2009

I have an opening screen which asks the user to enter the first name and then they click the "start" button.This then loads an external swf into it and it starts a quiz on a timer.All that works except that the timer starts sometime during opening swf.I'm not sure if it's when the main swf is loaded or if when the user clicks in the input box but it is definitely not when the user clicks the "start" button like I have programmed.I even tried to stop the timer until the user clicks a button on the second swf (the external swf that is loaded into the main swf)[code]In the loaded swf I have a clock_mc that holds the timer.the first frame has a simple stop(); and the second holds all of the code that makes the clock run.I then have code setup so that when the user clicks a button the clock_mc.gotoAndPlay(2)[code]

View 5 Replies

IDE :: Stop Flv Playback When User Clicks A Navigation Button?

Feb 6, 2008

I have a few flv component instances on different frames. When you click a navigation button the current flv should stop and it takes you to a new flv on a different frame. But the previous one keeps playing. How do I stop the current one playing when the button clicks?

View 6 Replies

Stop Video From Playing Until User Clicks The Play Button?

Mar 27, 2009

I am using flash 8 professional.

I have a custom video player that loads videos from an external xml file. It uses all actionscript to control the video using the attatchVideo(ns).

At present the video starts playing as soon as the video opens, I would like the video to only start playing after the user clicks the play button.

What is the actionscript I need to achieve this?

* all the actionscript for all buttons etc. is on one layer called actions. Videos are external not on layers.

View 3 Replies

ActionScript 3.0 :: Stop Video When User Clicks A Navigation Button?

Jul 11, 2009

I have a flash page that loads a video. Under that I have a button tcalled "Audio Demos" that opens a pop up with an audio player.

The problem is that the video keeps playing, so I need some code that stops the video when the user clicks on the "Audio Demos" button.

Here's the code for the button:

function getGilbertAudiodemos(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.gilbert.net.au/demo.html"));
}
gil_audio.addEventListener(MouseEvent.CLICK, getGilbertAudiodemos);

View 2 Replies

ActionScript 3.0 :: Getting A Video To Stop Playing When User Clicks On Another Button To Navigate

Jan 17, 2010

I am trying to create a little website in flash.. I have some video that plays automatically once the user goes to that section (I am using frame labels to navigate from section to section of the site). But, when the user clicks another button to go to a different page, the video is still playing because I hear it..How can I stop the video from playing once another button gets clicked?

View 20 Replies

Flex :: Pages With Flash Won't Load Until User Clicks The X (stop) Button On IE

Dec 1, 2009

I am building a flash application using flex. From time to time, I see an issue in IE 7 and 8 where the user logs into the site and the browser content pane is completely grey and the entire page (html, javascript and flash) won't load until the user clicks the X (Stop) button next the address bar. As soon as the X is clicked, the html loads and then the swf file loads immediately.

This doesn't happen for me or any other developers on the project so it is very hard to diagnose. The users are all using the latest flash player. The only difference between our setups that I can think of is that we have the debug version of flash player and they probably do not.

View 1 Replies

ActionScript 3.0 :: When The User Clicks The "exit" Button A Class File Is Called To Mark The User Complete In An LMS?

Oct 4, 2010

I have a problem with a dynamic video player that I have created in flash. The video player is "SCORM" compliant so that when the user clicks the "exit" button a class file is called to mark the user complete in an LMS.I have tested the SCORM Code previously and it works with out issue. Usually I have the completion code embedded in an Actions Layer of the movie. This is the first time I have attempted to call the completion status in a class file, I have added a "trace statement" when the movie is tested within flash it runs the trace statement properly, but when uploaded to the LMS environment the course does not complete properly

View 3 Replies

ActionScript 3.0 :: Get Main Timeline To Stop In The Beginning On Button Press To Play And At The End Stop Again?

Feb 1, 2008

I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly.

The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either.Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3.

View 9 Replies

ActionScript 3.0 :: Stop Mp3's From Loading If The User Selects A Different Mp3?

Sep 17, 2010

I'm working with a lot of mp3 files and I want to be able to stop an mp3 file from loading from the server if the user selects a different mp3. How do I do this?  Here is my code so far:

[Code]...

View 9 Replies

ActionScript 2.0 :: Letting A User Stop A Loop?

Dec 13, 2005

Let's say i'm developing a chessgame, that evaluates moves in a while loop. I want the user to stop the game from looping, and give the move she's come up with so far. Just to stop the waiting for the user. I came up with this (the enterframe is there to let it compile):

Code:
firstTime = true;
this.onEnterFrame = function() {

[code]......

View 3 Replies

ActionScript 3.0 :: Stop Transition And Let The User Navigate / Drive?

Sep 17, 2009

My site is here: [URL] If you note though, unless the pause button is selected, it transitions too fast. How do I stop it and let the user navigate/drive? (All pic titles and locations, etc. are in xml). Secondly, although there are many more pictures it stops at 16. Why? Where would I look for direction?

View 1 Replies

ActionScript 1/2 :: Timer To Stop And Then Display User Time

Apr 22, 2010

I am making a game where I want to have a timer running over each level (a total of 4). When the user has finished the game, I want the timer to stop and then display their time. I have 2 dynamic text boxes with the varibles set to them as "Seconds" and the other as "Min". Here is the ActionScript I have for it right now:

[Code]...

View 2 Replies

ActionScript 2.0 :: Disable ESC / CTRL+ALT+DEL So User Cannot Stop .exe From Playing

Apr 20, 2007

We have created a game and we need to run it fullscreen on a kiosk. The game requires the user use the spacebar however we would like to disable ESC and CTRL+ALT+DEL so the user cannot stop the .exe from playing.

View 2 Replies

ActionScript 2.0 :: Stop Video From Starting Until User Clicks Play

Mar 28, 2009

Using the tutorials on the gotoandlearn main page I built a custom video player that loads the videos from an xml file and it works great. At present the video starts playing as soon as the video opens, I would like the video to only start playing after the user clicks the play button.

View 3 Replies

ActionScript 3.0 :: Play MovieClip On User Click And Stop At Specific Frame?

Sep 16, 2009

I'm using Flash CS4 with AS3. I'm building a website for a friend the problem I have. When a user clicks on a button I want it to play a movie clip then stop at a specfic frame. I want all the buttons to play the same movieclip but go to a different frame.

The current actionscript I am using is located on frame 1 is:
home_btn.addEventListener(MouseEvent.CLICK, homebuttonClicked);
function homebuttonClicked(event:MouseEvent):void{
gotoAndStop(0)
}about_btn.addEventListener(MouseEvent.CLICK, aboutbuttonClicked);
function aboutbuttonClicked(event:MouseEvent):void {
gotoAndStop("aboutme")
[Code] .....

This allows me to navigate to the right frame but does not play for obvious reasons, if I use the gotoAndPlay function its carries on playing to the end of the movie.

View 2 Replies

ActionScript 2.0 :: Move Over The Button When The User Rolls Over The Button?

Dec 1, 2003

I am having problem with a getProperty thing. I have built a menu system that I want a bar to move over the button when the user rolls over the button. I have 3 buttons which have the following code on them:

on (rollOver, dragOver) {
/:Ymove = -119;
}
on (rollOut, dragOut) {
/:Ymove = /:origYpos;
}

and then I have an mc called bar which is within an mc called subMenu, which is within an mc called intro, which is on the stage. I have the following code on the same mc as buttons and bar, on first keyframe:

[Code]...

View 2 Replies

ActionScript 3.0 :: Basic Buttons - Advance User To Correct Frame Labels And Stop

Sep 13, 2010

I have a flash site that has a presentation page it has a menu of two buttons (1) to take you to a slide show and (2) that takes you to the gallery. These are the only two buttons that seem to work in control test movie, I get no errors. The only button that is connected is the slideshow button (I haven't done the gallery yet). This button takes you to frame two. Where I have the main website. It has its own menu that spans across the entire website which is 25 frames.

Each frame represents a new page. I have mini menus at frames 3, 5, and ten. That are supposed to just advance the user to correct frame labels and stop. The only buttons that work are the ones in the first frames. The rollovers appear to work on all the pages when I advance the movie using the [ . ] key but I get no trace statement which means that it is not being acknowledged, all my buttons are named properly I believe so here is the code as well, all is in frame one:

stop();
//handle events for buttons...
Gallery.addEventListener(MouseEvent.CLICK, clickSection);
Home.addEventListener(MouseEvent.CLICK, clickSection);
Location.addEventListener(MouseEvent.CLICK, clickSection);
Guest.addEventListener(MouseEvent.CLICK, clickSection);
Lodging.addEventListener(MouseEvent.CLICK, clickSection);
[Code] .....

View 10 Replies

ActionScript 3.0 :: Rollover Menu And Go To A Certain Frame In A Movie Clip And Stop When The User Mouse Clicks

Aug 31, 2010

i'm making a rollover menu with AS3, and when the user mouse clicks I want it to go to a certain frame in a movie clip and stop. It does this fine, however I have an animation for it to play on Mouse out. So when user mouse clicks then mouse outs from the button area it plays my mouse out animation and i'm back to square one. How can i tell it to ignore the mouse out animation if the user has clicked the button?

[Code]...

View 5 Replies

Actionscript 3 :: Stop Formatting (bold) Being Lost / When User Deletes Whole Line In Flex Tlf Textflow Control

Jul 6, 2011

I am using text layout framework textflow in Flex 3 to get embedded images. In the edit field for the application the user can apply formatting. This all works fine except if the user deletes all the text they have entered and then starts typing again then the formatting is lost.[code]To setup the initial formatting then similar code to apply the formatting when the user changes it.So how can I stop the user from 'deleting' the formatting if they delete all the text?

View 1 Replies

ActionScript 2.0 :: Bar - Play And Stop Button To Play And Stop Frames In A Flash Movie

Dec 1, 2004

give me the actionscript for a bar that has a play and stop button to play and stop frames in a flash movie. i would be gratefull if you could as i am really stuck

View 2 Replies

ActionScript 3.0 :: Multiple Button Functions - When Click The Button, The Mc Does Not Stop Playing And The Text Does Not Show Up?

Nov 8, 2009

I'm designing an interface for a class, and the buttons that I am using all have multiple functions.For example, when the story button is clicked, I need the mc to stop playing and change to text (in the same window/screen, just no mc playing).  The mc is 31 frames long, but if there's a way to just make it loop continuously until told not to, Currently, my code looks like this:

stop();
story_btn.addEventListener(MouseEvent.CLICK,story);
function story(event:MouseEvent):void { gotoAndStop(32);}credits_btn.addEventListener(MouseEvent.CLICK,credits);[code]...

When I click the button, the mc does not stop playing and the text does not show up. 

View 6 Replies

ActionScript 2.0 :: Stop Sound Loop From One Button By Clicking New Button?

May 22, 2011

I want to stop the sound loop from one button by clicking new button. Does anyone know the code that would stop one button's sound from looping by just clicking another button (for another sound)?So you have these buttons:button 1 button 2 button 3 button 4and after clicking "button 1" a sound loops. when i click "button 2" i want the sound from "button 1' to stop.

View 2 Replies

Actionscript 2.0 :: Multiple Mp3 Players - Stop Button , Pause Button When Choose A Song The Previously That Play Will Be Muted

May 8, 2010

i started with a Multiple mp3 players project and i more complicated with that - as you see in the picture i try to do that when click on the play button for every song this switch the song that selected -first preloading + percentage the mp3 file and after play it immediately and of course there is stop button, pause button when choose a song the previously that play will be muted

View 4 Replies

Professional :: Play/stop Button Change Into One Button?

Mar 9, 2010

I have two buttons for paly and stop movie.

It is possible to only use ONE button ...
 
EXample
When click PLAY , stop btn is on
When click Stop, Play btn is on.
 
My file: [URL]

View 1 Replies

ActionScript 2.0 :: Changing The Stop Button To A Pause Button?

Nov 13, 2011

I am basically creating an mp3, I want to change the stop button with a pause button but don't know how to do it.

[Code]...

View 2 Replies

Flash To Detect User's Bandwidth / Depending Size Of Bandwidth / Stop Loading / Continue With Load?

Nov 24, 2009

Is there a way for flash to detect a user's bandwidth, and depending the size of bandwidth, stop loading, or continue with the load? Now that I'm thinking about it, this would probably be a javascript detection script and if the bandwidth is high, load .swf, if not load a .jpg?

View 3 Replies

Loop Until The User Clicks A Button?

Jun 7, 2009

I'm converting some old Director/Shockwave animations to Flash, and I'm setting up a navigation system. I have a simple animation that runs from from 1 to frame 110, and I'd like it to loop until the user clicks a button. The timeline goes on beyond frame 110 with other stuff. In an "actions" layer in frame 110, I have the following
 
gotoAndPlay(1);
 
I thought that this would lead to the looping, but it doesn't. The movie just moves on beyond frame 110. Just as a test, I put the following at frame 110 instead.
 
stop();
 
and when I test the movie, it doesn't stop. The commands don't seem to be seen.

View 12 Replies







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