Jump to content


What's the best technique for a transition?


  • You cannot reply to this topic
3 replies to this topic

#1 Toshiyan

    Young Padawan

  • Members
  • Pip
  • 50 posts

Posted 19 February 2007 - 02:54 PM

I'm wanting to know how to have transitions between pages, like from my home page to portfolio, information, etc... the thing is I can make all tansition from the homepage to one of the other pages but do you have to make the transition for every page somewhere else on the flash's timeline?

Like if they were on the home page and click portfolio you have an animation you create between the two pages, but if they started out on information and clicked portfolio then it would also have it's own animation. What's a way to go about this? I can only think of making each page like 6 transition animations from coming in from one of the other pages and out to one of the other pages. then that means I would have to make 6 more transitions each for home and portfolio.

Any easier way to go about this?

Help appreciated.

#2 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 19 February 2007 - 03:31 PM

What I usually do, when making Flash websites, is I make my transition maybe a white diagonal box sweeps from one corner to the other, in a MovieClip. I would have one frame in that MC where the white diagonal box would be covering the entire page, so that you don't see any problems with transition. Then, I would a new layer, and add a new keyframe on that spot. Then, on going out of the MC, and back into the main timeline. Name the MC "transitionMC". Then I would, in the first frame, create a function:
var pageNum:Number = 0; // The number of the frame to go to.
function gotoPage(frame) {
		_parent.gotoAndStop(frame); // Making it stop at the correct frame
}
Then, back into the MC, and on that new keyframe you made, I would add this:
_parent.gotoPage(_parent.pageNum); // Running the function in the middle of the transition
Then on the first frame of that layer, add this code:
stop(); // Stop it from looping
Atlast, but not least, on your buttons:
btn1.onRelease = function() {
		transitionMc.gotoAndPlay(2);
		pageNum = // New page number;
}


#3 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 19 February 2007 - 04:26 PM

I like to use my preloader and put the transitional animation on the end of that once the new movieclip has been loaded.

#4 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 20 February 2007 - 12:59 AM

View PostPax, on Feb 20 2007, 08:26 AM, said:

I like to use my preloader and put the transitional animation on the end of that once the new movieclip has been loaded.
Yeah but assuming he's not loading the pages externally...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users