Jump to content


Looping...?


  • You cannot reply to this topic
1 reply to this topic

#1 Flanders

    Young Padawan

  • Members
  • Pip
  • 53 posts
  • Gender:Female
  • Location:Gilbert, PA
  • Interests:web design, graphic design, photography, philosophy, politics, myst, the sims, maple story

Posted 07 August 2007 - 10:23 AM

I have a Flash header that I'm working on at the moment...the beginning sequence has sound to accompany the animation, but I don't want to bombard visitors with noise constantly while they're on the page, so I have the same sequence again without the sound. Now according to the Adobe site, I should be able to loop over only certain fames, but thus far, I haven't had much luck with the code. This is what they provided me:

	counter++;
	if (counter<5) {
		gotoAndPlay (10);
	}

Does anyone have any insight on how to use this properly?

Edit: I have tried using a simple gotoAndPlay(); as well, but that hasn't worked.

Edit: Scratch it; it seems to be working now. ^^;;

Edited by Flanders, 07 August 2007 - 11:10 AM.


#2 bakedbread

    Young Padawan

  • Members
  • Pip
  • 19 posts
  • Gender:Male
  • Location:Minnesota
  • Interests:Writing<br />Programming<br />Flash<br />Web Development<br />Friends<br />Talking.. Alot.

Posted 11 August 2007 - 11:22 AM

Hmm. It looks like you should have the counter inside the loop, at the end. And it should be a while. But you got it working, I don't know. I'm tired.

var counter = 0;[/color]

[color="#008080"]while(counter < 5) {[/color]
[color="#008080"]   gotoAndPlay(10);[/color]
[color="#008080"]   counter++;[/color]
[color="#008080"]}


Ah nevermind. I was being foolish. You want it so when it enters the frame and yeah it all makes sense now. Lol sorry. It has been a day for me. Well good luck with that project.


Edited by Cayson, 11 August 2007 - 10:12 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users