Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 11th, 2003, 11:28 PM
inzain inzain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 30 inzain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 3 sec
Reputation Power: 6
Send a message via AIM to inzain
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


__________________

Reply With Quote
  #2  
Old November 16th, 2003, 08:39 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,630 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 7835 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 14 h 33 m 2 sec
Reputation Power: 537
Facebook MySpace
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!)

Reply With Quote
  #3  
Old November 16th, 2003, 01:50 PM
inzain inzain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 30 inzain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 3 sec
Reputation Power: 6
Send a message via AIM to inzain
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

Reply With Quote
  #4  
Old November 16th, 2003, 01:52 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,630 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 7835 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 14 h 33 m 2 sec
Reputation Power: 537
Facebook MySpace
I dont have one at the moment. I'll make one now and post it in next hour. 8pm now.

Reply With Quote
  #5  
Old November 16th, 2003, 02:39 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,630 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 7835 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 14 h 33 m 2 sec
Reputation Power: 537
Facebook MySpace
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
Attached Files
File Type: zip smartintrooutro.zip (14.5 KB, 299 views)

Reply With Quote
  #6  
Old November 16th, 2003, 04:26 PM
Lucidic Lucidic is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 6 Lucidic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #7  
Old November 16th, 2003, 06:20 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,630 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 7835 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 14 h 33 m 2 sec
Reputation Power: 537
Facebook MySpace
*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

Reply With Quote
  #8  
Old November 16th, 2003, 08:05 PM
Lucidic Lucidic is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 6 Lucidic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #9  
Old November 16th, 2003, 08:14 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,630 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 7835 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 14 h 33 m 2 sec
Reputation Power: 537
Facebook MySpace
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

Reply With Quote
  #10  
Old November 16th, 2003, 10:41 PM
Lucidic Lucidic is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 6 Lucidic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > animation intro and outro


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |