ActionScript 2.0 :: Adjust This To Play For A Set Amount Of Time Then Stop?
Nov 5, 2004[url]...
Can anyone tell me how I would adjust this to play for a set amount of time then stop... or how I would set my timeline up for that to happen?
[url]...
Can anyone tell me how I would adjust this to play for a set amount of time then stop... or how I would set my timeline up for that to happen?
is there a line of code to pause or stop the timeline for an amount of time?
View 4 RepliesI have a movie clip loaded using action script 3 at the start of my animation, I want ito to end at the 120th frame. But I can't use the stop(); command because it will also stop the rest of my animations from the 121st frame onwards. how can I stop the movie clip without stopping the rest of my animations?
View 5 Repliesgive 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 RepliesI have a piece of code, and in that function i call to another function that has 3 parameters.now i've decided that i want that last function to be called after a couple of secs, instead of immedietly. I can't simply use a timer, and addEventlistener, because then i cant give parameters.
View 14 RepliesI am using CS3. Here is what I am trying to accomplish:
On my loading page I have the following standard loading code:
Code:
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
[Code].....
Because on some connections this can take quite some time, I want a link to appear after a specififc amount of time, say 10 seconds? Kind of like a, "loading too slow? Click here for whatever."
how to accomplish this within this loading code and frame?
I've got a movieclip animation which is added to the stage at the start of the .swf.Its an introduction to the game, and the user is encouraged to click on the movieclip to start the animation.Once the animation is finished I'd like the movieclip to be removed from the stage.Do I need to setup some sort of event handler which listens out if the movieclip has finished then start a function once its finished to remove it from the stage? Which methods look out for movieclips finishing?
View 1 RepliesI need to have a button appear after 30 seconds. How would I go about doing this?
View 2 RepliesWhen I click a button, it opens a window with buttons in it..My aim is, after an amount of time, I want it to dissappear...I want to accomplish it by setting a counter ...for example... When I click to a button 1
{
when click "button1"
jump to "scene1"; set counter=0;
[code].....
On my loading page I have the following standard loading code:
Code: Select allstop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
[code]....
Because on some connections this can take quite some time, I want a link to appear after a specififc amount of time, say 10 seconds?Kind of like a, "loading too slow? Click here for whatever." how to accomplish this within this loading code?
If you press a button within a certain amount of time, you are taken to lets say frame 2, if the time expires, you are taken to frame 3.I have used up all of my "i'm still a newbie at flash", so I'm just gonna tell you the truth and say that I haven't done any AS (or flash for that matter) in quite some time, so I guess I have to get busy and learning actionscript.
View 2 RepliesIs it possible to use actionscript to swap the frame to a different one after a certain amount of time i.e 30 seconds.
View 2 RepliesI was wondering, how do I display text for like 2 seconds or something, then make it disappear?Another question is, how do I set a timer that prevents a function from running within a time limit (2 seconds again) after it ran? Like if a function is triggered by a Key_DOWN, what would a code be to prevent it from running again until that 2 seconds is up? This question is for a 'reload' in a shooter. Is there any other way to approach this?
View 14 RepliesI got the circle to scale up but need assistance to have the circle scale down after x amount of time.
[Code]...
I have a flash movie on my index page but as the user navigates through the site and then goes back to the home page, I don't want the intro to replay. I have fixed that using shared object so that if it has already played, it skips to the end of the animation...here is my code:
function VisitCheck() {
var myLocalSO = sharedobject.getLocal("visitRecord");
if (myLocalSO.data.visited == null) {
myLocalSO.data.visited = 1;
gotoAndPlay(3);
trace("visit 1");
} else {
gotoAndPlay(2);
trace("visit2");
}}
VisitCheck();
Works great, except now, the intro animation on the index page NEVER plays again; I would rather have the cookie expire after the user closes the window or a certain amount of time has passed (say 30 minutes).
Time variable is "clock" and I want it to switch frames once clock is equal to three.
View 3 RepliesI have code set up that calls a function whenever my player is over its last destination in the a* pathfinding array...
public function rakeSoil(e:Event):void {
var:Cell = Grid.getCellAt(player.x/50, player.y/50);
if (cell.isWalkable == false) {
[Code]....
How do i make it so you have to hold the button down for a amount of time before going to next frame?
View 1 RepliesI've got a movieclip animation which is added to the stage at the start of the .swf. Its an introduction to the game, and the user is encouraged to click on the movieclip to start the animation.Once the animation is finished I'd like the movieclip to be removed from the stage.How do I go about doing this? Do I need to setup some sort of event handler which listens out if the movieclip has finished then start a function once its finished to remove it from the stage?
View 3 RepliesRight then I'm sure you guys can sort this out very simply. Basically I have this code that creates duplicate instances of a movie clip and puts them on stage with a few random settings where ever the mouse goes.This is cool but I want the duplicates to disappear after a certain amount of time (2-3 seconds or so) - or disappear when a certain amount of them have been placed on the stage.I have played around with the getTimer() function with no joy but I am not even sure if this is the right thing to use.
var num:Number = 0;
_root.onMouseMove=function() {
var temp = _root.attachMovie("flower","flower"+num++,_root.ge tNextHighestDepth());
[code].....
I used some code made by another user on this site to create falling snow. It works perfectly but there's one problem.I want it to only play for a certain amount of frames, but i dunno how to make it stop or disappear, btw, its my animation is all on one scene.
View 1 RepliesI've noticed that some programmers animate objects based on the difference in time. I am not sure why or even if this is logical. Does anyone know the significance? Below is a snippet of code that explains what I mean:
[Code]....
If I want to measure the amount of time that has passed in as3 between method calls. Is the highest resolution from:
var now:Number = new Date().getTime();
I have a sound clip of a clap of thunder,and I'm trying to play it throughout my whole game, but with different length of pauses in between..
View 2 Repliespause the execution of my code for a set amount of time before resuming?
View 4 RepliesI used the "loading random movie" tutorial (http:url....) to load 3 external movies. It worked great.But now, my client wants the movies to load one after the other. Each movie is interactive, but requires you to click on it, so it plays an intro and stops. Each movie is built exactly alike. So, I would like a movie to play, then stop for a certain length of time (long enough for the user to read some text). If after that length of time, the user does not intereact with the movie, then I want the next movie to play in it's place. If the user does interact with the movie, I want it to just stop at that movie.
View 12 RepliesI have a movie symbol called "dot" of a pulsating dot, but no i would like it to stop after x amount of loops/repeats of the movie symbol.
View 2 RepliesI'm looking for a simple way to have a button do 2 things:1. Play main timeline a specific amount of frameshen2. Goto a specific spot in the main timelineHow do I specify how many frames to play before the second bit happens?So far I'm trying to get something like this to do it but what to add in play()
Code:
Main.onRelease = function() {
play();
[code]....
Is there a way to have buttons pop up in random locations on the stage and vanish after a set amount of time? I'm a total noob at Actionscript.
View 3 RepliesI'm trying to run a function where after an amount of time of the mouse being idle a movieclip plays, then if the mouse moves another one plays. I have gotten my code to do this, but the last function runs over and over as the mouse is moving. I want it to run once, so the movieclip plays once. how do I do this?
here is my code,
standstill = 0;
lastmove = 0;
timeout = 3000; // 1000 ticks = 1 sec
[code]....