ActionScript 2.0 :: When The Timer Hits 10 Want It To Go To Frame 2?
Mar 18, 2009When the timer hits 10 I want it to go to frame 2.Here is the script:
var clock:Number = 0;
if (Number == 10){
gotoAndPlay (2);
[code].....
When the timer hits 10 I want it to go to frame 2.Here is the script:
var clock:Number = 0;
if (Number == 10){
gotoAndPlay (2);
[code].....
Im looking to make something happen when my timer of 30seconds reaches zero. This is the code I've used: how to ad a function that will make something else happen??
[Code]...
I'm trying to write an if then statement that will loop back to frame 1 once the next frame it hits is higher than 5. For some reason it doesn't work and I could easily go to frame six and add a go to and play but, I'd like to learn what's wrong instead of doing it the easy way.
[Code]...
i have a thank you message that shows after my form mailer is sent, then about 10 frames play for a short pause which shows the thank you message. how can i make the playhead goto a certain frame once it gets to the end of the timeline? i thought it would be related to onclipevent but i couldnt find anything relevant to what im wanting to do.
View 3 Repliesi have a thank you message that shows after my form mailer is sent, then about 10 frames play for a short pause which shows the thank you message. how can i make the playhead goto a certain frame once it gets to the end of the timeline?
View 3 RepliesI'm initiating my migration process from AS2 to AS3 .After reading A LOT of tutorials and, of course, pretty much everything that mister senocular wrote I finally got something going Well until this pickle[code]...
View 8 RepliesThis doesn't work
if (lives <= 0) {
gotoAndStop(22);
}
When I change the "<=" to something like "!=" it does work. I'm trying to make it go to a certain frame when the variable hits 0
I have a movie clip that I want to be generated over and over again from the library at a random interval, and when the movie clip hits last frame I want it removed.Here is how I am generating it:
function Spawn():void {
var Poof:Puff = new Puff;
addChildAt (Poof,0)
[code]........
would 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]....
my name is fabo i made a flash game and i need help with this script:
score = 0;
var Seconds = 10;
function timer():Void {
_root.Seconds -= 1;
}
setInterval(timer,1000);
if (_root.time == 0) {
_root.gotoAndPlay(4);
}
stop();
where it say: _root.gotoAndPlay(4) it won't go to the frame after the score counter hits
I'm trying to get in the habit of using AS in the first frame on the main timeline as much as possible. but sometimes i hit a snag. like getting a movie clip to change it's alpha when it hits a certain frame in an attached MC.
View 8 RepliesI am trying to get a html popup window to open when my movie hits a certain frame instead of a button. Im using the following code but it uses a button instead of a frame to open the popup.
on (release) {
customize the window that gets opened
0 equals NO.[code]........
ive set up a timer on a frame that will countdown and then go onto the next frame.
it seems to work but im getting this message in the output section;
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at sub1/Atime()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
this is my code,
var mycount:Number = 3;
var mytwo_Timer:Timer = new Timer(1000,count);
mytwo_Timer.addEventListener(TimerEvent.TIMER, Atime);
[Code].....
Im designing my own game in flash, iv set up a score text box and it works fine. Except i just cant seem to get it to gotoandplay another frame,scene, when it hits a certain score??
View 4 Repliesi have one movieclip and i have another movieclip>enemy...okay so when the first movieclip goes over the enemy, nothing happens until i roll out! all i want to do is the movieclip, when it hits the enemy, it goes to the enemy's second frame and that's it ! there are no syntax error in this script, just something i want to do that apparently doesn't work right.here is my code:
Code:
onClipEvent (load) {
speed = 2;[code]...
I need to do an digital **** an after certain time interval i need to go to next frame. I confused how to use the timer.
View 1 RepliesI making a game in flash and I have a timer counting down 30 seconds and when the timer runs out I want it to go to a different fame! I've no idea how to do this.. the timer is working at counting down 30 secs .
View 1 RepliesI have put this code on the frames where each timer you have 30 sec to drag something and put it into a specific place. If you don't then I bring the user back to the starting frame. The issue that I noticed is that even if I cleared it and put a stop(); code it brings me back to the beginning of the game even if I did it ask it to do it! .
On each frame I put this
Code:
stop();
tm = 30;
displayTime.text = tm;
countDown = function () {
tm--;
displayTime.text = tm;
[Code] .....
Aand it works even on frames that don't have this code on it, why ? I put this clearInterval(countDown); all the time. but didn't work.
I making a game in flash and I have a timer counting down 30 seconds and when the timer runs out I want it to go to a different fame! I've no idea how to do this.. the timer is working at counting down 30 secs .
View 13 RepliesThis is literally a little script that I have found on the Internet:
this.stop(); //zodat de stage op frame 1 blijft var timer:Timer = new Timer(3000,1);//een timer aanmaken die 1x afgaat na 30 seconden timer.addEventListener(TimerEvent.TIMER, timerHandler); //luisteren wanneer de timer afgaat timer.start(); //de timer starten
[code].....
I'm trying to create a function that allows you to have like a custom "delay/timer" for each frame.
View 7 RepliesSo I've about hundred of map tiles and each title has some object which does some stuff. And one of things it should do is to update text (a time after which you need to do something) in text field. How should i do it better - with enter frame event and on each enter frame update it or set up a timer object which on each second would update the text in text field?
View 4 RepliesI was messing around and testing some code for a timer. I found an example when I was surfing the net and decided to use the example I found. The timer works great but for some reason it wont go to the next frame when the timer counts down to 0 (defined in the if method at the bottom of the code). Also the code doesn't give any errors either
ActionScript Code:
stop();
var uselessMovieclip:UselessMovieclip = new UselessMovieclip();
[code].....
I just spent an hour searching for a TIMER that allows a movie to stay in a specific frame for maybe 6 seconds then automatically goes to the next. I've seen some but they are way off my actionscript capability.
I just need something simple,
enterFrame (pause for 6 seconds) then (gotoNextFrame)
I have a couple banners that randomly load everytime I play the SWF but I need
them to random load like every 3 seconds when the swf is playing
What do I have to add to my code to achieve that, here is what I have.
gotoAndPlay(Math.round(Math.random() * 5)+1);
Well, pretty self explanatory.
[Code]...
There's my code so far, how do i change it so it stops when it reaches frame 32? I need it to display how much time the person had left.
How to add timer to release when "Button click + 10 (root timeline) frames" ?
if (stage.currentFrame+10..
how I could go about pausing this timer on rollover of an object, stage... anything? I am just cycling images on the main timeline via this timer but would like the timer to pause if a user has mouse over one of the images.
[Code]....
could someone tell me how to create a timer event that will countdown and then go to the next frame. I had an earlier post about the topic but I am completley lost now.
View 5 RepliesIn my .fla file, I have a text box instantiated as _text. The following code works good: my timer comes up and counts off.I need to write a code into the first frame of my completion screen to stop the timer. What would that code be? and what do I need to add to the Main.as code below?At the end of my Main.as file, I have this code[code]
View 2 Replies