ActionScript 3.0 :: Make A Function Lasting 10 Seconds?

Nov 16, 2009

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 Replies


Similar Posts:


ActionScript 2.0 :: Make Function Example Be Repeated 5 Times With Delay Of 3 Seconds In Between?

Dec 26, 2005

how can i make a function example() be repeated 5 times with a delay of 3 seconds in between?

View 8 Replies

Flash :: Timeline - Movie Only Lasting 1 Second?

Jul 22, 2011

I'm working on an autorun CD, and the first step that I tried to do was to publish the file I have. I've made a small index for a catelog I'm working on, and when disc is put in the persons computer, what is suposed to happen is a flash made index comes up with options to view catelog or exit or go to website etc. I just published the file, selected windows projector (exe) and published it. I found the file easily enough, but whenever I double click to open it, the screen for the index flashes once and then closes. I've never used Flash before, so I'm not sure why its doing this.

The only idea that I possibly have is that there is an issue with the timeline. I dont really know how to use timelines. The only thign that is supposed to really move in the index is a line of scrolling text at the top (which I edited within the actual animation itself so nothing shows up for duration on the main timeline, but the scrolling is supposed to last for 40 seconds). When I test it in Flash it works fine, the screen comes up, text scrolls over and over, and it stays open.

Right now my timeline looks like this: timeline

View 1 Replies

ActionScript 3.0 :: Display A Countdown Timer - Lasting 3 Minutes

Jul 10, 2010

I'm on the last stage of developing my game, and I need to display a countdown timer, lasting 3 minutes. I want to display the time counting down in the format "3:00" and then when the timer hits the full 3 minutes an event is fired and it stops, and I display a few other things along with it in the same function. The difficulty I have is actually doing the bit where I display the timer and update it accordingly. If there is any genius out there who can do this (In AS3) then you are my new best friend. I only have a few hours till my submission deadline, and this thing is KILLING ME!!! hypothetically.

View 6 Replies

ActionScript 3.0 :: Run A Function After 5 Seconds?

Dec 10, 2009

how to run a function after 5 seconds.
 
All i'm trying to do is make some text dropdown after a set time.
 
Here's my code so far:

[Code].....

View 8 Replies

ActionScript 3.0 :: Run Function For 3 Seconds?

Jun 27, 2010

I'm trying to run a function for only three seconds, but cannot think of a solution. The timer seems to run after three second and not for three seconds.

View 1 Replies

ActionScript 1/2 :: Repeat Function After X Seconds?

Nov 21, 2010

I just wonder if I could make the object "car" to repeat doing this:
 
function start_car(){
_root.car.onEnterFrame = function(){
_root.car._y +=15;
};
};
setTimeout(start_car, 1000);
 
I want it to begin at y=0 and x=0 after like 7 seconds and then repeat going down the y axis as you can see in the code.
 
So the car movieclip starts moving slowly from the top going down then  after like 7 seconds when it's out of the scene it begins at e.g x=0 y=0  and going down for 7 seconds then starts at x=0 y=0.... etc, so it  keeps looping.

View 1 Replies

ActionScript 3.0 :: Execute This Function Every 5 Seconds?

Jul 14, 2011

I've tried using setInterval() but I just can't get it right... This is the function I want to execute every 5 seconds:

function next_(event:MouseEvent):void{
var sliderPos = sliderMC.x;
if(sliderPos != -696){[code3]..........

View 11 Replies

Actionscript 3 :: Function Active After 3 Seconds?

Jan 23, 2010

I have 2 functions going in as3:

function blueDownBounce (e:MouseEvent):void {
var blueDownY:Tween = new Tween(blue, "y", Regular.easeOut, -49, -19, 1, true);
}
blue.addEventListener(MouseEvent.MOUSE_OVER, blueDownBounce);

[code]....

I am trying to make it so that these functions are active after 3 seconds and they stay active for the whole time it is stopped on that frame after those 3 seconds. I know you have to make a timer and make it dependent on that timer but it wasn't working out well.

View 1 Replies

ActionScript 2.0 :: Repeat Function After X Seconds?

Nov 21, 2010

I jst wonder if I could make the object "car" to repeat doing this:

ActionScript Code:
function start_car(){
_root.car.onEnterFrame = function(){

[code].....

View 1 Replies

ActionScript 2.0 :: Every 5 Seconds A Function To Be Called

Feb 25, 2009

In the game I am building I need every 5 seconds a function to be called. The function looks like the following:[code]How would I go about making a time that pretty much counts to 5 and then resets itself again?

View 5 Replies

ActionScript 3.0 :: Dropdown Text Function To Run After 5 Seconds?

Dec 10, 2009

I trying to work out how to run a function after 5 seconds. All I'm trying to do is make some text dropdown after a set time.

Here's my code so far:
Code:
import fl.transitions.easing.*;
import fl.transitions.Tween;
var myText:TextField = new TextField();
var myFormat:TextFormat = new TextFormat();
var dropText:Tween;
var dropTextTimer:Timer = new Timer(5000, 2);
addChild(myText);
[Code] .....
At the moment the text drops down as soon as it loaded.

View 2 Replies

ActionScript 2.0 :: Timeout Function - Pause For 8 Seconds?

Mar 25, 2010

I have a movieClip that is basically a slide show.It is controlled by AS that is on its own timeline. It moves forward on its timeline, then a few frames later, I have it pause for 8 seconds with:

Actionscript Code:
stop();setTimeout (function() {play();}, 8000);

It then resumes playing and,a few more frames later,I have it jump to a different random slide. This all works fine. There are other frames on the MAIN timeline that do not contain this moveiClip. The problem is, if I go to one of those other frames in the main timeline, the above movieClip function is somehow still active, and after the 8 seconds it sends the play command. In this case, it causes the MAIN timeline to start playing.

View 4 Replies

ActionScript 3.0 :: Timer Executing A Function Every X Seconds?

Jul 30, 2009

I'm having no success getting a timer to work, let alone one that executes a function every X seconds (say every 10 seconds).
 
[Code]....

View 1 Replies

Actionscript 3 :: Call A Flash Function Every 20 Seconds?

Nov 28, 2011

How do you set a function to increment in AS3 Flash. I am trying to start the incremented function when my video starts and then run the same function every 20 seconds until the video stops.

[Code]...

OTHER items are started and set within this function that do not have to do with the incremented function.

View 2 Replies

ActionScript 2.0 :: Flash To Refresh Function In Every 1 Seconds

Apr 24, 2007

here is my code

[Code]...

i want flash to refresh this function in every 1 seconds. how can i do that?

View 5 Replies

ActionScript 2.0 :: Call A Function Every Number Of Seconds?

May 11, 2007

I need to call a function every number of seconds or so.. I'll just show some code:

Code:
image0.folder = "folder1/";
image1.folder = "folder2/";

[Code]....

basically, what it does is when i click, a block box (textholder), fades in, then after a few seconds (in this case, 2), it fades out again.. it works fine on the first click, but after more clicks, the interval duration seems to be getting smaller, up to a point where it is zero, and nothing happens.

and I need to use another setInterval() function (to call the changeTxt() function), will that affect the setInterval function i have up there now? i've linked an swf, to better show what i mean. [URL]

View 2 Replies

ActionScript 2.0 :: Wait A Few Seconds, Then Execute Function?

Mar 26, 2009

is it possible to insert a delay before a function is executed.Here is a simple sample code where it could be used:

Code:
myButton.onRelease = function () {
//// INSERT A 3 seconds DELAY BEFORE THE gotoAndPlay is executed

[code].....

View 7 Replies

ActionScript 3.0 :: Function To Occur When The Timer Fires After 5 Seconds?

Oct 30, 2009

I had a function that occured on mouseclick called go_out. I want this function to occur when the timer fires after 5 seconds. After the 5 secons I receive this error:

[Code].....

View 4 Replies

ActionScript 2.0 :: Display For A Few Seconds And Fade Out Using _alpha Function?

Jan 13, 2006

I have eight images in a MC that I would like to sequentially fade in, display for a few seconds and fade out using _alpha function. So far I can fade one in with this AS:

img1._alpha=0
img1.onEnterFrame = function() {
this._alpha +=10;
}

Assuming my instances are img1, img2, img3, etc, etc... how would I go about sequentially fading each instance from 0 to 100, letting it display on the stage for a few seconds and then fade out (like a slideshow)?

View 7 Replies

ActionScript 2.0 :: Use GetTimer() To Call A Specific Function In Every 3 Seconds?

Dec 14, 2007

I calling a function using setInterval()... however, it behaves differently in IE7 and Firefox. It is working fine in Firefox but not in IE7.Can I use getTimer() to call a specific function in every 3 seconds...?

View 1 Replies

ActionScript 3.0 :: Make Invisible For X Seconds Upon Click?

Sep 30, 2010

I am trying to write a program in which 2 random pictures appear on the screen, and when you click on a specific one of the 2, the other disappears for 250 ms, and then the whole thing starts over with 2 new random pics. I have everything working the way I want EXCEPT for the vanishish-for-250-ms part.Specifically, the program is supposed to display 1 picture from 1 group and 1 from a 2nd group, and when you click on the pic from group 1, the group 2 pic is supposed to vanish for 250 ms. Each group has 16 pictures, so the code as it stands now basically randomly picks whether the group 1 pic will appear in movie clip #1 or #2 (faces1_mov and faces2_mov), randomly pics a group 1 pic, displays it in the movieclip it randomly chose, and then puts a random group 2 pic in the remaining movieclip, so the program has to know which clip has the group 2 pic in it and make it disappear when the other clip is clicked.Here is my code:

ActionScript Code:
import flash.display.MovieClip;
import flash.utils.Timer;

[code]....

View 1 Replies

ActionScript 2.0 :: Make The Correct Answers Appear After 5 Seconds?

Sep 19, 2005

I'm making 8 input boxes with 8 different answers. Users can key in their answers in the input boxes. The order of the 8 answers will not affect their results. However when users get the wrong answers, the wrong answers will be deleted. My question here is, when the wrong answers are deleted automatically, how do i make the correct answers to appear by themselves after 5 seconds? Below is my code that i put on a "check answer" button.

on(release)
{
answers = new Array(8);
answers[0] = "professional selling";[code].....

View 4 Replies

ActionScript 2.0 :: Make A Circle Rotate Over 6 Seconds

Feb 27, 2008

I want to make a circle rotate over 6 seconds. Does anyone know how to code this in AS 2.0 so that it happens over the 6 seconds. Basically I want the twelve oclock position on the circle will rotate all the way around back to the top over the 6 seconds.

View 2 Replies

ActionScript 2.0 :: Make Popup Mc Disappear After 2 Or 3 Seconds?

Apr 9, 2008

I would like to know what the best way to implement the following feature is...

I have a popup dialogbox that comes up when the user clicks an object on stage...I want this popup to disappear or "close" if the user does not click the "close" button after 2 or 3 seconds...any takers?

View 1 Replies

ActionScript 3.0 :: Make It Wait For A Couple Of Seconds?

Feb 23, 2010

I'm rather new to AS3 and have been tasked with a project, the project requires reading in values from an XML file created by PHP, this works fine if the XML file is available, and is just being updated by PHP, however, when flash calls the PHP page that creates the XML file for the first time, it doesn't give PHP enough time to make the XML file.

View 14 Replies

ActionScript 2.0 :: Time Function - Seconds Overlaps In Transparent Background

Dec 26, 2011

The below code displays time in hours:minutes:seconds format. This code works fine as long as backgroundcolor of the timetxt text field set to true. But as I want to set my own background for timetxt field, I have kept timetxt field's background as transparent. When it is transparent the seconds overlaps everytime when it is getting updated. It is fully dynamic. You can copy this code, paste in frame1 and test. But set your background as black as the font color is white.

ActionScript Code:
var today_date:Date = new Date();
var my_dtfmt:TextFormat = new TextFormat();
my_dtfmt.align = "center";
my_dtfmt.size = 20;
my_dtfmt.font = "Arial"
[Code] .....

View 4 Replies

ActionScript 2.0 :: Delay Function To Happen 5 Seconds AFTER Rolled Mouse Over?

Feb 12, 2004

How 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].....

View 4 Replies

ActionScript 2.0 :: Make Button Wait 10 Seconds Before It Does The GetUrl?

Mar 24, 2010

How can I make this button wait 10 seconds before it does the getUrl?

Code:
process.onRelease = function(){
getURL("/our-process/brand-building","_self");

[code].....

View 1 Replies

Professional :: Make Logo Appear After 10 Seconds Of Loading The Background?

Jul 4, 2010

I have an animation Logo flash movie which I want to appear after 10 seconds of loading the background image (Panel_mc)?
 
I am using Actionscript 3 to load the Logo.swf movie. The following is the whole code that I have on my action script page:
 
stop();import fl.transitions.Tween;import fl.transitions.easing.*;
var PanelTween:Tween = new Tween(Panel_mc, "y", Elastic.easeOut, -400, 20, 5, true);
var l:Loader=new Loader();addChild(l);l.load(new URLRequest("Logo.swf"));l.x = -20;l.y = -20;
l.contentLoaderInfo.addEventListener(Event.INIT, growLoader);
function growLoader(evt:Event):void {     l.width = 320;     l.height = 185;}
 
Note: I need it because first the background will animate so no one can pay attention to my Logo. Once the background stops animation, My logo needs to be start (animation)?

View 3 Replies







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