Flex :: Wait For A Couple Of Seconds Before Executing?
Mar 21, 2012I want my code to wait for a couple of seconds before executing. So is there any function similar to sleep in flex?
View 3 RepliesI want my code to wait for a couple of seconds before executing. So is there any function similar to sleep in flex?
View 3 RepliesI'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 RepliesI am trying to create a timer to fade in a dynamic textbox that is a dfferent size depending on the button. This is kind of complicated so if you got lost I am going to say it again a bit simplerly.I have three buttons, and when you click each a box moves to the correct size.I am trying to get a textbox that will fade in once the box has moved, proably about 3 seconds, and have the textbox a different size depending on the button.When another button is clicked, it should fade out, and then the box should move.You should understand what I'm trying to do when you look at the FLA. By the way, the textbox is going to have dynamic content from either a mysql or xml database.
View 3 Replieswhen i have the code like: lala.gotoandPlay("down");
it execute this line and immediately jump to the next line. it is possible to wait for the movieclip to run finish before excuting the next line?
one method is having the code i want to execute at the frame the movie clip stop. But is there other method such that i can have all the codes in the same frame?
Is there a way to load a file and waiting for the event listener with out continuing executing other code.
I tried using a while loop with a flag that is set by the on Complete in order to exit the wait loop.
This generates a timeout error. private var loaded:Boolean = false;
function SpriteLoader(filepath:String){
trace("Attempting to Load File:" + filepath);
FileLoader = new Loader();
var FileRequest = new URLRequest(filepath);
[Code]...
I need to have a series of four numbers appear randomly with fade in and out and stay on screen for a couple of seconds each. These are then linked through to separate movie instances that display relevant information regarding that number and then go back to the random numbers. There are options to randomly display text from an external file, but not library objects within the same movie. I have a cobbled together version using scenes and timeline animation, but it's repetitive. It needs to be more random and effective as a visual element.
View 2 RepliesI've got a horizontal bar on the screen following the mouse vertical motion. I would like for it to be transparent until the mouse moves, and then fade in to be 100% on mouse movement. When the mouse stops moving, I would like it to fade back to be 0% transparent after a couple of seconds. This what I have for the mouse follow on the bar MC...
[Code]....
With autoHide set to true I would like to have the skin show when a video is loaded then fade away after a couple of seconds.
View 5 RepliesI'm having no success getting a timer to work, let alone one that executes a function every X seconds (say every 10 seconds).
[Code]....
Is there any way to implement waiting for, say, 3 seconds in ActionScript, but to stay within same function? I have looked setInterval, setTimeOut and similar functions, but what I really need is this:
[Code]...
In case you wonder why I need this - it is a legal requirement, and no, I can't change it.
I'm New to flash and I can't seem to figure this out, I just want to make something visible for 5 seconds then make it invisible again.
[Code]...
i want to have some action script code like:
//some code here
//wait so many seconds(or milliseconds)
//then do so more code here
[code].....
Is it possible in AS3, to have 0 alpha for some seconds, then have the buttons fade in... and I say buttons, as I have two of them. But wanted to finish it all of with a nice fade-in effect on my buttons. I've found some nice fade out effects with tweening in AS3, but I need fade in - and would like for me to decide when they should do this. So far I'm pretty satisfied with my first flash file, but I do like perfection!
View 2 Repliesso i have some code that draws out a simple soundSpectrum -- Now my main timeline is only 5 frames long -- so 99% of my code is in that 5th frame.
[Code]...
I just want to stop my timeline for 5 seconds after an animation completes.I try with SetInterval, but i do mistake somewhere
View 1 RepliesI know the setInterval function makes something happen every x second(s) however, how do i make it wait for x second(s) then do something once?
View 7 Repliesis 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].....
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].....
I have the following actionscript which is working fine, but I would like to wait for some seconds each image once has reached the alpha in 100, if you see the example in the headerwhat it does is that the image fades in and when it gets to 100 starts fading out, and I want that when it gets the alpha in 100, keep it for let's say 5 seconds and then fade it out.
square._alpha = 0; whichPic = 0;
_root.onEnterFrame = function() { if (whichPic<4 && !fadeIn && !fadeOut) { fadeOut = true; whichPic++; } else if (whichPic>=4) { whichPic = 1; } if (square._alpha>10 && fadeOut) {
[code].....
How can I make this button wait 10 seconds before it does the getUrl?[code]...
View 6 RepliesI need a bit of as that "on enterFrame..." the timelime will wait for a few seconds bfore moving to the next frame.
View 3 RepliesI'm programming some tweens with actionscript and I want the flashplayer to wait 0.5 seconds between each action. I've used set interval before, but that was when I only wanted the playhead to stop, wait so many seconds. In this instance I need it to go like this:
[Code]....
e.t.c and there are 20 mc's that I need to tween. Obviously don't want to have mountains of nested code, If you could set out the syntax in your replies that would be great as otherwise I probably won't understand!
I made and if else code, that loads a movie, but want to set a time interval on the middle
here is the code
loadMovie("e-movies/microsoft.swf", "_root.juan");
_root.juan.stop();
dale = _root.juan.play();
[code]....
i commented (///) the action in the else case. How can i make flash wait 10 seconds before it repetas the script?
i have a button on the stage...when clicked i want it to wait 2 seconds, then gotoandplay a porton of another movieclip
View 4 Replieswhat the actionscript would be to make a button be clicked and held down with the mouse a certain amount of seconds before executing an action???
View 8 RepliesHow can I tell Flash to wait 5 seconds before loading my movie without using frames in timeline?[code]...
View 5 RepliesI need a bit of as that "on enterFrame..." the timelime will wait for a few seconds before moving to the next frame.
View 3 RepliesIs there an easy way to say to flash that it should wait a few seconds before going to the next frame?
View 2 RepliesSometimes while typing in a textarea in Flex many characters will be rendered at one height then at some point on that same text line the rest of the characters are rendered a couple pixels lower than the rest. Here is an example, look at the last 'I' character, its low:
Sometimes changing the font size will fix this but its not consistent and its not something I can detect (and fix even if I could). Anybody got an idea why this happens? It happens for embedded and non-embedded fonts.
I am creating a Flex application for intranet use.I need the application to execute files, with different file types (txt, emails, etc.) at specific known locations on the clients computer.Is it possible to give permissions to the Flex application to execute local files? (I have administrative rights on the clients computer)
View 1 Replies