Solved

Preloading My Movie?

Posted on 2000-02-23
9
213 Views
Last Modified: 2010-04-03
How do I preload my flash movie, including sound, pictures and everything so that when the movie plays, there is no delay in it?

Also, how do i create a loading percentage progress bar indicator?
0
Comment
Question by:mhdhallak
[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
  • 4
  • 3
  • 2
9 Comments
 
LVL 3

Expert Comment

by:SuperMario
ID: 2556497
Get your total frame number. if you have 2 scenes, for example, and one is 200 and the other is 100 frames, your total would be 300.

Now, since you have 300 frames to load, every 3 frames that are loaded, that counts as one percent. But since we don't want 100 frames in our little preloader movie, let's make it 30 frames.

Make the progress bar movie with a stop action in the first frame. Then 1 frame down, have an image of the progress bar extending a little. You should have 10 frames total.

Now, in your preloading scene:

You need to code a lot of ActionScript here. Place an instance of your progress bar on the stage and call it "progress" .

You should look at this URL (which I'll put up in a few minutes) to further your understanding, because it's very hard to explain and quite a long process. I'll post a comment when the test .fla is uploaded.

I hope this helps you!

-Dan
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 2556557
Here's the URL for the FLA file. To view it and see the preloader in action, go to Control -> View Movie, then it Control + Enter which will invoke streaming.
0
 

Author Comment

by:mhdhallak
ID: 2556762
What is the URL? I think you forgot to include it in your comment.
0
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!

 
LVL 3

Expert Comment

by:SuperMario
ID: 2557778
Oh, you're right! I'm sorry.

http://www.catapultic.com/preload.fla

-Dan
0
 
LVL 2

Expert Comment

by:coopa
ID: 2600375
Supermario wrote...
> Now, since you have 300 frames to
> load, every 3 frames that are loaded,
> that counts as one percent. But since
> we don't want 100 frames in our
> little preloader movie, let's make it
> 30 frames.

Why not use this...

Set Variable: "LoadedFrames" = GetProperty ( "/", _framesloaded)
Set Variable: "totalFrames" = GetProperty ( "/",_totalframes)
Set Variable: "LOADEDsofar" = int((loadedFrames / totalFrames) *100) & "%"

If (loadedFrames < totalFrames)
      Go to and Play ("notloaded")
Else
      Go to and Play ("loaded")
End If

Where:-
LOADEDsofar = a text box variable (that displays the percentage loaded)
notloaded = a label used to loop again
loaded = a label used to skip the loop.

It's a little more complex but the results are better...  check out http://www.coopa.demon.co.uk/new/hifi.htm for a working example.
0
 

Author Comment

by:mhdhallak
ID: 2602775
Hi Coopa,

Ok. It seems good to me. But where should I put this script? i.e., in which frame?
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 2602871
Coopa's got this one - that's definitely a better solution if you're ready to tackle it =)

-Dan
0
 
LVL 2

Accepted Solution

by:
coopa earned 20 total points
ID: 2603685
Okay you use it like this...

1. Label in the first frame of the movie as "notloaded"

2. Add a text variable to the stage and name it "loadedsofar"

3. on the next frame create the following action (i.e. paste the code)
Set Variable: "LoadedFrames" = GetProperty ( "/", _framesloaded)
Set Variable: "totalFrames" = GetProperty ( "/",_totalframes)
Set Variable: "loadedsofar" = int((loadedFrames / totalFrames) *100) & "%"

If (loadedFrames < totalFrames)
      Go to and Play ("notloaded")
Else
      Go to and Play ("loaded")
End If

4. Label the 3rd frame "loaded"

That's it....  Let me know how you get on... I'll send you the .FLA file if you need it.

0
 
LVL 2

Expert Comment

by:coopa
ID: 2616312
mhdhallak, How did you get on with this ?
Did it work ?
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

Suggested Solutions

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

726 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