ActionScript 2.0 :: Make Function Example Be Repeated 5 Times With Delay Of 3 Seconds In Between?
Dec 26, 2005how can i make a function example() be repeated 5 times with a delay of 3 seconds in between?
View 8 Replieshow can i make a function example() be repeated 5 times with a delay of 3 seconds in between?
View 8 RepliesHow can I delay this function to happen 5 seconds AFTER I rolled my mouse over:
[AS]
on (rollOver) {
_root.mc_fotos.onEnterFrame = function() {
this._x -= ((this._x + 2800) / 4);
[Code].....
How can I make an image appear (a button) after a delay of say 15 seconds?
I need the image to display after 15 seconds, and then stay. I have read to use gettimer or setInterval, but I'm not sure how to do it in my particular case. In very rough terms, I need something like this:
onEnterFrame:
setInterval to 15000 and then
_root.button.gotoAndPlay(2); (this will display my image)
clearInterval
Is it possible for me to create a button that must be clicked 4 times within 3 seconds to call a function?
View 3 Repliesi want to duplicate a line 4 times, and move each line on Yaxis, with a delay of 1sec each time. I know i must use setinterval+duplicateMovieClip, but i've got pbs :-( actually, i've got my AS code on my line :
[Code]...
I'm trying to make a timer..
When I press a button a movieclip does this: gotoAndStop(2);
I want it to go back to Keyframe 1 after 10 seconds.
How can I get this to work?
How would I make a function last 10 seconds? For example, the function would stop after 10 seconds. I know you have to use timers, but can't quite figure out how to accomplish this.
View 9 RepliesOkay my_btn will do this;
image_loader1.loadMovie("imagepath");
gotoAndPlay(frame#);
What i want to do, is, make it wait before it the timeline goes to the certain frame#, so the image_loader1 loads its image1. I'm making it wait, not because it takes time loading (which it would not, since image1 is already on the stage, loaded up in image_loader2) but the image still takes time to show on the image_loader1 (half a second).So, I want my_btn to be functioned like this that it performs its first action which is
'image_loader1.loadMovie("imagepath");' and then 'gotoAndPlay(frame#);'..
I'm an interior architect at a small architecture firm and I have been tasked with updating the firms website. I have no prior experience with flash, but have been able to learn enough to update all expcept for the portfolio section. For some reason, when I add three additional frames to the portfolio gallery timeline, it repeats the previous three frames before playing the new three. This happens only when I publish the file, when I run the timeline and view it on the stage everything appears fine.
View 3 RepliesAdding / removing children (could be 10 times every few seconds)These children also have several animations associated with them
or
Adding all children once, and simply placing them out of stage view, and calling them back when needed to the stage (these will be still be running through their animation sequence while offstage, or they can be stopped) child.x -= 10000;
I have a simple code:
on (release){
getURL ("google.com", "_blank");
{
I am wondering if when the user clicks, is there any way to delay this action from occurring for a few seconds? For example, if the user clicks, this action won't happen for 2 seconds. Is there any code I can add before or around it to make this happen?
i have a very simple animation in flash CS4. My image travels from point X to point Y over 90 frames.I would like the image to stop at frame 45 for a few seconds, before continuing.
View 1 RepliesI'm using tweenMax and I want a tween to start after the mouse has been hovering over the button for about 2 seconds.
Now, I have figured out the 'delay' function but that is not that useful because it just registers the fact that the mouse is over the button and starts the tween 2 seconds later, regardless of where the mouse is on the screen.I basically want the button to become active after the mouse has been over it for 2 seconds.
I have 40 frames on a timeline, each frame has an tweening script below:
import fl.transitions.*;
import fl.transitions.easing.*;
TransitionManager.start(week_2,{type:Fade, direction:Transition.IN, duration: 12, easing:Strong.easeOut})
And on the main timeline for the functions and buttons play/pause/next/previous is working good except, I want to delay every frame for like 10 seconds.
Code below:
stop();
// button Play/Pause navigation on timeline
stop_btn.addEventListener(MouseEvent.CLICK, onStopClick, false, 0, true);
start_btn.addEventListener(MouseEvent.CLICK, onPlayClick, false, 0, true);
function onStopClick(evt:MouseEvent):void {
[Code] .....
Right now, I have a gallery with many different thumbnails each individual movie clip symbols and not button symbols and each movie clip has a rollover and rollout function assigned to them which are all basically the same for each thumbnail.
Following is an example from a small section of the gallery thumbnails.
web04.btn04.onRollOver = function() {
this.gotoAndPlay(2);
};
web04.btn04.onRollOut = function() {
[Code]....
The above shows two groups of thumbnails grouped into individual movie clips (web01, web02, web03) each movie clip containing 3 thumbnails (btn04, sub04_1, sub04_2). I had done it this way for grouping and ease of animation.
I was wondering if it was possible to create just one function which executes the rollover and rollout functions so the script window would not be filled with so much repeated script.
I have a function which makes a call to the server to load some financial data. This data is then displayed in a grid. In order to keep displaying the latest data I keep making this server call (every 30 secs). I'm using a Timer object to do this. The problem I have is that I have to wait 30 secs when the application starts for financial data to be displayed, what I'd like to happen is that the load data call is made, then start the update timer. Is there a way to set this up or shall I use to data load calls, one to get the initial data, then one to get the updates, which is made every 30 secs?
View 1 RepliesI've a site where consumer can take a live meeting with the beauty consultant. The problem I'm facing is during the video chat. Basically there is a delay of 5 seconds between Video and Audio when I access the site from out of my network but when I access it within my network (VPN) then it's work fine.
View 14 RepliesI've build a simple video chat application. The problem is that there is a delay of seconds between video display i.e. user1 video motion change displayed bit late at the user2 window. I'm using FMS 3.5 and FLEX.. IS THIS PROBLEM RELATED TO THE BANDWIDTH. My FMS bandwidth is 256kbps.
[Code]...
I just need a simple way for flash to delay the execution of a group of actions for a few seconds.
Here is the code I need delayed:
_root.randomnumber=(random(20))
if (_root.randomnumber<=8){_root.commentbox="Hit!"}
if (_root.randomnumber<=8){_root.enemyhp-=15, nextFrame()
}
else {_root.commentbox="Miss!"
}
I'm building a continous move in flash, and I'm displaying some text and images and want to hold the timeline for about 20 seconds and then resume play again. I'm trying to write a simple timer in AS to keep from having to create 10000 frame long movie clips. Here's what I have so far:
stop();
this.onEnterFrame {
time = getTimer();
if (time == 20) {
play();
}}
Unfortunately, this isn't working for me, and 'm unsure why. I suspect two things,
A: my "time" var takes only a snapshot value of the timer and not a continuous value, so the timer never reaches the value of 20. Or,
B: I have somesort of syntax wrong and the if never gets a chance to load.
my normal work day involves screen sharing with a programmer while we engineer the software.We are currently working on a site that involves flash .as3(created with flash CS3) talking with an .asmx web service (created in Visual Web Developer 2005) that talks to a sql (2008)database.When can push or pull data from the database successfully, but we are experiencing a 15 second delay if more than one request from the database is made at the same time. i.e. two customers login at the same time, or one customer logs in and another submits changes to their account.
The second request will not be instant until 15 seconds have elapsed In other words, if someone sends logs in and another person logs in 10 seconds later, the wait will be 5 seconds.Of course, the delay is cumulative...so if 3 people log in simultaneously, there is a 30 second wait. Gross.This only occurs when we are trying to access the database...flash and the web service seem to talk great together otherwise.
Basically I want to recreate a sound installation that I made a couple of months ago which used Logic Express and a Tape Delay effect to take ambient sound captured by a mic, delay its output by 3 seconds, and then play it into the headphones. All without recording anything and in realtime.I've basically got this far, which lets me hear the mic input through my headphones loud and clear. Now all I want to do is apply a 3 second delay to the input before it outputs. Do I have to send the audio to a buffer where it can be constantly stored and rewritten?
Code:
//Create a new Microphone
var mic:Microphone = Microphone.getMicrophone();
[code].....
delay the timeline for lets say 10 seconds when it enters a frame?
View 9 RepliesI am creating a driving game using the following method to drive the car forward: if (Key.isDown(Key.UP)) {speed += 1;} I also want to call a function when the key is pressed athough if I add a function call the function gets repeated as long as the key is pressed and I only require it to run once?
View 1 RepliesI'm experiencing an annoying issue with a movie clip button. The movie clip is linked to a class which adds a rollover and rollout effect. The issue I'm having is that, even though the button is in frame 1, the button doesn't react to the mouse for some seconds into the movie. The only thing I can think is that it's the class itself, but I'm not certain. Here's the class:-
[Code]...
i have a slideshow with a delay of for example 3 seconds, and a preloader which is a line with a 100px final length.i start preloading next image.now if the time until next image loads is longer than slideshow delay, i will show next image as soon as it loads.if the time until next image loads is shorter that than slideshow delay, i want to wait additional time until delay and then show the image.the problem is how do i represent smooth line width grow (being enter frame or tween) by calculating/comparing 2 values together (delay and loader percent, which goes from 0 - 100) ?if my line growth represent just a slideshow delay, then when it gets to an end, if next image still hasnt loaded, then it wont look good if line has come to an end, but i still have to wait.
View 4 RepliesI was wondering how I can delay (2 seconds) a video to play in a Flash Video Player? I know one way is for me to add blank frames but I would like to know some other options.
View 2 Repliesimport fl.transitions.Tween;
import fl.transitions.easing.*;
var homemanTween:Tween = new Tween(homeman_mc, "x", Elastic.easeOut, 1000, 50, 3, true);//frist tween
var adobeTween:Tween = new Tween(adobe_mc, "alpha", Regular.easeOut, 0, 1, 3, true);//second tween
how can I animate the 2nd tween after 3 seconds when 1st tween stops.
I want to use a function for several times in a script(for several button)
View 6 Repliesi have a function 'a' with array 1x2, 1x3, 1x4...every step its 1x2 > answer1x3 > answer..ans so onif answer correct i call my function 'a' again.
View 2 Replies