?
Solved

preload swf video

Posted on 2005-03-04
5
Medium Priority
?
231 Views
Last Modified: 2009-02-06
HI experts,
I am trying to put swf videos on my site.
I would like to preload the video and show by percent how much it has loaded. Please help...
Thanks.
0
Comment
Question by:kephillips
[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
  • 2
5 Comments
 
LVL 16

Expert Comment

by:sam85281
ID: 13461966
Quick easy way:

1. Start your video on frame 5
2. On frame 4 put this code:
  loadedBytes = _root.getBytesLoaded();
  totalBytes = _root.getBytesTotal();
  totalKB = int(totalBytes/1024);
  if (loadedBytes<totalBytes) {
         percent = int((loadedBytes/totalBytes)*100);
        percent += "%";
        gotoAndPlay(1);
  } else {
  gotoAndPlay(5);
  }
3. Make a layer for text.
4. Put a blank keyframe on frame 5 of that layer.
5. Go to frame 1 of that layer.
6. Make some static text that says "loading" or something.
7. Next to that make a dynamic text box, empty, wide enough to where it will fit "99%"
    In that variable box type: percent
    Click the "characters" button and select 0-9, in the "include characters" box towards the bottom, put the percent sign.

That's it

-Sam
0
 

Author Comment

by:kephillips
ID: 13462448
Sam,
Thanks for your reply.
i have no clue how to work with flash. I DO have Flash MX so that should help.
Please explain though in newbie language.
Thanks.
0
 
LVL 16

Accepted Solution

by:
sam85281 earned 500 total points
ID: 13462533
Here's an fla with everything in place (except video of course) they keyframe where you would put your video is marked.

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

-Sam
0
 

Author Comment

by:kephillips
ID: 13465603
Sam,
Ok. that works (i think) except that it puts the video up in the top left corner...
0
 
LVL 16

Expert Comment

by:sam85281
ID: 13466140
You can drag the vido to wherever you want it.  Also if you want the stage to just be the size of the video, you can resize it. Top Menu=>Modify=>Document.

-Sam
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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 how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

762 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