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
Similar Posts:
Apr 24, 2004
I'm using some modified code from a chapter exercise (from a text book) to play four separate MP3s external to the FLA. Here's an example of what happens when a button is clicked:
[Code]....
The problem is, there's something of a noticeable stutter when the MP3 reaches the end, just before it starts up again. The first MP3 (contrary to the others), is a seamless ambient sound which ought to sound perfect in the FLA, but doesn't, again, because of the slight stutter in starting it up again. Is there a better way to do this? I thought, perhaps, this would be fixed if I removed the "stop();" line and instead had it play the next frame, which would invariably send it back to the previous one, but this changed nothing.
Is there a better method to use? Even with the other three MP3s, which aren't seamless, I want to loop, unless and until the user clicks the 'Mute' button. My last thread (about setInterval)received no replies, but I'm hoping this will, especially as this final project is due this Wednesday and I'd rather it not have this slight hiccup in it.
View 2 Replies
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
Sep 7, 2011
I have a 400 x 300 video on frame 20 when a user clicks a button named double_btn I want them to go to frame 21 with the video still playing but double the size. Any ideas on how to do this?
View 1 Replies
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
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
Jan 13, 2010
I am using an array to load flvs when a user clicks a button, however the scrubber (seek bar) doesn't reset back to the beginning of the next video and the play button turns to a pause (meaning the user has to notice that and click the play button, which I don't want them to have to do). Is there a reset function that I can use for the seek bar and a way to keep the play button on and not switch itself to pause?
Code: Select allimport flash.events.*;
import fl.video.*;
//display.bufferingBar = bufferingBar_mc;
[code].....
View 6 Replies
Mar 29, 2010
I have an animation made on After Effects and I want to know how to trigger each step of my animation as a user clicks on a button.
If the user clicks on contact my animation would go to the contact animation.how do I do that?
View 3 Replies
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
Jan 14, 2011
I am new to actionscript 3. I have created buttons with up/over/down states. The button changes colour during the over/down frames.How do I keep the over or down state active until the user clicks another button?
Right now when the user puts the mouse over the buttons, they change colour, but it goes back to the original colour once they click off. I would like it to remain on the changed colour so that the user remembers which button s/he's pressed until the another one is clicked.I came up with the following code in actionscript 3 and got it to partially work:
ActionScript Code:
btn1.addEventListener(MouseEvent.MOUSE_UP, startTransparent)
function startTransparent (e:MouseEvent):void{
btn1.alpha = .6;
}
So when it's in the down state, I get the transparent state and stays there. But how do I get it back to normal when the user clicks on another button?
View 7 Replies
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
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
Feb 21, 2004
Whats the AS for a quit button? I want to open a small window when the user clics on a button, and have a quit button on the corner
View 4 Replies
Apr 21, 2004
I have a movie that i want to close when the user clicks a button, i know to use the fscommand(), but i duno what to put inside the brakets:S. i tyred 'close', 'close.screen','scree.close','unloadMovie'...etc but notings working, what im supposed 2 put in there?
View 2 Replies
Jul 21, 2005
What I want to achieve is active links like in HTML websites.I have 3 buttons on the stage, when the user clicks on the first button it should be highlighted and should remain in that position till the user clicks on the next button. When he clicks on the 2nd button the previous one should come in normal state and the 2nd one should become highlighted and so on....
View 3 Replies
Oct 11, 2007
i wrote many things (something like back functions) but i failed. my code and my swf is below.
Code:
stop();
import mx.transitions.Tween;
[code].....
View 1 Replies
Jul 13, 2011
I have a textbox and a button on the stage and what i want is, when the user clicks on the button the font in the textbox to be changed. This is the code I have, but nothing is happening when I click the button.
SinFont is the embedded font.
Code:
btnChange.addEventListener(MouseEvent.CLICK, changefont);
function changefont(event:MouseEvent):void[code].....
View 1 Replies
Oct 6, 2004
I've been working creating an interactive display map for a client. I've figured out the controls I'd like to use for moving the map, but I'm having trouble with the zooming features. What I'd like to do is have the user click on the "+" button to zoom in and the "-" button to zoom out. The problem is the map is not centered when the user clicks either button?
View 3 Replies
Nov 27, 2004
I am trying to get a movie to update it's color after the user clicks on a button and changes the value of Red Green Blue.
How do I set it so that it keeps checking and changes it's color once the button has been clicked.
this is what I have on my movie.
Code:
onEnterFrame = function() {
my_color = new Color(this.window1);
my_color.setTransform(_root.myColorTransform);}
View 8 Replies
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
Nov 2, 2010
This seems like someting I should already know but I am working on a user interface that I want to be skinable. I have about 8 different graphical elements and I want to change the appearance of these 8 different movieClips just by clicking a single button. I thought I would just create a new keyframe in my main time line and then manipulate the movieClips but that changed the appearance of the movie clip on frame 1 as well. Clarification: I want to change the color of my user interface background and I want to change the color of some clickable images as well. I want frame 1 to have a white background and I want frame 2 to have a red background. Do I need to create more movie clips and drag them onto my stage or can I just use the existing movieClips since all I really want to do is change colors?
View 5 Replies
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
Jun 24, 2005
I am trying to duplicate a movie for a bullet hole when the user clicks a button hole is sapposed to appear but its not working. here is the code I have inside my bullet hole
onClipEvent(load){
i = 0
}
onClipEvent (mouseDown) {[code].......
View 6 Replies
Mar 28, 2012
I have been trying to make a score counter for a small game where the user clicks on a button on the stage, each time the user presses the button the score increments by 10, however I cannot get the score to display on the dynamic text field.
var score:uint;
//scoreCounter is the instance name of the dynamic text box
function updateScore():void{
score += 10;
scoreCounter.text = score.toString();
}
View 2 Replies
May 18, 2011
I have an arrayCollection with the following structure:
[Code]...
the AC is defined as follows:[Bindable] private var projectErrorsAC:ArrayCollection = new ArrayCollection;
I'm using this AC in a repeater to display each error. After each error is shown, I've placed an "Accept" and "Deny" button. Once the user clicks either one of these buttons, I'd like to call a function that removes the particular error from the AC. Here's what I have so far:
[Code]...
View 2 Replies
Apr 11, 2005
I have buttons (transparent) and little mc animations (tweened the good old fashioned way) that play underneath them on onPress.What I want to do is make it so that when you press say "Home" the animation will stay in the "on" position until you click something else, anything else. That is to say, I want to say "This button just got clicked, play the animation, keep it in the "active" state while the user is looking at the page, and play the "inactive" state when the user clicks ANYTHING else."Right now, I've coded each individual button like this:
on(release) {
content.loadMovie("about.swf");
buttonthing.gotoAndPlay ("off");[code]....
View 2 Replies
Sep 11, 2009
looking to create an image/mc slider that moves form right to left via user clicks of a left and right button.I would assume I would create an array to hold a series of mc's in (my images) and then tell the left and right buttons CLICK events to move linearly through the array (displaying next in line and previous etc.
View 1 Replies
Aug 22, 2011
I use Flex 4 for writing swf part of my application... So I have some swf files loaded in container, and what I need is allow to change that swf by clicking in it.How can I detect in which swf user clicks?
View 1 Replies
Dec 11, 2009
I want the ability to go back to frame 1 when a user clicks anywhere on the stage that doesn't contain an object. Is this possible?
View 2 Replies
Jul 14, 2010
What is the best way to delay user mouse clicks?
For example, I don't want the user to be able to click really fast or hold button down (a small delay between firing).
View 1 Replies