Pageflip by iparigrafika Movieclip Animation Solution ·

Jun 19, 2009

I was attempting to add some animation using movieclips to the pageflip file created by http://www.iparigrafika.hu/

I thought I had found the answer using thte solution found on http://www.astonishedman.com/Pay-it-forward.php?action=fullnews&showcomments=1&id=1 but it wasn’t really working completely for some reason. Here’s what I did to, using part of the solution above to make the movieclip animations work within the pages.

I had four animations, each on a different page. At the “root” level of the main movie on Keyframe 1 I added this code in preparation of using the 4 animations:
//globals for animation to work
_global.anim1=0;
_global.anim2=0;
_global.anim3=0;
_global.anim4=0;

I had done this originally using _root, but _global worked instead and it solved the first movieclip animation issue.
Astonished Man (site above) then stipulates to add code to the animation in the movieclip on the pageflip page that’s going to flip. Say that three times fast!

So on for the first animation on the Page 1 I added this code to the first keyframe:
if (_global.anim1 !=0) {
gotoAndStop(5);
}

On the last keyframe of animation on Page 1 I placed this code on the keyframe:
_global.anim1++;
stop();

This makes the first animation play correctly and just once.

//——- side note ——-
Astonished man said to add this code:
_global.anim1++;
_global.anim2=0; //<!— not sure what this does, but this didn’t work for me for some reason!
stop();
This code above makes the first animation play fine, but when I tried it with the other animation on Page 2, the movieclip animation did not play!

I also tried using that global setting of the variable in various places including removing it from the _root timeline keyframe and just using it at the end of the movieclip animation as it says above, but it just didn’t work for me. Maybe I missed something, but here’s my work around.
——- end side note ——-\\

On Page 3 for the second animation I used this code on the first keyframe:
if (_global.anim2 !=1) {
gotoAndStop(12);
trace(_global.anim2);//tracing ;)
}

On the second animations last keyframe I added this actionscript code:
_global.anim2++;trace(‘anim2=’+anim2);
//_global.anim3=0;trace(‘anim3=’+anim3); this didnt work btw… that’s why it’s commented
stop();

As you can see I was tracing global variables to identify what number it was returning. For some reason I kept getting different numbers and I didn’t have the time to figure out what was going on and onwards we go…

So, on the third animation I used this actionscript code on the first keyframe:
if (_global.anim3 !=2) {
gotoAndStop(40);trace(‘movie anim3=’+anim3);
}

And finally on the third animation on Page 7I added this code to the last keyframe:
_global.anim3++;
_global.anim4=0;

stop();

I decided not to add any animation on the fourth animation, but I hope this helps anyone looking for some answers. I used the animations only on the odd numbered pages by the way. And in the end this was used for an a 300×250 sized ad! See it here.

— Zeus ::)

---

Leave Zeus Perez a comment...











Textile Help

"Click Preview" to leave a comment