?
Solved

preloading many scenes in a movie

Posted on 2003-02-28
11
Medium Priority
?
230 Views
Last Modified: 2010-04-03
I have a movie (quite large) devited in many scenes.....

I made a preloader in the begining

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
     this.gotoAndPlay(3);
}

in frame 3 a have a button that if i press it I will see the first scene......My scenes are like that:
loading
Scene 1
ex 1
ex 2
ex 3
end

Is this preloader for all scenes or only for the loading scene?

Thanks everybody
Have a nice day and a wonderful weekend ;)
0
Comment
Question by:agapikoutsi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +2
11 Comments
 
LVL 6

Expert Comment

by:henryww
ID: 8040945
hmmm i didn't really know since i don't use scenes at all.

i had just test that getBytesTotal and it actually counts all scenes, so the preloader would work for all scene too

:) cheers
0
 
LVL 5

Expert Comment

by:ocgstyles
ID: 8041594
Here is an idea...

Start the movie (Ctrl+Enter)
Click View > Bandwidth Profiler
Press Ctrl+Enter again to make the SWF stream.

The bandwidth profiler will tell you how big the SWF is.  Compare that with the getBytesTotal() value.  If they are just about equal, then it is probably preloading all scenes...

Not sure if this is correct, just a thought.
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 400 total points
ID: 8042303
since you are using "this" then the preloader is only checking for the bytes loaded of what ever "this" is...

You need to make a decision on how you want to preload the movie...  if you want the movie to play when an exact frame is loaded, then you need to use something like:

if(_framesLoaded <= _totalFrames){
//do something
} else {
//do something
}


If you want the preloader to play the movie when a set number of bytes are loaded, then you use the getBytesLoaded() method...

I prefer to use the frames method, because the Bandwidth profiler will tell you the number of frames that need to be loaded to have a smooth movie without stops...

I can email you a good preloader that displays a progress bar, the total download time left and bytes left...

just let me know...


rp



0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:henryww
ID: 8043299
hmmm ... that's something i didn't try, ....
i was using _root.getBytesLoaded instead of "this"...

so what is "this" and where is "this"? interesting ...

well, rp's got a pt too, i never trust the profiler it's like the IE download timer tells u its only 2 mins to go and ends up 2 hrs later.

cheers
0
 

Author Comment

by:agapikoutsi
ID: 8052541
rascalpants............please do........

My email is agapi_koutsi@hotmail.com
0
 
LVL 5

Expert Comment

by:elhy
ID: 8055521
the keyword "this" in this case should work like _root coz it is being called at the main timeline. unless the keyword "this" is being used in a mc, then it will refer to the mc itself.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8059238
I email you the .fla today


rp
0
 

Author Comment

by:agapikoutsi
ID: 8066285
Thanks my friend.......
Kisses
A
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8072007
A... come back and close the question...


kisses ;)
rp
0
 
LVL 6

Expert Comment

by:henryww
ID: 8072054
wow ... what is that ... kisses all around?

i didn't get any kiss!!
no, not from u rp .. thanks !! :)

ha ha ha
0
 

Author Comment

by:agapikoutsi
ID: 8074024
Thanks again.......
See u around........ ;)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question