Can anyone help with this? I'm trying to add a progress bar in Flash to help load a large video. The website is up and running, but the video pauses from time to time. You can view the site at www.diva-productions.com . Thanks.
Flash 2004 MX (need help)
Collapse
X
-
Re: Flash 2004 MX (need help)
Few questions:
1. Where are you hosting your site? That can be a large determining factor on how quickly your client can view the video. If you've got it up on some free space provided by your isp it's probably going to be slow.
2. Did you design the site? I usually use the flash video encoder, whch does all the buffering for you automatically.
3. If you like here's the pre load script I used for one of my sites
www.partybustours.com
This Script is placed on frame 1 of my first scene:
totalBytes = this.getBytesTotal();
loadedBytes = this.getBytesLoaded();
remainingBytes = totalBytes-loadedBytes;
percentDone = int((loadedBytes/totalBytes)*100);
totalBytes = this.getBytesTotal();
loadedBytes = this.getBytesLoaded();
remainingBytes = totalBytes-loadedBytes;
percentBar = int((loadedBytes/totalBytes)*100);
percent = int((loadedBytes/totalBytes)*100);
percentDone = percent+"%";
bar.gotoAndStop(percentBar);
if (_framesloaded == _totalframes) {
gotoAndPlay(3);
}
This Script is placed on frame 2 of my first scene
_root.gotoAndPlay(1);
In scene one I have a Dynamic Text Box with the variable "percentDone" This text box references the script above.... displaying the percentage you have done.
Anyhow, hope this helps! -
Re: Flash 2004 MX (need help)
Thanks Homeskillet. Yes I designed the site but my client already had a web hosting service, otherwise I would have used MJW. I had my action script set up similarly but not exact. I'll paste the script you gave in place and see if that does the trick. You also mentioned the flash video encoder. Could you explain that to me? Thanks again bro, big help.
Music is the answer, to your problems. Keep on movin', till you solve them.
sigpicComment
-
Re: Flash 2004 MX (need help)
I've tried it 2 ways so far. I first created a small loading animation in scene 1 and the video and it's controls are in scene 2. On the first frame in scene 1, I placed the action script you mentioned above (no reported errors). On the last frame I put gotoAndPlay(1). The loading animation plays but scene 2 with the video never shows up. I let it run for a while, the video is over 180mb though. How do I use that dynamic text which shows the progress?
At the bottom of scene 1 frame 1's action script, it is (_framesloaded == _totalframes) {
gotoAndPlay(3);} My entrance animation runs 11 frames. Should I put the video from scene 2 in scene 1 frame 12 and change the action script to gotoAndPlay(12)?
The second way I've tried is to use the progress bar from UI Components. I've never used that before, so much of that was a guessing game. It does however show up for a split second and then the video plays. It could be the video is loading faster than I was thinking.
Thanks again, I really do appreciate your input.
Music is the answer, to your problems. Keep on movin', till you solve them.
sigpicComment
[ms] Statistics
Collapse
Topics: 191,746
Posts: 1,236,950
Members: 53,129
Active Members: 67
Welcome to our newest member, newiron009.
Comment