Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-05-2005, 01:13 AM   #1
mikeinthemoment
Registered User
 
Join Date: Apr 2005
Posts: 2
Question pausing/counting in Flash MX 2004

Hi all, great site, thanks for all the useful info so far.

Let me preface this by stating that I'm not as uhmmm...intimately familiar with the underlying language in this program, but since v4 of Flash, I have been learning some interesting things...

Anyway, onto the issue/question:

Ok, in Flash 5, whenever I wanted to make the "play head" loop over x amount of frames x amount of times, where it looks like the movie is paused, all I had to do was the following(for example):
-----------------------------------------
Frame 1:
a = 0 or 1

Frame 2:
a = a +1
if a > 30
then goto and play 5

Frame 3:
goto and play 2
---------------------------------------------
This worked like a freakin CHARM in 5. I could adjust the > number to however long I needed for the movie to pause and, by moving the "frame 2" code away from the 1st frame a certain number of frames, I could have animation looping while the movie looked "paused", but this SIMPLE method doesn't appear to work AT ALL in MX2K4.

I have googled myself to death on this one, and searched in this hyeah newbie section for a simple solution, but either I'm blind or the answer hasn't been forthcoming.

I have two questions:

- What happened that this doesn't work anymore??...LOL

and

- What is the FMX2K4 simple equivalent of code for the above loop?

Thanks for your help with what I'm sure is a simple problem for you's!
mikeinthemoment is offline   Reply With Quote
Old 04-06-2005, 06:23 PM   #2
prt1
FlashScape
 
Join Date: Mar 2004
Posts: 139
Default

Try gotoAndPlay(2) one word with capital letters as shown.
MX2004 is case sensitive so 'var1' is not the same as 'Var1'
Code below should work.

Frame 1:
a = 0 ;

Frame 2:
a = a +1;
if (a > 30) {
gotoAndPlay(5);
}

Frame 3:
gotoAndPlay(2);
prt1 is offline   Reply With Quote
Old 04-06-2005, 07:27 PM   #3
nthpixel
Registered User
 
Join Date: Feb 2004
Location: Honolulu
Posts: 186
Default

Can you put your actionscript in the as tag so we can see exactly what your code looks like.
nthpixel is offline   Reply With Quote
Old 05-22-2005, 12:12 AM   #4
mikeinthemoment
Registered User
 
Join Date: Apr 2005
Posts: 2
Default

I tried the below suggestion, and made sure I had enable simple frame actions checked, and when I ran it, in either directly from the "timeline screen" or the Test Movie mode, flash seemed to ignore the if command and go right to the gotoAndPlay command.

I've found a solution that seems to work well enough though:

Frame 1
ActionScript Code:
function pause(){     play();     clearInterval(timer); };

Target frame to pause on:
ActionScript Code:
timer = setInterval(pause, XXXX); stop();

Thanks for the suggestion though!
-------------------------------------------------------
Quote:
Originally Posted by prt1
Try gotoAndPlay(2) one word with capital letters as shown.
MX2004 is case sensitive so 'var1' is not the same as 'Var1'
Code below should work.

Frame 1:
a = 0 ;

Frame 2:
a = a +1;
if (a > 30) {
gotoAndPlay(5);
}

Frame 3:
gotoAndPlay(2);
mikeinthemoment is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:14 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.