Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

   

Reply
 
LinkBack Thread Tools Display Modes
Old 10-15-2006, 03:23 PM   #1 (permalink)
Inactive
 
Join Date: 10-15-06
Posts: 1
iTrader: 0 / 0%
Latest Blog:
None

pulla90 is liked by many
Preloader

i have been learning flash for few weeks and i would like to put a preloader onto my page, with the same ideas as on the preloader on this site http://www.batterydrink.com/pitlanegame all the tutorials i find are about percentages and how much bytes left etc. but i cant find a tutorial that shows how to make the gfx show how much is downloaded etc. if someone has a link to a tutorial(s) where this is shown, please post here. or if you know some other way, other then the flash-way on how to do this... please helppp! cheers.
pulla90 is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-15-2006, 07:58 PM   #2 (permalink)
Junior Member
 
IMCanida's Avatar
 
Join Date: 10-15-06
Location: Oregon
Posts: 17
iTrader: 0 / 0%
Latest Blog:
None

IMCanida is liked by many
Send a message via AIM to IMCanida Send a message via Yahoo to IMCanida
I don't have any time to write more then I need to..

I already typed this once.. but my internet decided to go down right as I pressed Submit..

Anyways I made you a little example - http://www.underworldassailants.com/TestLoader1.html


And I'll attach a file.. All you have to do is maybe tweak it a bit to work with another Mov file ( or webpage ) and Change the animation..

I'll come back later and answer questions.. Maybe give a better example..
Attached Files
File Type: zip TestLoader1.zip (758.9 KB, 0 views)
IMCanida is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-16-2006, 03:59 AM   #3 (permalink)
Junior Member
 
IMCanida's Avatar
 
Join Date: 10-15-06
Location: Oregon
Posts: 17
iTrader: 0 / 0%
Latest Blog:
None

IMCanida is liked by many
Send a message via AIM to IMCanida Send a message via Yahoo to IMCanida
Lightbulb

Ok.. Kind of learned this one myself while doing it ..

I loaded up a little better one.. So you don't have to do much except for change the animation to whatever you want.. to load while the website loads..

This is how it should be set up..




Frame 1 of Actionscript =
Code:
totalBytes = Math.round(getBytesTotal()/1024); loadedBytes = Math.round(getBytesLoaded()/1024); percentDone = Math.round((loadedBytes/totalBytes)*100); if (_root._framesloaded>=_root._totalframes) { gotoAndPlay("start"); }
frame 2 =
Code:
gotoAndPlay(1);
frame 3 =
Code:
stop();

Then at the very top * Layer 1 actionscript ( on my picture) * just make a blank keyframe F7.. And label that start It basically tells it after loading the file go to frame "start" which is frame 3 in my case..



This is where the animation goes..


Actionscript for this is

Code:
lastFrame = 1; function loadedIndicatorFrame() { var newFrame = int((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 33) + 2; if (newFrame - lastFrame > 4) { //too far lastFrame += 4; loadedText = int(_parent.getBytesTotal() / 1024 * (lastFrame - 2) / 33) + "kb of " + int(_parent.getBytesTotal() / 1024) + "kb"; } else if (newFrame - lastFrame > 0) { //normal move lastFrame++; loadedText = int(_parent.getBytesLoaded() / 1024) + "kb of " + int(_parent.getBytesTotal() / 1024) + "kb"; } else { //update the text only loadedText = int(_parent.getBytesLoaded() / 1024) + "kb of " + int(_parent.getBytesTotal() / 1024) + "kb"; } return lastFrame; }


I don't know why but its not letting me upload the other file I made.. So I put it on a my peoples server ;P ...


www.underworldassailants.com/Test101/images

Last edited by IMCanida : 10-16-2006 at 04:05 AM.
IMCanida is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash: preloader for loader component`s content kontra Web Design Lobby 2 02-18-2007 08:12 PM
Preloader Code SN3 Coding Forum 4 11-30-2003 06:24 AM
Magic MouseOver PreLoader (test) LazyJim Web Design Lobby 18 11-29-2003 07:30 AM


Sponsor Links
Webmaster Forum Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:09 AM.
© Copyright 2008 V7 Inc