Solved

Preloading My Movie?

Posted on 2000-02-23
9
215 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
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.

717 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