ActionScript 2.0 :: Wait Play-head For 5 Second In A Frame?
Dec 10, 2003how will be actionScript for waiting the play head in a frame for 5 second ?
View 5 Replieshow will be actionScript for waiting the play head in a frame for 5 second ?
View 5 Replieswould like flash to trace something when the play head goes over a frame label named "test" I would also like to have the code placed on the first key frame. I realize that the easiest way out would be to place the trace statement on the frame with the label on it but I'm trying to run this with a listener.
PHP Code:
stage.addEventListener(Event.ENTER_FRAME, checkFrame,false,0,true);
function checkFrame(event:Event):void
[code]....
The movie clip is called "theScene" and I have it created on Frame 60 of a movie clip when a button triggers the playhead to jump and stop at Frame 60. However, upon leaving that frame, it will not disappear, so I want to unload it upon leaving that frame.I put in the following code across all frames of the movie clip in its own layer:
Code:
if (this._currentframe !=60)
{
[code]....
I would like play head of a movie clip to return to a certain frame of that clip so a MC inside it would loop. I now have: stop(); as the action.
View 2 Replieshow would you play the next 5 frames if the space bar was clicked and then stop the playhead?
View 4 RepliesI'm trying to get this function to target myClip_mc and movethe frame head to another frame label.
var counter:Number = 1;
//textBeGone
invisible_btn.onRelease = function(){
counter++;
if(counter % 2 = true) {
[code].....
find out where the play head is?
I'm trying to do something like this
Code:
if(_root.movie.currentPlayHeadPosition == 1) doSomething();
Its been a long time since I last did any flash, can anyone jog my memory on how to get the current frame?
I am using flash CS4 and ActionScript 3.0 i have a movie clip on stage that i have close when the user hits a button how to i also tell the maine time line to go to a frame when this button in the Movie clip is pressed?
View 2 RepliesI make a flash movie. I want to create a progress bar with custom play head that when we drag it, the swf file will adjust appropriate position, similar to the progress bar in comman media players. My main swf file has about 2000 frames
View 2 RepliesI'm trying to make this script work in which two things should happen onRlease of a movie clip. The "transition" plays but frame 18 doesn't..even though the path is right. I even tried frame label even that doesn't work.I must be doing something wrong, maybe you can detect from this script. The script is on the clip itself.[code]
View 7 Repliesanyone can offer me a way of housing an XML return in a seperate object, so that the flash movie in question doesn't hang around waiting for the feed to come back.The problem is we have an asp app which is returning the status of about 1000 citrix terminals at once.... while this only takes 10-15 seconds to return, any kind of animated loader i build into the movie, stops playing while flash holds on the XML return, as the http response status never responds dead, but says "waiting" instead.Any kind of way of adding the XML load script as an object listener maybe...?
View 3 RepliesI am trying to acomplish a very simple task with AS 3 with no results. I have a simple time line with a stop button. All I want to do is to stop the play head wherever the viewer clicks the button, and then to start again from there when the button is clicked again.
View 4 RepliesI have a movie clip that loads and when it is done playing it has a close button that unloads the movie clip... I want to add code to this button that moves the play head to frame 20 of my main timline using actionScript 3.0
View 10 RepliesI have a textarea named "debug" on frame 2 that does not exist on frame 1Using this code:
Code:
function outputHello(){
debug.text="Hello";
[code].....
how will be actionScript for waiting the play head in a frame for 5 second ?
View 5 RepliesI just want to stop my timeline for 5 seconds after an animation completes.I try with SetInterval, but i do mistake somewhere
View 1 Repliesjumping from from scene to scene once the play head reaches the end in AS3? Scenes do not play one after another like they used to. Below is some code I found that works with errors, however I'm not using a MC like the code displays "mc1". Not really sure on how the MC fits in? import flash.display.Scene; var scene:Scene = mc1.currentScene;trace(scene.name + ": " + scene.numFrames + " frames");
View 4 Repliesi have a button on the stage...when clicked i want it to wait 2 seconds, then gotoandplay a porton of another movieclip.
View 4 Repliesi have a button on the stage...when clicked i want it to wait 2 seconds, then gotoandplay a porton of another movieclip
View 4 RepliesI have a script that takes lots of content and builds 1000s of MovieClips on the stage, does lots of drawing etc. Due to the high amount of work needed when the frame first loads this can sometimes be delayed by a second or two. The more the user uses the application the longer and longer this is likely to be (more data to siphon through and build). My question to you is how do I make sure the frame doesn't show (serve a loading image or something) until it is built? I don't want the user to see the skeleton of the page and then everything appear a second or two later.
View 1 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 am trying to play an MP3 using Actionscript 2. I have the following requirements: I don't want to wait for the MP3 to load before playing it. I want to know when enough of the MP3 has downloaded that I can start playing it. I don't want the MP3 to start playing immediately: I need to control when the play starts. An example scenario is that I need to start playing a 30-second MP3 exactly 8 seconds from now (at the top of the minute, let's say). Depending on the connection, I may or may not be able to download the entire MP3 by then, but I can almost certainly download enough to start playing without interruption.
[Code]....
I am currently doing a project which involves quite a large swf file at the end. I was wondering if anyone knows a way that i can easily make it so that at the begging, when first loading up the flash, it just loads the menu and a couple of other frames, but when i go onto play the game, it will load each level just before you play it, so that the player doesnt get bored from waiting right at the begging for a while when they can wait 5 seconds before each level.
Im pretty sure ive seen this done before but im not sure whether it is preparing it in that time, or downloading it. I want it so that there will be a 10-20 second wait for the game to load up, then you go to the menu, press play, loads the next frame, or certain number of frames, you play that level, then it keeps on doing this for all the levels.
I wrote the following code to have flash stop on frame 1 and wait for the click on the start button. I will use the animation in Connect Pro and without a Start button, the audio starts before the video. Here is the code and following is the error I get in the Compiler when I play the animation. The button does have the instance name play_btn :
play_btn.addEventListener(MouseEvent.CLICK, buttonClicked);
function buttonClicked(event:MouseEvent):void {
gotoAndPlay(2);
} stop();
The error I get is:
Location: Scene=Scene1, layer=actions, frame=1, line 3
Description: The class or interface 'MouseEvent' could not be loaded.
Source: Function buttonClicked(event:MouseEvent);void
Okay 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 have my flash on multiple scenes, and would like to play an animation when clicking on the navigation button before switching to a different scene.
I'm halfway to accomplishing this.
Here is what i used
Code:
_root.gotoAndPlay("changepage1");
_root.onEnterFrame=function(){
if(this._currentframe=="changepage2"){
[Code]....
The above code is on a blank keyframe. Changepage1 is the start of the animation and Changepage2 is the end of the animation.
Upon clicking the navigation button it plays the above scenes.
However it doesn't change scenes to scene "Home2".
I have a flash banner that includes a movie clip of the logo being animated. I want the logo animation to only run at the beginning of the main "movie". Currently I have to find the length of the entire movie (for ex. 500 frames) then put a key frame in at the 500th frame of the logo movie clip. I know there has to be a correct way to do this...Do I add a frame name at the end of the main timeline and somehow in AS in the logo movie clip say "when you reach X goToAndPlay(1);"?
View 1 RepliesI'm using loadMovie() to load external swf's and then send the swf to a specific frame, depending on the button that is pressed.
Code:
on(release){
_root.mc_mainloader.loadMovie("Main.swf")
_root.mc_mainloader.gotoAndPlay("fadeup");
}
Unfortunately it ignores the second line, which appears to be because the movie hasn't loaded by time it gets to the next line. As a work-around I made an interval to check for the movieclip width to be more than 0 and then run a function that chooses the desired frame, but this is very unreliable. Is there a simple way to load the clip and wait until it is finished, then immediately choose a frame on load?
I need a bit of as that "on enterFrame..." the timelime will wait for a few seconds before moving to the next frame.
View 3 Repliesi have a movieclip on stage. it has 3 frames but is stopped with "stop():" so it only shows the first frame on mousedown i want it to play frame 2 for a duration of 1 frame then frame 3.
View 3 Replies