PDA

View Full Version : Continue Timeline After Actionscript Problem



rmmcclay
April 7th, 2004, 09:25 AM
Hi there...

New to ActionScript...but been doing basic timeline
Flash for some time.

The attached is a very simple study where
we have a preloader on frames 1 and 2, and then
an ActionScript on frame 3 (Voetsjoeba's very
helpful and cool "gridfade" tutorial on this
site under ActionScripts).

It works fine but there are two things I can't
sort out:

1. How to continue beyond the AS on frame 3?
If I add a new layer and put something simple
on it, like a rectangle and let that run across
15 frames, the AS will run over it. In other
words the AS isn't waiting to finish its iterations
before moving along the timeline.

2. One goal is that I would like to do a series
(like 10 or so) of photos using the gridfade,
one after another. But stopping to allow some
timeline text fade ins and outs (using timeline).

I've spent about 4 hours so far, searching and
reading here; but I'm at a loss.

Appreciate any help that comes along.

Russ
Taipei
rmmcclay

rmmcclay
April 8th, 2004, 01:01 AM
I'll simplify my question and attach a better example.

How to allow the AS on frame 3 to complete its effect before moving along the timeline?

If I remove stop(); from the end of the AS on frame 3 the gridfade effect
doesn't complete.

Really would appreciate any help...

Russ
rmmcclay

tofu
April 8th, 2004, 05:44 AM
i can help for q.1 not for 2 so here goes.

in frame 3...

stop();
\\statements
gotoAndPlay(4);

hope it helps, im new so i may be wrong.

rmmcclay
April 8th, 2004, 06:05 AM
i can help for q.1 not for 2 so here goes.

in frame 3...

stop();
\\statements
gotoAndPlay(4);

hope it helps, im new so i may be wrong.
Thanks for the reply, tofu. Appreciate it. However, adding
"gotoAndPlay(4)" at the end of the AS on frame 3 does not
solve the problem. I had originally thought that that would be
all that was needed.

Adding a gotoAndPlay call does the same as removing the stop();
the AS doesn't finish, it just moves on to the next frames...

Didn't think this would be so difficult. (It probably isn't!)

Russ

tofu
April 8th, 2004, 11:59 PM
if you are familiar with the "for" loop you could possibly use that.
ie.

stop();
for(i=0;i<(NoOfTimesToRepeat);i++){
\\statements
}
play();

If you aren't familiar with the "for" loop you should check it out in the reference. It basically repeats an action as many times as you tell it to. I think that should solve your problem.

rmmcclay
April 9th, 2004, 09:42 AM
if you are familiar with the "for" loop you could possibly use that.
ie.

stop();
for(i=0;i<(NoOfTimesToRepeat);i++){
\\statements
}
play();

If you aren't familiar with the "for" loop you should check it out in the reference. It basically repeats an action as many times as you tell it to. I think that should solve your problem.
I tried that (and many variations). Still no joy.

I wonder if there is a way to detect when the ActionScript is complete.
As it is, I can't figure anyway to allow the gridfade to complete before moving on.

Extremely frustrating.

In any case, I really appreciate your suggestions!

I'll get this eventually.

Russ

tofu
April 10th, 2004, 05:51 AM
Well im stumped.I don't think I know enough to solve this problem, can't say I didn't try though.

rmmcclay
April 10th, 2004, 06:44 AM
Well im stumped.I don't think I know enough to solve this problem, can't say I didn't try though.
Hey tofu --

I finally found the answer in another post here...after much searching. It is in this thread:

http://www.kirupaforum.com/forums/showthread.php?t=50132&highlight=variable+check

Anyone who has studied the fade grid tutorial would really benefit from the above post.

Thanks for responding and helping, tofu! Much appreciated.

Russ

tofu
April 11th, 2004, 05:42 AM
Any time. I please to aim.