This content has been marked as final. Show 9 replies
what are those rewind() methods supposed to do? and if you're calling playFades without resetting n to zero you're going to have a mess.
Oh, sorry that was left in by accident as one of my attempts to fix the problem. I just removed them from the post above.
I thought that perhaps using rewind() on one of the thumbnail buttons and pointing them to _root.container.picture.tween_handler1.rewind(); and _root.container.picture.tween_handler2.rewind(); would fix the problem by rewinding each clip on the initial play but I can't seem to get anything to work.
the rewind() methods won't cause the problem. they do nothing in your code. i was just checking to see if they were supposed to do something.
the main issue is n. and actually, now that i look at that code more carefully just what are you trying to do? that looks like an infinite loop that's going to fade-out, then fade-in each array member one by one, repeatedly. is that what you want?
Heres is a quick synopsis of what is going on.
This is a single swf clip that holds an array of movie clips. Each movie clip contains an image. It fades the first clip in and then out and so forth through the clips in the array. Then it loops infinitely.
The swfs will then be a part of a larger portfolio and will load into a container when clicked on by a thumbnail.
I actually have just put up a test version so you can see what I mean. If you go to http://www.visim.com/testgallery/portfolio.html it will load the "print" thumbnails automatically. Click on the top right thumbnail and it will be exactly what we are talking about here using the code above. It works perfect *until* you try to click on the same button again or rapidly click to another thumbnail and back to that one.
It almost looks like it is repeating the tween class each time you click the buttton.
does anyone have any other ideas?
would it be recommended to try a different approach for the same objective I am trying to achieve with the fading in and out movieclips?
i don't see any looping fades if i press dictaphone, for example. so, what's the posted code above have to do with the code that's executing when a button is pressed.
i do see the problem with rapid clicks.
Only the top right thumbnail is currently setup using the code I have above.
I didn't go through the hassle of doing the others yet until I figure out the problem. The other images in all the other sections are .jpg files pulled from a xml file so ignore them.
Try clicking on the top right thumbnail in print, click on the left one quickly and then back to the right. It will get all messed up. Also like you said rapidly clicking it causes it to keep overwriting itself instead of just having one copy that starts from the beginning.
How do you make sure that if you rapidly click that same thumbnail only 1 copy is playing and it has been reset to the beginning? Is it something that can be put into that .swf or would it have to be in the code for the thumbnail buttons?
Also does the object variables for the tween class have to be declared outside the function that I used to play the fades if I want to access them from the thumbnails?
pass the movieclips that want to cycle through when you call tweenStartF():
I wish it solved the problem. The new code you have shown works but it still does the same thing as before, it seems there is no way to rewind or stop the previous from playing.
If you were going to do something like this yourself would you use Tween Objects or would you use a different method like set intervals, etc? I may look into alternates since this doesn't seem to be working even though it is 95% there.
I am afraid of a prospective employer clicking on a button repeatedly.
Thanks for all the help.