Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preloader which detects user connection time and time remaining to load movie.

Step-by-step tutorial

Preloader which detects user connection time and time remaining to load movie.

by  davdesign  Posted    (Edited  )
[color red]FYI: over [color blue]4500[/color] downloads worldwide since this was originally created for Bignewbie.[/color]

hi all

Back again with another souped-up preloader. This time, not only does the scripting calculate the K-loaded and increase the size of a loader bar accordingly, it also calculates the connection time of the user and the time remaining to load the movie. You may find it useful to have a look at my other preloader FAQ which explains the scripting associated with loader-bar and K-loaded properties.

This FAQ is based on what started as a connection detection problem in thread250-69956 . For the files associated with this FAQ go to:

http://www.daveheslop.co.uk/TEKTIPS/prepre4.html
http://www.daveheslop.co.uk/TEKTIPS/prepre4.zip
I've filled the fla with plenty of explanatory comments for the actionsripting, so I'll just use the space here to tell you what you need in terms of frames, and where to put thing in order to make this 'work' for you. Basically, this can be achieved in 4 frames:

[color red]Frame1[/color]
The intial variables are calculated, these do not change throughout the main actionscripting calculations, hence their location prior to the "loop" frame.

[color red]Frame2[/color]
A frame labelled "loop" containing the variable /:iteration. This is essential, in that every time the movie performs the main scripting in Frame3, it requires the number of times the movie has 'looped' in order to perform the 'averaging' calculation. Check the thread mentioned above to see the calculation without any continuous 'averaging'. Also without the 'averaging' you can't calculate the time remaining to load the movie.

[color red]Frame3[/color]
This is where your main scripting lives, the fla contains full explanations of each, so I won't dwell on the sritping here.

[color red]Frame4[/color]
The frame labelled "site". In the main sripting is an 'If' action which detects if the movie is fully loaded and if it is the main timeline is told to goto-and-stop at the frame labelled "site". Consequently, this is where you would start your main movie/site.

Ok, that's it, simple as pie. Remember to check the variables assigned to the dynamic text boxes in order to keep track of the scripting when you look at it.

Looking forward to seeing your creations.
dave

ps: please give this FAQ a high Rating on the FAQ page if has been useful and clear to you, the feedback helps me in writing future FAQ's.

revision1: 21-05-01 links changed to files
revision2: 01-08-01 FYI info added at start
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top