|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
animation intro and outro
hello, i'm looking for a simple script for a simple site.
basically i need a script that allows me to have an "animation intro and outro" for every file that i load into the main site. i have seen a lot of flash sites like this here is what i mean: user is at at homepage. user clicks on "page2" , then the animation starts ...goes till end point, and loads "page2" , and comes in the animation for "page2" user clicks on "page3" ... animation outro for "page2" starts...goes till end point and loads "page3" and so on. ok thats my best explanation for what i'm lookin for , basically its just and in and out animation for each movie that loads. if this makes sense , please help! ~Z __________________ |
|
#2
|
|||
|
|||
|
I've done this a few ways before. The easiest is to keep track of both the current page and the next page.
i.e. in _root: currentPage = "page2"; nextPage = "page2"; then when you click the link for page3: page3Button: on(release) { _root.nextPage = "page3" eval(_root.currentPage).gotoAndPlay("outro"); } then in each page have an intro and an outro animation. In the last frame before switching content enter something like: eval(_root.nextPage).gotoAndPlay("intro"); when a page is fully loaded: _root.currentPage = "page3"; You could alternatively use loadMovie() if you wantd to have a single intro/outro animation that had each page loaded within it self or a contained child movie. I'll leave muddling around with this to you. -Tann sidenote...by keeping track of both the current page and the next page you can prevent a page double loading i.e. users on page2 then they click page2 button and it reloads the page....50/50 its a waste of time (maybe you do have really dynamic content!) |
|
#3
|
|||
|
|||
|
thanks!
hey thanks, do you have a sample FLA for me to try out by any chance? if not, its cool, thanks for the help!\
~Z |
|
#4
|
|||
|
|||
|
I dont have one at the moment. I'll make one now and post it in next hour. 8pm now.
|
|
#5
|
|||
|
|||
|
Ok heres the file. I havent commented it at all. Have a look through it and all should become clear. If you have any questions ask here and I will reply later. I'm going out in a while so it will be a few hours.
Files are flash MX format. The one your interested in is called transition.fla, the others are just fake content. again I hope this helps -Tann |
|
#6
|
|||
|
|||
|
THIS HELPS ME! I CANT WAIT
I knew there was a pro way of doing this i havent look at this FLA yet but Tann San do you know of a way to use the same preloader for every movie you load in ???? right now i just make a small one that goes into each loaded movie ? peace Lucidic |
|
#7
|
|||
|
|||
|
*shucks* hope the demo helps.
well as to this second problem. this one can be really easy depending on your current implementation. Personally I would use the stage to my advantage and place the preloader movie off stage, out of sight. The first frame of the preloader would contain a stop() action. Each time you begin loading a page move the preloader back onto the stage into the desired position i.e. (pageButton) on(release) { //load the page etc then _root.preloader._x = 50; } write a function similar to this in the first frame of the preloader: function preloaderTarget(targetMovie) { if(targetMovie.getBytesLoaded == targetMovie.getBytesTotal) { _root.preloader._x = -500; } } you may need to eval(targetMovie) before the if statement i.e clipToPreload = eval(targetMovie); //then if(clipToPreload.getBytesLoaded == clipToPreload.getBytesTotal) //etc bit rough but better than nothing i suppose! -Tann |
|
#8
|
|||
|
|||
|
wow your good!
But I am lost now I am sorry I am just learning AS and still use novice mode most of the time hehehehe But I see what your doing kind of You are showing that you can tell a preloader to start and hook it to a new movie that is loading. I just dont understand the x=50 But thanks a lot for helping me=) I think thats over my head as far as figuring out hehe i will just keep a tiny loader in each movie I open . You have a flashy day! Lucidic |
|
#9
|
|||
|
|||
|
the _x = 50 bit tells the preloader instance to move to co-ordinate 50 on the stage.
I'm updating my site at the moment. when its complete I'll put this up as a tutorial, hopefully I can explain the process there a little better. sorry i could help you -Tann ![]() |
|
#10
|
|||
|
|||
|
That would be helpful thanks!
I hate just copying and pasting code. I like to understand what I am doing so I can learn and grow! peace! Lucidic |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > animation intro and outro |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|