Graphics and Multimedia
Public forum
Unmoderated forum

Forum administrated by moderatoruk
The place for designers and artists.
Want to discuss about Web Design, or Flash tips? Want to know how to make your website's graphics look really cool? Discover the Webmaster Graphics and Multimedia Forum!
New messages 0
Total messages 428
Subject RE: flash movie

Author:  ngwooter
Date:    08-06-2005 10:19

Well if your using Flash mx 2004 it has a loader component and pBar for that but if you wanna make your own its really not that hard. i will try to explain the easiet way

draw a rectangle right click convert to symbol name it bar and give it a instance in properties called bar then create a dynamic text box go back into properties and give that text box a var called loadtxt now select both the box and bar and convert that into a symbol called progressbar now double click it and go inside the symbol you just created create a layer above the layers of the text and bar and label that layer Actions give it two frames ok first frame this code goes on it
//first frame of mc progressbar
_root.stop();
//defineing PercentLoaded
PercentLoaded = _root.getBytesLoaded() / _root.getBytesTotal() * 100;
///below is for your text box to display the percent loaded
loadtxt = Math.round(PercentLoaded*100)+"%";
//Now this will move the the bar _x sideways depending on the percent loaded
if (PercentLoaded != 100) {
setProperty(bar, _xscale, PercentLoaded);
} else {
_root.gotoAndStop(2);
}

ok now on second frame just creating a loop place the code below

gotoAndPlay(1);



now you have a progress bar exit out the clip and place it on your first frame of your main timeline it will not go past the first frame until movie is fully loaded.


now the component way of doing it is about is simple except its a bit diffrent because yea it gets the bytes and you dont have to code that but you have to add listeners and code extra just to remove the stupid thing from view after its loaded also it adds extra kb to your movie cause the thing is way to bulky for its job but yea it looks pretty and you can set styles but i still use it hehe but i still hate it.

hope that helps






    Subject Author Date
flash movie  
survivorguy 10-04-2005 19:54
RE: flash movie  
hanysoldtheworld 11-05-2005 13:28
RE: flash movie  
titanic_muzic 13-07-2005 00:22
RE: flash movie  
wardeere 29-05-2005 10:07
RE: flash movie  
sbr3ra8 15-09-2006 17:14
RE: flash movie  
ngwooter 08-06-2005 10:19
RE: flash movie  
stevenharris 18-09-2005 22:24
RE: flash movie  
lawer_mans 16-01-2006 15:59

Subject:

Message:

Include original message   Cancel