|
|
| Ranjini P 2005-05-26, 4:19 am |
| Hi,
I am frequent user of Flash. In the Components of Macromedia Flash s/w we have
a built in Progress Bar which is used in most of the sights which says the page
is loading 10% 20% etc etc............. i want to know what command or code is
used
for this bar to get into action, how & where is this Progress bar inserted?
Pls help........
Thanks
r
| |
| flashhappy 2005-05-26, 7:29 pm |
| Ranjini P wrote:
> Hi,
>
> I am frequent user of Flash. In the Components of Macromedia Flash s/w we have
> a built in Progress Bar which is used in most of the sights which says the page
> is loading 10% 20% etc etc............. i want to know what command or code is
> used
> for this bar to get into action, how & where is this Progress bar inserted?
> Pls help........
>
> Thanks
> r
>
may want to try using SWF, Lock & Load for creating flash preloaders
http://www.verticalmoon.com/products/swflockload
| |
| sly one 2005-05-26, 7:29 pm |
| There is a great tutorial here(look in the tiny nav at the top for tutorials, then go to MX 2004 and then UI components):
http://ultrashock.com
| |
| Ranjini P 2005-05-27, 4:16 am |
| Thanx for the link. want to know one more thing, i've already created a home
page full in Flash &
i want to insert this progress bar before the home page opens which says that
"loading 10% 20% etc etc...."
how & where shld i insert this progress bar if it has to come before my home
page? Pls help
Regards
r
| |
| Ravi-Kant 2005-05-27, 7:27 pm |
| if you are using flash so you should keep preloader on the first frame and then repeat it ultill whole movie is loaded
as simple
but t o make it more simple you can fine some FLAs over the net
| |
| droopy.ro 2005-05-28, 7:15 am |
| you can even try to do a separate swf with your progress bar in it, that loads another swf (your site movie)..
| |
| Ranjini P 2005-05-30, 4:27 am |
| Hi,
Thanx again, but i want to know what code or script is used to get the Progess Bar
into action?
| |
| Ranjini P 2005-05-30, 7:22 pm |
| Somebody pls give a solution for this asap......:(
| |
| dpc036 2005-05-31, 7:23 pm |
| heres the code from a simple preload bar i use which gives you a percentage of
the total size loaded.
// lBytes stores the current bytes that have loaded
lBytes = _root.getBytesLoaded();
// tBytes stores the total bytes of the movie
tBytes = _root.getBytesTotal();
// percentLoaded calculates the percent of the movie that
// has loaded into the Flash Player
percentLoaded = Math.floor((lBytes/tBYtes)*100);
// Apply the percentLoaded value to the X scale of the
// bar instance within the loader instance
loader.bar._xscale = percentLoaded;
// Fill the percent text field within the loader instance
// with the percentLoaded value followed by the text
// "% of" and the total kilobytes of the movie. For
// example, when half of a 64K movie has loaded, the text
// field will display "50% of 64K loaded."
loader.percent.text = percentLoaded+"% of "+Math.floor(tBytes/1024)+"K
loaded.";
// If the loaded bytes are greater than or equal to the
// total bytes of the movie and the total bytes are
// greater than 0
if (lBytes>=tBytes && tBytes>0) {
// Check to see if the count variable is greater than
// or equal to 12. If it is, execute the nested code.
// This if/else code pauses the movie once 100% of the
// movie has loaded into the Flash Player.
if (count>=12) {
// exit the loading sequence
gotoAndPlay("main");
// otherwise, if the movie has completely loaded and
// count is less than 12.
} else {
// add 1 to the count variable
count++;
// continue to loop the loading sequence
gotoAndPlay("preload");
}
// if the movie hasn't finished loading into the Flash
// Player then execute this code
} else {
// loop back to the "preload" frame label
gotoAndPlay("preload");
}
| |
| Mudbubble *TMM* 2005-05-31, 7:23 pm |
| preloaders have been used for several years and versions - a quick
google search for "flash preloader" at this address:
http://groups.google.com/advanced_g..._ugroup=*flash*
will yield 22,600 results.
there is no 1 script everyone uses - there are several depending on your
needs.
www.kirupa.com and www.flashkit.com have tutorials and source files.
plenty to choose from allover the web - even a search on www.google.com
for "flash preloader" returns 153,000 results. I tell you this only
because it may help next time if you are just as urgent to get the info
- better than posting here and waiting.
chris georgenes
www.mudbubble.com
www.keyframer.com
team macromedia
Ranjini P wrote:
> Somebody pls give a solution for this asap......:(
| |
| Ranjini P 2005-06-08, 8:17 am |
| Hello,
as u told i got various codes for the preloader & am confused also, so pls
tell me a proper simple code
for the Preloader & step by step procedure. after it loads i shld get my home
page, so where do i
insert this loader in my flash file? pls answer this as soon as
possible........
regards
r
| |
| XmenFlash 2005-06-09, 7:26 pm |
| Try this way....
1. create a flash file and write this code
stop ();
var mcl:MovieClipLoader = new MovieClipLoader ();
this.attachMovie ("preloader_mc", "preloader_mc", this.getNextHighestDepth (),
{_x:180 , _y:70});
_global.root_mc.preloader_mc.gotoAndPlay (2);
var mobj = new Object ();
mobj.onLoadInit = function ()
{
preloader_mc.removeMovieClip ();
starter_mc.gotoAndplay(2);
};
mobj.onLoadProgress = function (target_mc:MovieClip, loadedBytes:Number,
totalBytes:Number)
{
preloader_mc.loaderBar_mc._xscale = loadedBytes*100)/totalBytes;
};
mcl.addListener (mobj);
mcl.loadClip ("file to loaded ", starter_mc);
//starter_mc --- clip to which swf is loading
Hope this helps
| |
| Ranjini P 2005-06-10, 7:57 pm |
| Thanks for the code, but i already have a homepage done & for this i want to
insert a preloader
which is there in Flash in UI Components & also i want to change the color of
the bar(as its default green).
for this please give me the step by step procedure with the codes as to where
i shld insert the preloader
in my already created homepage flash file? and for the preloader where shld i
insert the codes?
hope u got the doubt? pls help
regards
r
| |
| XmenFlash 2005-06-10, 7:57 pm |
| u can change the color by using the setStyle () of UIObject..
for more step by step help on this, u can check the MM help on Customising Components tutorial.
| |
| Ranjini P 2005-06-13, 4:22 am |
| Hello again,
Thanks for the help
sorry, but where do i go for teh MM help & get the tutorials? can u pls let me know
regards
r
| |
|
|
| Ranjini P 2005-06-14, 7:35 pm |
| Hello,
I was able to place my home page after the Progress Bar, have placed the swf
file, is it ok? now
the home page is getting loaded but the animation given in the home page is
repeating which i don't
that to happen, it shld play once & stop. and one more thing is the buttons
given in the home page
r not working, what may be the problem? pls help me
regards
r
| |
| Ranjini P 2005-06-16, 7:25 pm |
| Somebody pls give a solution for this :confused;
| |
| Anil Natha 2005-06-16, 7:26 pm |
| Ranjini P wrote:
> Somebody pls give a solution for this :confused;
Here's some documentation I got from Flash's Help Menu under the "Using
Components" -> "Components Dictionary" -> "ProgressBar Component" ->
"Using the ProgressBar Component"
This is utilized using the ProgressBar and Loader Components from "UI
Components" in the Components Panel.
To create an application with the ProgressBar component in event mode:
Drag a ProgressBar component from the Components panel to the Stage.
In the Property inspector, do the following:
Enter the instance name pBar.
Select Event for the mode parameter.
Drag a Loader component from the Components panel to the Stage.
In the Property inspector, enter the instance name loader.
Select the progress bar on the Stage and, in the Property inspector,
enter loader for the source parameter.
Select Frame 1 in the Timeline, open the Actions panel, and enter the
following code, which loads a JPEG file into the Loader component:
loader.autoLoad = false;
loader.contentPath =
"http://imagecache2.allposters.com/images/86/017_PP0240.jpg";
pBar.source = loader;
// loading does not start until load() is invoked
loader.load();
I hope this helps.
~Anil
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |