Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Preload Question


I have movie1 and movie2. I want to load movie2 into an mc called movieHolder in movie1. Now, i want to have preloader of movie2 in movie1.
How could i do that? is it possible to get, movie2.getBytesLoaded() from movie1?




ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 08-06-2004, 08:59 PM


View Complete Forum Thread with Replies

Sponsored Links:

Preload Madness - Preload Movies Clip In A Movie?
hey people... a brought up this subject here a while back but it didn't really go anywhere... now that this sections seems to be a bit more lively perhaps some of you flashers can help me out... I am going to break this down very simple... I haven’t even storyboarded this so this is an extremely rough draft of the idea



I am building a photo gallery



this gallery has eight images which range from 30k-75k (roughly) so I don't want the user to wait for a full load of 240k-600k



I want to first load the thumbnails for the images... and then begin to preload the first image directly after that... then display it



and then from that point when the user clicks a thumbnail the corresponding full image will preload and then display


basicially this is about preloading a movieclip in a movie... I jsut can't wrap my head this... so I will ask for help before I get too deep.... any input on the basics of this idea would be appreciated

thanx!

View Replies !    View Related
Selectively Preload, Preload Rest While Playing
Hello,

I have updated a pre-bought flash template for a photographer. Long story short, the file is now 4M's -mostly from images- and he wants it to load faster. Right now it is all in one swf, no load movies. So the large jpg's are embedded. (I could make them all movies and load them as needed, but am trying to avoid that.)

I would like to know if it is possible to selectively preload. For instance load everything except the large images mc. This way the movie would play its long intro and the viewer would have to go to the thumbnail gallery before getting to the large images gallery. Meanwhile the large images mc could load in the background?

Any thoughts?

The site is here:
www.crphotography.com

Any help is greatly appreciated.

View Replies !    View Related
Preload, Finish Preload Anim, And Then Play
Hello!

I have a preloader with a mc that plays while it loads. I want the movie to preload the whole show, then finish playing the section of animation that it is in, and then play the main movie.

For example:
A ball goes from the right corner to the left (section 1) and then reverses back to the right (section 2). While the show loads the ball just goes back and forth. But once loaded, I want the ball mc to finish going to either corner and then _root.gotoAndPlay(5);

I am thinking of something like this (try not to giggle at me):

if (loaded == total) {
_root.ball_mc.gotoAndPlay(until the next frame label);
then
_root.gotoAndPlay(5);
}



This is my preloader code which works great but cuts of my ball mc abruptly:

onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(5);
}
}

Thanks so much!

View Replies !    View Related
Preload Code Help - Holding Content During Preload
First off, the current code works fine in terms of function but I want to see if someone has a code fix for me. When the preloader starts, I want the current image to "hold" inplace instead of being unloaded from the "container" MC. I want the bar to load, covering up the current image and then when the preload is complete, load the next image in and display it. Does anyone have an idea on how I might rearrange or change the code? I know I have seen this same technique on several web pages, I just havn't been able to figure out how to execute it.

click on btn1 or btn2 to load an image.

Here's the current SWF

http://josephryannasipak.com/test.html

Here's the code:

stop();

bar._visible = false;


my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);

preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
container._visible = false;
bar._visible = true;

}

preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*550;
pText.text = "% "+Math.round((lBytes/tBytes)*100);
};

preload.onLoadComplete = function(targetMC) {
container._visible = true;
bar._visible = false;
trace(targetMC+" finished");
};

my_mc.loadClip("sunset.jpg", "container");

btn1.onPress = function () {
my_mc.loadClip("bluest.jpg", "container");
}

btn2.onPress = function () {
my_mc.loadClip("church.jpg", "container");
}

and the FLA file:

http://josephryannasipak.com/test.fla

View Replies !    View Related
Can I Preload A Swf And Also Preload An External Linked Swf With The Same Preloader?
Can i preload a swf and also preload an external linked swf with the same preloader?

i have one swf which is a site!

and one that is the music!!

but i want them both loaded together so they run at the same time??

this possible??

View Replies !    View Related
Preload External Swf Movies In One Preload ?
So, I take it there is no way to preload external swf movies in one initial preload?

does anybody have a clue or suggestion?

thanks.

View Replies !    View Related
Preload Scene DOESN'T PRELOAD
ok, so i have this file, full of images, it's huge. i have a preload scene, the actionscript is as follows:

setProperty ("loadBar", _xscale, "((_root.getBytesLoaded() /_root.getBytesTotal() )*100)");
ifFrameLoaded ("Scene 1", "End") {
gotoAndPlay ("Scene 1", "Start");
}

so basically, it SHOULD increase the width of the preload bar as the movies progressively loads, and it SHOULN'T start playing the main scene(Scene1)until the whole scene is finished loading.

It doesn't do this!

i haven't done much actionscripting b4, so any help would be appreciated.

you can see the extremely CRAP movie at: http://www.angelfire.com/ca/adamstuff/paragon3.html

View Replies !    View Related
Preload Several Swfs With One Preload.swf
how can i preload several swfs with one preload swf?
i just have a main swf and some loadmovie swfs which are loaded in the main swf and i dont want to preload them with scenes.

View Replies !    View Related
An Effect Without Preload & With Preload
I created a simple rotating efect:
1) without preload:
a) result: http://www.freewebtown.com/ihtus/fla...er_cursor.html
b) source: http://www.freewebtown.com/ihtus/fla...ter_cursor.fla
c)square.onEnterFrame=function(){
square._rotation=square._rotation+0.2;
_root.square._x = _root._xmouse;
_root.square._y = _root._ymouse;
_root.txt._x = _root._xmouse+2;
_root.txt._y = _root._ymouse-10;
}

2) with preload:
a) result: http://www.freewebtown.com/ihtus/fla...h_preload.html
b) source: http://www.freewebtown.com/ihtus/fla...th_preload.fla

There is a difference of the quality, for the case with preload I only added some layers and code for preload efect, and the quality of the rotating object becomes lower... , the question is: how to create preload efect without making the quality of the rotation lower?

Thanks!

View Replies !    View Related
Preload (PAUSE) And Then Preload Some More
Hey Guys,

I am working on a pretty big project and I am trying to work out a way of having some of the movie load then stopping (to allow other things on the page to load) then starting again.

It will have 4 movies (3 external) and what I want to do is load the first one normal then wait like 2 seconds and load the second one.. etc etc

I just cant think of a way to do this?

Any help?

Cheers guys

View Replies !    View Related
Preload Help
Hello. I have just started on flash (Newbie:-)
and i want to know how i preload..
How do i do this????

View Replies !    View Related
Preload Bar...help?
I just need to make a simple little progress bar for my preloader. Can someone tell me how to do this or send me a link to a good tutorial for a progress bar in Flash 4? I've got my preloader already set up, but I just need to add a progress bar so that people can tell the site is not stuck. You can check ou what I've got already at http://www.hholzhauer.com

Thanks!

View Replies !    View Related
Preload Help
i'm still very confuse about the preload on my movie, i made my movie in flash 5 with only one layer, but the question is how do you put the preload in the movies, or is it stand alone, please help with this, of how to do so, just plain instruction 1,2,3.

View Replies !    View Related
Looking For Some Help..trying To Preload Ex. Swf Into MC....
My goal is to load an external swf into a MC from my mainmovie, and if the swf is a little large, I want the MC to preload it with an animation or something thats notifies the user that their selection is preloading......
Now I had someone helping me from Were Here Forums, but he's either fed up or has left (I think the former)
Anyways, this is what I have:
Two MC's, one called "blankMC", the other, "preloadMC".

This is the code I have on "preloadMC":

onClipEvent (enterFrame) {
blankSize = _parent.blankMC.getBytesTotal();
}
//which was explained to get the size of blankMC
//Then I put this code on the preloadMC

onClipEvent (enterFrame) {
loaded = _parent.blankMC.getBytesLoaded();
total = _parent.blankMC.getBytesTotal();
percent = Math.round(loaded/total*100);
if (percent>=100 && total != blankSize) {
_parent.blankMC.play();
} else {
this._xscale = percent;
}
}

On my button:
on (press) {
blankMC.loadMovie("external2.swf");
}

Now when I test this movie, it automatically gives me the BytesLoaded, BytesTotal, and total percent of the blankMC.
And I haven't loaded the external swf yet. So I'm thinking I have something somewhere it shouldn't be.
Now, this may sound dumb, how do I unload the external .swf?
Help please...???

View Replies !    View Related
Another PRELOAD Q?
welcome to my thread :-))
Q- i made a swf which is suppose to be loaded as target in another swf. Also i want to make a PREload for that loaded SWF so should i make preload in the loaded SWF or in the main SWF??

View Replies !    View Related
Preload
ok, i have a simple preloader, but its not working correctly... the bulk of what i want to be preloaded is one symbol animation that is about halfwaythrough my movie, when preloading using this

onClipEvent (load) {
var total = _root.getBytesTotal();
var loaded = _root.getBytesLoaded();
var perc = (loaded/total)*100;
percent = perc+"%";
if (loaded == total) {
percent = "complete";
gotoAndPlay (2);
}
gotoAndPlay (1);
}

it wont preload that animation, so it still stops when it gets to it, can anyone help me out?

View Replies !    View Related
Preload
where can i find a preload for my webpage or how can i make one because i have one for a "flash book" but its stupid... i see preloaders in some web pages and its madddd
can someone help me?

p.s sorry for my english but i am 30 and i try to learn now lol :-))

View Replies !    View Related
To Preload Or Not To Preload
Hi all

I have designed a preloader and it all works fine but the only problem is that most of the content is on the first frame of the following scene so the bar indicator gets to 7% loaded and stays for ever until it skips fully loaded to the right place. IS there a way instead of framesloaded as a variable action such as bytes loaded in Flash 4? That way the indicator would run more smoothly and stop the viewer from clicking off when it appears to have become stuck

Cheers

Matt

View Replies !    View Related
PReload MC
Can some one tell me if u can preload MCs....it should show the user tha amount it is loading(Movie Clip) like u have preloaders for movies....If so how

View Replies !    View Related
Preload MC?
Are we able to preload MCs? I have a biggg movie consisting lots of MCs. When I try to prepare a preloader, I can not preload MCs, so It passes the preloader without loading MCs, so preloader sucks. Do you know any method? Or Have i lost a big point?

View Replies !    View Related
Preload
I'm having trouble getting this preloader to work when its placed within a load MC, I've tried targeting all the variables but it dosen't want to work, any thoughts would be appreciated.
Cheers Dan

onClipEvent (load) {
total = int(_root.getBytesTotal());
}
onClipEvent (enterFrame) {
loaded = int(_root.getBytesLoaded());
percent = int(loaded/total*100);
_root.percent = percent + " %";
_root.bar.gotoAndStop(percent );
if (percent >= 100) {
tellTarget ("_root") {
play ();
}
}
}

View Replies !    View Related
Preload MC's ?
How can i preload single MC's with preload animation ?

View Replies !    View Related
Preload Bar
I am making a movie with a preloader that uses a bar and a number (ie 23394 of 49502 bytes loaded). I have an idea of how this might work but I don't know if it is possoble. I read in a book for flash 4 that there is a way to get the bytes loaded in a movie. I want it to take the total bytes subtract the bytes loaded and then convert it to a number out of 100 or 50. like 150 out of 200 = 75 out of 100. I then want it to tell a movie clip (the load bar which has 100 frames) to goto the frame that is the number. I tried to do it but I can't seen to make it work. I want to know if this is possible and if not a nother way that might work. I would really appeciate you help.



iwacko

View Replies !    View Related
Preload For Jpg
Hello all,

If i load a jpg image whit loadMovie, how i can make a preload for this? the same way if i load a lot of image at the same time. I can do a status bar while this images are importing?

other question,

i solve this importing the images manually, but this images work dynamically and i need atach this to a diferents movieclips, but when i load the genereal MC where is loaded the diferents images converting to MC and assignat a linkage, this MC what i load no show the first frame becouse the MC for the atach just are loadin before the general movie.


my english is not good

THX!!

View Replies !    View Related
Preload On Web. (HOW?)
I have created an fla uploaded it to my site. Gone into my domain manager and pointed to the fla. Whenever I try to access my site now it wants me to download the filename that I created. What do I need to do upload the page and allow my users to view it.


Thanks in advance for the help.

Derek

View Replies !    View Related
Preload A Swf From Another
Hi. Hope someone can help me.
I intended to call a swf from another and evaluate if the first one is loaded.
The thing is my first movie has only 1 frame with a heavy mc in it
I tried with this:

if (_root.getBytesLoaded()!=_root.getBytesTotal()){
_level80.gotoAndPlay (2)
}
(where ni preloader is stopped at frame 1)

This didn´t work

I tried to pass variables between the 2 levels but didn´t work.

What i'm doing wrong??

It seems to be so easy
Thanks for answering.

View Replies !    View Related
Preload
does anyone knows how to preload an external swf or jpg, so that, when i call it, it doesn't have to be loaded dynamicly and it'll be quickly ???

please, I really need help.....

View Replies !    View Related
Preload
Hi everyone
I've been having a problem with preloading.
I know how it should work with a bar preloading but I don't know how it can go to another page right after the prelaod. I tried to put the code like this;

First Frame:
x_pos = getProperty ("/bar",_x)

Second Frame:
percent = Number(_root.getBytesLoaded()/_root.getBytesTotal())*100;
setProperty("/bar", _x, (x_pos+(percent*2)));

Third Frame
if (percent < 100) {
gotoAndPlay(2);
} else {
play();
}

Last Frame:
getURL(portfolio.html);

It worked but It opens so many browsers at once. I don't know what I did worng. Does anyone know what the problem is?
Thanx

View Replies !    View Related
I Am About To 'preload' My Gun And End It All.
I have a %$&*# of an external preloader that I FINALLY got to load the mp3's, but now I just want to have a text box say "Playing" or "Loading" whenever it is. I have a variable _root.state to tell what state the player is in. If it is "l", its loading, "p" is playing, and "i" is stop. the problem is that the trace at the end only returns undefined. I have an empty keyframe on frame 1 with _root.state=i; on it, then the main clip stops on 2 with this code on it.


Code:
onClipEvent (load) {
_root.state=i;
}
onClipEvent (enterFrame) {


if (this._url != _root._url) {
_root.preload(this);
OutputLoaded = MyCache.getBytesLoaded();
OutputTotal = MyCache.getBytesTotal();
percentLoaded = (MyCache.getBytesLoaded()/MyCache.getBytesTotal());
_root.state=l;

}

}
onClipEvent(enterFrame) {
if (_root.state=l) {
_root.a.b.c.text=="LOADING SOUND";
}
if (_root.state=p) {
_root.a.b.c.text=="PLAYING";
}
if (_root.state=i) {
_root.a.b.c.text=="SOUND OFF";
}
trace (_root.state);
}
the text WILL NOT change either. Thanks. I need Tylenol.

View Replies !    View Related
Preload Mc's?
is it possible to preload mc's the way you preload scenes?
for example one movieclip plays while the nex one is loading, displays bytes loaded and then goes to a frame with that mc on the stage instead... are there any tutorials, or do you know the actionscript? thanks

View Replies !    View Related
.jpg Preload
OK All,

I have a image viewer that I got working pretty good, but for the lowband users, I'd like them to have a preloader for each image. No matter what I do in the MC, I can't get the loader to identify the specific image. It keeps preloading the MC only. I have

"mypic = 1"

as an initial variable, then eventually a

loadMovie(url,"+mypic+".jpg "MC")

where my images are image1.jpg, image2.jpg, etc. How do I tell the preloader to .getbytes for the images only? I've even tried targeting "+mypic+", but I get a syntax error. Just a little help please. Any advise would ease my head, thanks.

View Replies !    View Related
Preload Off The CD-ROM?
Hi All,

Is there any way to preload contents before they are played off from a CD-ROM? So that, while played back the audio remains tightly synced with the graphics.

Regards,

Parag Shah

View Replies !    View Related
Preload Help
I have a pre-preloader in level one that loads this load.swf in level 1. This is the script for my load.swf it works BUT the load doesnt show until yhe whole main movie is loaded . wich u all now IS NOT THE IDEA OF A PRELODER!!!!!!!

Would be so glad if some one would could help me out with this!

==========================

1:a frame
loadMovieNum("main.swf", 1);

2:a frame
percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);
myOutput.text = percent+" %";

3:a frame
if (percent == 100) {
loadMovieNum("main.swf", 1);
} else {
gotoAndPlay(2);
}

a mc called bar is located on the stage in frame 2 and 3.
inside this mc i got another layer with 2 frames

1 frame
this._xscale = ((_root.getBytesLoaded()/_root.getBytesTotal())*100);

2 frame
gotoAndPlay(1);

View Replies !    View Related
Preload?
ok, i've been wonderin how do websites preload different sections of their site, but they still ahve the interface there and everything? Can someone explain to me how to preload sections of my website? thanks muchos

View Replies !    View Related
- - - ? Best Way To PreLoad ? - - -
Hello there...

Just a quick question!!

Say I have a 'website'.. If I want to load a nav bar and a number of animated swfs from a seperate folder into their own individual place holders.... and I want them all to have some kind of preload ! What is the best technique regards the preloading ??? Do I put the preloadin MC on the first keyframes of my external swf's ?? Or ! do I have just one preloading MC in my main movie which works for everything ?

Similar to 2advanced ??

I ask because I want my site to start up instantly. Then load the info and navigation required for each part of my site.

Thanks..

View Replies !    View Related
How To Use A Preload
i'm with a litle bit dificulty to use a preload, y have already made it but i don't know how to make the interactivety with the preload

View Replies !    View Related
Preload
Is there a way to preload a movie before loading it in my main movie?

thanks!

View Replies !    View Related
Preload
I have my flash all made, but when loading on the page it's self it seems to take TOO LONG to load, and i know that there is a way to make a preload, to load a particular amount of frames BUT i don't know how and i was wondering if anyone could help me. please let me know THANKS

View Replies !    View Related
How Do I Preload A Mc?
How do I preload a mc?

View Replies !    View Related
One Swf Would Preload Another Swf.
Hi everyone,

Here is my issue. I have created a website and everything is one scene. My site is 800X600 pixels. I am using a top background and a bottom background, so my middle space is 800X333 pixels. I am using about 5 different pages for my site and they are all appearing in the middle space. However, don't get fooled because my whole site appears in one row, one table in an html page created in Dreamwaever. I wanted to see my website appear in the middle of the screen and it works well this way. But the whole site is 290kb big and fits in one floppy disk. That's fine but I am still having some problems when I publish my site on the web as it takes me between 10 to 20 seconds to appear and I have a high Speed internet connection with cable. Then, I have tried to create a preloader for my website and put it on frame 1 and frame 2. My website would appear on frame 3. Here is the code I have been using:
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay(3);
}
I still had the same issue. Then, I installed my preloader on a different scene. My percentage preloader was on scene 1 and my site on scene 2. I have used the same code as above but instead of gotoandplay (3), I have used: goto Next Scene. It still did not work as I wished. I figured out that I would need to create 2 separate pages for my preloader and my index (website). The first html page would appear with my preloader.swf and load the index.htm and the index.swf in the background. When all the bytes will be loaded, the preloader.htm and the preloader.swf would disappear and my website will be there. All what I want basically is to be able to see the preloader instantely or my website instantely for all users, depending of course of "their" internet connection.

Hope you can help?

Thanks,
SuperTechSeb

View Replies !    View Related
Preload Help
I know everyone is asking abou this but I'm too leet to search it in this boards...

That's it,
I was making a flash website and when I finished it, it was too slow loading it... And I want help in how make a separated flash preload for a flash file??

Did you understood my doubt? I'm not sure if we can do it... but...

PS:Sorry my english!
PS2:Really, SORRY my english, I know it sucks!

View Replies !    View Related
To Preload Or Not To Preload
If Flash files use "progressive download" (the file plays as it is downloading to the viewer's computer), why do we still use preloaders?

And why are large files sizes an issue then as well?

View Replies !    View Related
To Preload Or Not To Preload
If Flash files use "progressive download" (the file plays as it is downloading to the viewer's computer), why do we still use preloaders?

And why are large files sizes an issue then as well?

View Replies !    View Related
To Preload Or Not To Preload
If Flash files use "progressive download" (the file plays as it is downloading to the viewer's computer), why do we still use preloaders?

And why are large files sizes an issue then as well?

View Replies !    View Related
How To Preload A Swf
I am working a file that requires some preloading high graphic images that has been placed in a slide show. I have the main.swf that contains all of the links and buttons, when clicked on the slide show button I would like to have a preloader that will load the slide show file.

Question: How do I begin a preloader to load up to a certain frame then play?

Thanks in advance,

Chris

View Replies !    View Related
Preload?
I have a loadmovie command to a empty movie target in the main swf. Is there a way to preload the other swf right after the main swf has loaded? So that it will already be preloaded when the user demands it!

Thanks,

Mik


P.S. The movie I'm loading is called: solutions_home.swf

Being loaded into target empty movie instance: loadmovie

View Replies !    View Related
How Do You Preload? HELP PLEASE
I have no idea how to preload. I really wanna know how to preload. Even a webpage that shows how to preload would do just fine. HELP PLEASE!! I BEG!!!
P.S. If the preloader is the thing that loads the movie OR shows the Percent done and all that stuff. If its not then tell me what it is cuz i wanna know how to do just that. Thanks.

View Replies !    View Related
Preload
Ok... anyone out there understand preloading. When I preload a movie with many frames it all works fine. However, I have a movie that is 1 frame long and has many movies within it. The same preloading code does not work in this circumstance. It creates a movie between the preloader and frame 1 of the main movie but in a loop and you can't access any of the inner movies. Please help

View Replies !    View Related
Preload A .jpg
Hi,

I've been wondering about this quiet a bit the past few days, is it possible to preload a .jpg?

Basically, I wanna know if I can make a preload bar thing, using the getBytesLoaded() and total() command, and whether it would work on .jpg's.

I didn't properly remember, but I might have posted this question earlier this month, I tried looking for that post, didn't find, so posted again

Thanks

View Replies !    View Related
To Preload Or Not To Preload?
This is a first time post. I tried to dig out the information using the search function but was unable to find a former thread. So here goes:

On my website (www.apt2go.com) I use extensive SWF "slide show" presentations. I noticed at a customer site with an exceptionally slow download speed that when my page loaded there would be a BLANK where the SWF would play. I was embarrassed (I use cable and never heard complaints due to slow loading speeds), but maybe these people got tired of waiting and moved on.

Here's my dilema. I have added a "simple" preloader (from Swish's Tutorial) to a number of my SWF's on my web, for me with broadband if I clear my internet "cache" I will notice a loading delay the first time a page loads, but afterwards when I go back to that page, the SWF loads immediately and hence I don't need a PRELOADER to say 'LOADING'when the SWF is already cached and ready to go!

Question is how do I make a smart preloader that WON'T Play SCENE 1 (preloader) when the entire SWF is already on the local cache? Is there a way to progam such a requirement?

Should I just remove the preloader and accept the BLANK space during the initial load so I won't have to see "LOADING" every time I view a cached webpage?

Suggestions?

View Replies !    View Related
Preload THIS?
I built a preloader that works checks the contents of a movie clip. The data is loaded by xml that is converted to string.

The problem is that sometimes the image will load but the preloader will not activate. Or it is using old getByteTotal results, I was thinking that onData might be an answer but I have had no luck so far.


PHP Code:



 onClipEvent (load) {
    _root.homeHiLite.preloader.preloadActive = false;
    this._visible = false;
    bar100 = 209;
}
onClipEvent (enterFrame) {
    if (_root.homeHiLite.preloader.preloadActive == true) {
        this._visible = true;
        imagebytes_total = _root.homeHiLite.blankHolder.getBytesTotal ();
        imagebytes_loaded = _root.homeHiLite.blankHolder.getBytesLoaded ();
        totalkb = Math.round ((imagebytes_total) / 1024);
        loadedkb = Math.round ((imagebytes_loaded) / 1024);
        loadedOf = (loadedkb + "kb" + " " + "LOADED of" + " " + totalkb + "kb");
        loadbar._width = bar100 * (imagebytes_loaded / imagebytes_total);
        if ((imagebytes_total == imagebytes_loaded) && (imagebytes_loaded == imagebytes_total_two)) {
            this._visible = false;
            _root.homeHiLite.preloader.preloadActive = false;
            }
    }
    _root.homeHiLite.blankHolder.onData = function () {
        imagebytes_total_two = _root.homeHiLite.blankHolder.getBytesTotal ();
    };
}




This function loads the image into the movie clip.


PHP Code:



 function imageGroupItems (direction) {
    var loadThisFile;
    _root.homeHiLite.preloader._visible = true;
    if (_root.homeHiLite.imageGroup.length != 1) {
        _root.homeHiLite.folioImageNav.folioImageMore._visible = true;
        if (direction == "next") {
            _root.homeHiLite.imageGroupNo = _root.homeHiLite.imageGroupNo + 1;
            if (_root.homeHiLite.imageGroup.length == _root.homeHiLite.imageGroupNo) {
                _root.homeHiLite.imageGroupNo = 0;
            }
        }
        if (direction == "prev") {
            _root.homeHiLite.imageGroupNo = _root.homeHiLite.imageGroupNo - 1;
            if (_root.homeHiLite.imageGroupNo < 0) {
                _root.homeHiLite.imageGroupNo = _root.homeHiLite.imageGroup.length - 1;
            }
        }
    }
    loadThisFile = _root.homeHiLite.imageGroup[_root.homeHiLite.imageGroupNo][2].toString ();
    _root.homeHiLite.folioImageNav.folio_selected = _root.homeHiLite.imageGroup[_root.homeHiLite.imageGroupNo][3].toString ();
    _root.homeHiLite.blankHolder.loadMovie (loadThisFile);
    _root.homeHiLite.preloader.preloadActive = true;
}

View Replies !    View Related
Preload Outside Swf?
Can I preload outside .swf?

I have a movie that load outside .swf into the main window, on rollover, and it's a little slow to show! If I can preload the outside .swf at the same time I preload the main movie it should solve my problem!!!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved