Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Progress Bar To Preload External FLV



Can someone tell me step-by-step, or point me to a tutorial site on how to make a progress bar to preload an external FLV from a server. I have checked on the net but can't find anything. All I can find is the code. That doesn't do any good when I don't know what to do with it. I have a progress bar to preload an internal file but I know that it is different when it comes to external videos. I am using Flash CS3 but Actionscript 2.0. Thanks in advance!!



Adobe > ActionScript 1 and 2
Posted on: 05/04/2007 01:03:33 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Progress Bar To Preload And External Flv From Server
Can someone tell me step-by-step, or point me to a tutorial site on how to make a progress bar to preload an external FLV from a server. I have checked on the net but can't find anything. All I can find is the code. That doesn't do any good when I don't know what to do with it. I have a progress bar to preload an internal file but I know that it is different when it comes to external videos. I am using Flash CS3 but Actionscript 2.0.

Thanks in advance!!

Preload External Swf With LoadBar Progress
hi anyone know how to to preloader for external swf which shows progress bar?
i've done it, but it doesn't work
if anyone has another way, plz help
i attach my fla

Thanks

Preload External Swf With LoadBar Progress
hi anyone know how to to preloader for external swf which shows progress bar?
i've done it, but it doesn't work
if anyone has another way, plz help
i attach my fla

Thanks

SWF Preload Progress Bar
Software: Flash 8 Professional
OS: Windows XP SP2

I don't know much about Actionscript and I'm hoping someone out there has a good example of Actionscript code that I can use to display a progress bar and perhaps percent loaded text while my SWF file is loading as an intro to my Web site.

Any help is greatly appreciated!

XML Preload Progress Bar
Hey'a!

Can someone please source me some code that preloads XML with a progress bar / percentage and once it has done that, reads from the XML file - Because atm, I have a progress bar and it loads etc etc, but then if I do a "preview with certain internet speed" it doesn't load the XML properly?

Heres my code:

Frame1

ActionScript Code:
feature_name = "intro";bar._visible = false;pText._visible = false;var xmlData = new XML();xmlData.ignoreWhite = true;xmlData.onLoad = loadXML;xmlData.load("snow.xml");this.createEmptyMovieClip("xmlPreload", this.getNextHighestDepth());xmlPreload.onEnterFrame = function(){    gotoAndStop(1);    var xmlLoaded:Number = xmlData.getBytesLoaded();    var xmlTotal:Number = xmlData.getBytesTotal();    var xmlPercent:Number = xmlLoaded/xmlTotal;    var xmlScale = xmlPercent*100;    if (isNaN(xmlScale) == false) {        bar._visible = true;        pText._visible = true;    }    trace(Math.floor(xmlScale)+" Before Del");    bar._xscale = xmlScale;    pText.text = Math.floor(xmlScale)+"%";    if (xmlLoaded == xmlTotal) {        trace(Math.floor(xmlScale)+" After Del");        delete xmlPreload.onEnterFrame;        gotoAndPlay(2);    }}


Then on Frame2 (where I want XML stuff to happen)

ActionScript Code:
function loadXML(loaded) {    if (loaded) {        myXML = this.firstChild;        myXMLLength = myXML.childNodes.length;        for (var i = 0; i < myXMLLength; i++) {            if (myXML.childNodes[i].attributes.feature == feature_name) {                _root.technology = myXML.childNodes[i].childNodes[0].firstChild;                _root.overview = myXML.childNodes[i].childNodes[1].firstChild;                //trace(myXML.childNodes[i].attributes.webaddress);                //trace(myXML.childNodes[i].attributes.image);                _root.image = myXML.childNodes[i].attributes.image;                break;            }        }        technology_txt.text = _root.technology;        overview_txt.text = _root.overview;    } else {        technology_txt.text = "Error Loading XML";    }}


Now if I preview the menu, it works - But if I preview that again (so it simulates a internet connection) the XML doesn't get loaded before it uses the data from it.

Preload Ext Swf With Progress Bar
Im trying to figure out how to show a progress bar on my empty.movieclip where I am loading an external swf/jpg

A visual of what I have not been able to accomplish is HERE

What I have done so far is.... created an empty MC instance "empty"

on the main timeline I simply said

empty.loadMovie('movie.swf');

Now Im trying to figure out how to add a progress bar to this, to let the viewers know something is coming. . . .

Im assuming I have to create a listener within the MC"empty", but Im not sure...

Preload Progress Bar As Mask?
I have a fairly typical preloader with an MC that scales along the x axis, and a dynamic textfield showing how many bytes have loaded, here is the code:

loaded = int((_root._framesloaded/_root._totalframes)*100);
percent = (_root.getBytesLoaded()/_root.getBytesTotal())*100;
bytesDisplay = Math.round(_root.getBytesLoaded() / 1024) add " KBytes loaded";
setProperty ("Bar", _xscale, percent);
if (Number(loaded) == 100) {
_root.gotoAndPlay("doneLoading");
} else {
_root.gotoAndPlay(_currentframe-1);
}


"Bar" is the instance of the movie clip that scales accordingly...now, what I'm want to do is mask "Bar" on top of a bitmap of equal size so that instead of seeing the "Bar" graphic the bitmap will appear. It doesn't work. I've tried putting the bitmap in an MC and adding the code:

setProperty ("bitmap", _xscale, "Bar")
-doesn't work either.

Is there a way to mask "Bar" onto something else and have the rest of the code still function?

Is there some other way to do it?

If so, what would the syntax look like?

Video . Progress Bar / Preload Bar
Hey all, I could use some help, if you can spare the time and knowledge.

I'm looking for the ability to create a preloading progress bar that allows me to play through to the percentage loaded (similar to how quicktime loads over the internet). EVB does this to handle all their video through flash ( www.evb.com click on the REEL to see what I mean) .. there are some other examples online, the most recent of which i've seen is the Seinfeld Superman promo

I know how to create preloaders, and I know how to create a progress bar controlling video embedded in a movie clip .. I don't know how to combine the two into this type of functionality. Thanks in advance for any help you all can offer.

Multiple Files Preload Progress?
Hi! I was wandering: how can I monitor the overall preload progress of a bunch of files preloading at once? I took a look to these 2 great classes:

http://code.google.com/p/bulk-loader/
http://code.google.com/p/queueloader-as3/

But I wasn't able to figure out how they can monitor the overall progress. I think you first should at least know the total weight of each file to load, but how could you retrieve it before starting to load it?

Anyone has any idea about the basic method of doing it?

[F8] Preload Progress Bar With Lot Of 'export In First Frame' Linkages
Normally I do loading bars by just checking if the frames have loaded.

With my current project, the bulk of my loading is a bunch of tiny icons that are all linkages and load before the first frame.

Is there any way to track progress on this loading time?

Displaying Preload Progress On An Mc That Uses Imported Assets?
Hello good people,

I'm having some difficulty with this asset malarky. I have managed after lots of trial and error (and internet tutorials) to create the rough outline of a Flash asset type database.

I need to load the asset swfs (one for each typeface) into asset loader MCs (as I must be able to import them one at a time), and then I need to give the user an indication of the download progress of that loader MC.

There is one problem with this, however. When preloading the loader MC, Flash only takes into account the filesize integral to that MC itself, completely ignoring the data that is imported into it.

So here is my problem - how can I make a preloader for this loader MC that somehow manages to display the FULL data size of the loader (and its imported data) and not just the loader file itself.

All I can think of now is to manually feed the data size into each loader file, but that seems rather awkward to say the least.

[edit]actually, that won't work, as that will give me the data total, but no info on how much of that has actually been downloaded... [/edit]

Hope some of you scripting geniuses can help me!

Thank you, thank you!

AS3 Monitor Progress Main Swf Loading (preload)
Never had any problem with loading and monitoring loading progress of external files.
Having some problems on monitoring progress of downloading of the main swf file...

------------------------------
In document class constructor:
I add listeners to loaderInfo of document class...

Code:
loaderInfo.addEventListener(Event.OPEN,openListener);
loaderInfo.addEventListener(ProgressEvent.PROGRESS,progressListener);
loaderInfo.addEventListener(Event.COMPLETE,completeListener);
and I create the object I'd like to use to visualize progression
(using a textfield now, but also tried dynamically drawn graphic bar)

Code:
loaderStatus = new TextField();
------------------------------

Code:
private function progressListener (e:ProgressEvent):void
{
trace("progress");

var percent:int = e.bytesLoaded / e.bytesTotal * 100;
loaderStatus.text = "Loading: " + percent + "%";
}

private function completeListener (e:Event):void
{
e.target.removeEventListener(ProgressEvent.PROGRESS, progressListener);
e.target.removeEventListener(Event.COMPLETE, completeListener);
trace("complete");
stage.removeChild(loaderStatus);
}
the progress and complete listeners give feedback through tracing.

the open listeners doesn't give feedback...
that's why I've moved the creation of the 'progression visualizer'
(whatever it is) inside the constructor of the document class...



I don't get it...
why we have a loaderInfo property accessible in root/document class
if it's useless to track the downloading of the main file


I've tried to search this and other forums
but I've find only info about preloaders in AS2, preloaders for external content
essential actionscript 3.0 from colin moock
has info about making a preloader in flash authoring environment
but it's using frame scripts...

shouldn't be possible to manage all the preloader stuff for the main clip
directly from the document class?
I know that I'm new to all this AS3 world but...

hope someone will read this
have a medium-size project and all my initial assets and class
have a dimension of approximately 300K so I absolutely need
a preloader for the main file


Any hints, suggestions, pointers are really appreciated
Thanks
Jo

Can I Preload A Swf And Also Preload An External Linked Swf With The Same Preloader?
Can i preload a swf and also preload an external linked swf with the same preloader?

i have one swf which is a site!

and one that is the music!!

but i want them both loaded together so they run at the same time??

this possible??

Preload External Swf Movies In One Preload ?
So, I take it there is no way to preload external swf movies in one initial preload?

does anybody have a clue or suggestion?

thanks.

Loading External SWF With Progress Bar
Hey,
I'm trying to load a eternal SWF inside a preloader SWF with Flash MX 2004. I can get the preloader to work, but not the progress bar. I attached the loader file (any SWF titled Belief.swf should load), hope someone could look at it for me and, idealy, make any corrections so it will work. I'm getting pretty frusterated.

Thanks,
Matt

External JPG Load Progress (please Help)
thanx for reading..

im trying to load external jpg using load movie..everything is working fine but i want to track the loaded bytes from that movie loading..here is the code,,

// Create a parent movie clip.
_root.createEmptyMovieClip("myMovieClip", 2);

// Create a nested movie clip.
myMovieClip.createEmptyMovieClip("imageHolder", 1);

and on a button click im loading the picture like this..

on (release)
{
// Load the JPEG into the nested movie clip.
_root.myMovieClip.imageHolder.loadMovie("images/01.jpg");
}

how to track how much of the image have been loaded..

thank u guys..

Noor

Progress Bar And External Movies
hi everyone!


i have my main movie that loads many swf files into it. i have a progress bar for the main movie but when i put it on the internet it doesnt take into account the loading swf movies, as a result they start randomly poping up all over the place.

is there a way to calculate all the external loading movies for the progress bar?

thanks

External Interface - FLV Progress Bar Help
So here is my actionscript:


Code:
import flash.external.ExternalInterface;
//custom class to display timecode
import Timecode;

ExternalInterface.addCallback("playVideo", null, playVideo);

//called from the javascript which points to a url
function playVideo(url:String):Void {
ns.play(url);
}

var scrubbing:Boolean;
var t:Number; // current playhead time (in seconds)
var totalTime:Number; // length of FLV (in seconds)

var playing:Boolean = true;

var scrubberLength:Number = movieScrubber.clipTimeline._width + 13;
var scrubRange:Number = scrubberLength - movieScrubber.scrubDot._width;
var volumeRange:Number = volumeSlider.volumeWedge._width - volumeSlider.volumeDot._width + 2;

var _nc:NetConnection;
var _ns:NetStream;

var oSound:Sound;
var soundLevel:Number;

var intID:Number;
var owner:MovieClip = this;
var buffer:Number = 3;
var volume:Number = 75;

// display FLV download progress
function updateProgress():Void{
var bl:Number = ns.bytesLoaded;
var bt:Number = ns.bytesTotal;
movieScrubber.loadProgress._width = Math.round(bl/bt * movieScrubber.clipTimeline._width);

if (bl > 4 && bt > 4 && bl >= bt){
trace("FLV loaded");
clearInterval(intID);
intID = null;
}
}

video_onStatus = function(info:Object):Void{
for(var i in info){
trace("onStatus: " + i + " = " + info[i]);
}

if(info.code == "NetStream.Play.Stop"){
// video is over
videoCompleted();
}
}

video_onMetaData = function(info:Object):Void{
for(var i in info){
trace("onMetaData: " + i + " = " + info[i]);
}

totalTime = info.duration;
ns.play(autoPlay ? false : true);
playing = autoPlay;

//gets duration and displays in min/sec.
var minutes2 = Math.floor(totalTime/60);
if (minutes2<10) {
minutes2 = "0"+minutes2;
}
var seconds2 = Math.floor(totalTime%60);
if (seconds2<10) {
seconds2 = "0"+seconds2;
}
totalTimeText.text = +minutes2+":"+seconds2;
}

// Play/Pause button handlers

playpauseClip.pause_btn.onRelease = function():Void{
ns.pause();
playing = false;
}

playpauseClip.play_btn.onRelease = function():Void{
ns.pause();
playing = true;
}

// Video scrubber

movieScrubber.scrubDot.onPress = function():Void{
this.startDrag(false, 0, 0, scrubRange, 0);
scrubbing = true;
playing = false;
// mute volume while scrubbing
oSound.setVolume(0);
}

movieScrubber.scrubDot.onRelease = function():Void{
this.stopDrag();
scrubbing = false;
playing = true;
ns.pause(false);
// restore volume
setVolume(soundLevel);
}

movieScrubber.scrubDot.onReleaseOutside = function():Void{
this.stopDrag();
scrubbing = false;
playing = true;
ns.pause(false);
// restore volume
setVolume(soundLevel);
}

movieScrubber.onEnterFrame = function():Void{
togglePlay();

if(scrubbing){
t = (this.scrubDot._x/scrubberLength) * totalTime;

// this pauses video until scrubber is released
ns.pause(true);
ns.seek(t);
}
else{
// NetStream.time method returns current playhead time
var scrubFactor:Number = ns.time/totalTime;
this.scrubDot._x = scrubRange * scrubFactor;
}
}

// Volume controls
volumeSlider.volumeDot.onPress = function():Void{
this.startDrag(false, 0, 0, volumeRange, 0);

volumeSlider.onEnterFrame = function():Void{
var v:Number = Math.round((this.volumeDot._x/volumeRange)*100);
soundLevel = v;
setVolume(v);
}
}

volumeSlider.volumeDot.onRelease = function():Void{
this.stopDrag();
delete volumeSlider.onEnterFrame;
}

volumeSlider.volumeDot.onReleaseOutside = function():Void{
this.stopDrag();
delete volumeSlider.onEnterFrame;
}

volumeSlider.speakerIcon.onRelease = function():Void{
var muted:Boolean = oSound.getVolume() == 0;

setVolume(muted ? soundLevel : 0);
}

function loadPreferences():Void{
setupVideo();
}

function setupVideo():Void{
// set volume properties
oSound = new Sound(this);
soundLevel = volume;
setVolume(soundLevel);

nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.setBufferTime(buffer);
player.attachVideo(ns);
intID = setInterval(updateProgress, 100);
totalTime = 1000;
ns.onStatus = video_onStatus;
ns.onMetaData = video_onMetaData;
}

function setVolume(v:Number):Void{
volumeSlider.volumeDot._x = Math.round((volumeRange*v)/100);
oSound.setVolume(v);
var speakerLevel:Number = Math.round(((volumeSlider.volumeDot._x/volumeRange)*100)/33)+1;
volumeSlider.speakerIcon.speaker_mc.gotoAndStop(speakerLevel);
}

function videoCompleted():Void{
// if video has ended, go to beginning
ns.seek(0);
ns.pause(loop ? false : true);
playing = loop;

}
function togglePlay():Void{
playpauseClip.pause_btn._visible = playing;
playpauseClip.play_btn._visible = !playing;
}

loadPreferences();

//get and display timecode via Timecode class
var tc:Timecode = new Timecode(ns);
this.onEnterFrame = function() {
trace(tc.getTimecode());
timecode_txt.text = tc.getTimecode();
}
and the js inside the html that triggers the player:


Code:
<script language="JavaScript">

var flashVideoPlayer;

function initialize() {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
flashVideoPlayer = (isIE) ? window['videoPlayer'] : document['videoPlayer'];
}

function loadVideo(video) {
flashVideoPlayer.playVideo(video);
}
</script>

<object classid=...I left this out...</object>

<a href="javascript:void(0)" onClick="loadVideo('my.flv');">test 1</a><br />
<a href="javascript:void(0)" onClick="loadVideo('http://#####.org/player/flvs/fantasy_arab.flv');">second test</a><br />
<a href="javascript:void(0)" onClick="loadVideo('flvs/FIRST.flv');">another test</a><br />
Almost everything is functional. But when I choose a new or second video from the ahrefs in the html, the progress bar does not reset. The progress bar (or loadProgress in the AS) only works for the first video I select after opening (or refreshing) the html page. Once the flv loads completely, the progress bar reaches its capacity, it won't reset. Its as if it thinks the video is already loaded, even though a second, or third flv will load and play. any help would be great.

Loading External Swf With Progress
Like in Lee's video: http://gotoandlearn.com/player.php?id=27

I've gotten the hang of loading them, but I still can't figure out how to add the progress percentage like in AS2.... call me woefully inept at AS3

Show Progress Bar Preloader, For External Swf
I've made preloaders inside the external swf's and loaded them that way. But I have files created through SwiftMp3, so I can't put the preloader in these files. So how can I go about showing a progress bar for the file. I'll be loading it through LoadMovieNum, so I won't be targeting a container. I've tried ways I thought would work, but no luck. Any help would be appreciated, thanks!

External Movie Clip/ Progress Bar
Hi,

I need help with using the MovieClipLoader class to load an external movie clip (called Belief.swf). Im using MX 2004 and am trying to make a simple preloader with a progress bar. I have gotten the clip to load but the progress bar dosn't work. I attached the file, it would be great if someone could look at it and tell me what I did wrong.

Thanks,
Matt

[F8] Progress Bar/Scrubber For External Movie
Hi guys,

I have built a flash presentation with 5 separate movies that load into a dropzone that play linearly. I am trying to do a scrubber for the loaded movie.... basically when the movie loads into the dropzone, the user is able to scrub through it. Any resrouces would be super helpful.

Cheers!!!

External Swf Preloader Progress Bar Problem
Please find attached 2 files home.fla and spinner.fla

Spinner.fla is an external movie that loads into home and is positioned using a placeholder

The Problem: the preloader bar works fine when I run the external spinner.fla movie on it's own, the problem is when I run the external spinner.fla movie via the main home.fla movie the progress bar does not appear although the loaded bytes etc works fine

Progress Bar External Image Load
Hello all,
I have a proplem I can't figure out.
I am making a portfolio website of images. These images are external files loaded using the loader component. I want to have a progress bar that gives feedback and disappears when the image is loaded and displaying. I've tried the progress-bar tutorials in "help" file and searched online but cannot find the answer as to how to get it too work.
My images load but slow so I need a progress bar. Thanks
(Flash CS3 A.S. 2.0)

The below code is I took from the tutorial on using component progress bar and modified it to my file. It's f-d up I'm sure. the progress bar and loader are on the same layer and the actionscript is added to that layer (as that's how they do it in the tutorial)
I'm trying to get the bar to function 0-100%, (that's what I though the listener was for) then I want it to become invisible when done loading.

"mainimage" is my instance of the picture loading component
"my_pb" is the instance name of the progress bar component


var mainimage:mx.controls.Loader;
var my_pb:mx.controls.ProgressBar;

my_pb.mode = "polled";
my_pb.source = my_ldr;

var pbListener:Object = new Object();
pbListener.complete = function(evt_obj:Object) {
trace("image loaded");
}
my_pb.addEventListener("complete", pbListener);


mainimage.autoLoad = false;
mainimage.contentPath = "images/handbridge.jpg";

// when autoLoad is false loading does not start until load() is invoked
mainimage.load();





























Edited: 03/04/2008 at 01:14:34 PM by studiotyphoon

Loading External MP3 And Showing The Progress
Hi,

I know how to load an external mp3 using the sound() functions.
I was wondering if there is a way to also show the progress of the bytes of the mp3 file already loaded by the movie.

Thanks in advance
StrIder

Pause AS Progress While Preloading External Swf ?
2 questions...

1.How to preload external SWF from my main movie? (Please don't tell me to search the forum, I already this and failed...)

2. I will need to put this preloader into while() loop maybe to pause AS progress? be cause I will need to unpause since it will be loaded

for (i=1; i<5; i++) {
var depth:Number = _root.getNextHighestDepth();
var mc:MovieClip = _root.attachMovie("linkagemc", "box"+i, depth);
this["box"+i].boxText.text = i;
}

I need to preload one SWF into each of this boxes, and it has to be done "one by one", so this loop has to be paused before the previous swf will not be loaded

Diplay Progress Of Loading External Swfs
Hi could someone help me please im having a problem i cant seem to resolve.

I am loading external SWFs into a movieclip called "content".

Nice and simple, and i can tell when the movie clip has loaded,
I have a transition effect that closes as the external SWF is being loaded and opens once the external SWF is loaded. This works fine.

However,
I need to display the external SWFs bytes loaded and bytes total.
And preferably percent loaded too.
Which I cannot seem to do for any.

Here is the code that works:


//ACTIONS FOR MC "content"

onClipEvent (enterFrame) {

if (!loaded && this._url != _root.Mymovie._url){

if (this.getBytesLoaded() == this.getBytesTotal()) {

loaded = true;
_root.Mymovie.transition.gotoAndPlay("opening");
}
}
}


I have tried to place the below code in many places in my movie,
on the "content" mc which the external files load into, in several places in the script and have dynamic text fields called "loadedbytes" and "totalbytes" to display the information but it just doesnt work.


loadedbytes = _root.Mymovie.content.getBytesLoaded();
totalbytes = _root.Mymovie.content.getBytesTotal();

-------

Could someone please help and give me the extact script and where to place it exactly to do this.

I know i can just simple place a preloader in each of the external
SWFs but this is not what i need to do as they are covered or hidden by the transition untill they are loaded and i want to display their loading progress at this point!

PLEASE HELP.....
Thank you very much

Angel

Preloader Delay And No Progress Bar On External .swf Movie
I would really appreciate any help with this. Basically my preloader at the beginning of my parent flash movie works fine with the progress bar moving as it loads and beginning at 1% and rising to 100% etc.

I have then applied the same code to an external .swf and changed _root. to _.this which partly works but for some reason nothing happen until it gets to 54% loaded (the external file is a 1mb in size so there is a bit of a wait) and the progress bar doesn't move at all. Any ideas?

http://www.binaryfinarydesign.com/lambretta/index.htm

Here is my code:

Frame1:
loadpercent = "0%";
loadBytes = "0 of " + Math.round((this.getBytesTotal() / 1024) * 1000) / 1000 + " Kb";

Frame2:
loadPercent = (Math.floor (this.getBytesLoaded() / this.getBytesTotal() * 100) + "%");
LoadBytes = (Math.round((this.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((this.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");
if (this.getBytesLoaded() == this.getBytesTotal()) {loadPercent = "100%"; loadBytes = (Math.round((this.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((this.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded."); this.gotoAndPlay("rangestart");}

Frame3:
this.gotoAndPlay (2) ;

Frame4: is labeled "rangestart"

Load Progress Of Multiple External Files
here's a brain twister.. at least for me:

how would one create ONE load progress bar for MULTIPLE external images? The idea is that the site would load multiple images at one time (or one after another) and the viewer would be able to see the progress via a load bar (but only one load bar.. not 50 if there were 50 images).


I know I've seen other sites do this before.

any ideas?

-Pez

Multiple External File Preloading Progress
I would like to load multiple files from outside of the .swf file, but I would like to make a counter/preloader that describes its progress either in

File 1 of 11 Loading
89 of 109kb Loaded

or

Loading Background1
--
Loading NavImg1
Loading NavImg2

But to update in the same textfields.
I have next to no experience with actionscript, so a tutorial would be great

http://www.snapmotion.com/flash/assignment/main.html

I want to have progress of each file until its loaded so that it can be reused again instead of having the old % preloader.

Diplay Progress Of Loading External Swfs
Hi could someone help me please im having a problem i cant seem to resolve.

I am loading external SWFs into a movieclip called "content".

Nice and simple, and i can tell when the movie clip has loaded thanks to
'Kirupa's Preloader and Transition for Dynamic Files.'

I need to display the external SWFs bytes loaded and bytes total.
And preferably percent loaded too.
Which I cannot seem to do for any.

Here is the code that works:


//ACTIONS FOR MC "content"

onClipEvent (enterFrame) {

if (!loaded && this._url != _root.Mymovie._url){

if (this.getBytesLoaded() == this.getBytesTotal()) {

loaded = true;
}
}
}


I have tried to place the below code in many places in my movie, on the "content" mc which the external files load into, in several places in the script and have dynamic text fields called "loadedbytes" and "totalbytes" to display the information but it just doesnt work.


loadedbytes = _root.Mymovie.content.getBytesLoaded();
totalbytes = _root.Mymovie.content.getBytesTotal();

-------

Could someone please help and give me the extact script and where to place it exactly to do this.

Thank you very much

Angel

Hook Up The Progress Bar Component For An External Swf With Loadmovie()?
How do i hook up the progress bar component to display a progress bar for an externally loading swf using loadMovie?

The swf is loaded with this action script on the frame it's being loaded into.

_root.new1.loadMovie("Quentin.swf");

any help would be appreciated. I am tearing my hair out...it's for a cd rom due this week.
thanks

Please Help...Checking External SWF's On Work In Progress (Flash8)
Please help...

I'm checking work in progress with external swf's and the output error log keeps looping an "error opening URL". I don't want to sound stupid but is this because I'm saving each file as an .fla and the ActionScript is in swf's??

[Flash8] Preloading External Jpgs With Progress Bar
Hey all,

I'm sure you've all heard this question plenty of times before, but I'm having real trouble.
I'd like to create a preloader for external jpgs, but all in one go not on an image access basis.

I've currently got a general preloader (for embedded images and such) that works great visually but would like to convert this so that it preloads external images. Is this possible?

I'm using Flash 8 and will be passing in a comma separated list of images. The final flash will be a rotating gallery of images that fade into each other. It works great for small files but the larger the image, the more the flash jumps due to the fact that the image isn't fully loaded. Hence the need for a preloader.

Many thanks!

Steve


Code:
stop();

var getVars = "largeimage.jpg,largeimage2.jpg,largeimage3.jpg";
//var getVars = _root.imageList;
getVars = getVars.split(",");
trace(getVars.length);

loadingBar._xscale = 1;
var loadingCall:Number = setInterval(preloadSite, 50);
function preloadSite():Void {
var siteLoaded:Number = _root.getBytesLoaded();
var siteTotal:Number = _root.getBytesTotal();
var percentage:Number = Math.round(siteLoaded/siteTotal*100);
loadingBar._xscale = percentage;
percentClip.percentDisplay.text = percentage + "%";
//percentClip._x = loadingBar._x + loadingBar._width;
//bytesDisplay.text = "loaded " + siteLoaded + " of " + siteTotal + " bytes";
if (siteLoaded >= siteTotal) {
clearInterval(loadingCall);
gotoAndStop(2);
}
}

Diplay Progress Of Loading External Swfs
Hi could someone help me please im having a problem i cant seem to resolve.

I am loading external SWFs into a movieclip called "content".

Nice and simple, and i can tell when the movie clip has loaded thanks to
'Kirupa's Preloader and Transition for Dynamic Files.'

I need to display the external SWFs bytes loaded and bytes total.
And preferably percent loaded too.
Which I cannot seem to do for any.

Here is the code that works:


//ACTIONS FOR MC "content"

onClipEvent (enterFrame) {

if (!loaded && this._url != _root.Mymovie._url){

if (this.getBytesLoaded() == this.getBytesTotal()) {

loaded = true;
}
}
}


I have tried to place the below code in many places in my movie, on the "content" mc which the external files load into, in several places in the script and have dynamic text fields called "loadedbytes" and "totalbytes" to display the information but it just doesnt work.


loadedbytes = _root.Mymovie.content.getBytesLoaded();
totalbytes = _root.Mymovie.content.getBytesTotal();

-------

Could someone please help and give me the extact script and where to place it exactly to do this.

Thank you very much

Angel

Hook Up The Progress Bar Component For An External Swf With Loadmovie()?
How do i hook up the progress bar component to display a progress bar for an externally loading swf using loadMovie?

The swf is loaded with this action script on the frame it's being loaded into.

_root.new1.loadMovie("Quentin.swf");

any help would be appreciated. I am tearing my hair out...it's for a cd rom due this week.
thanks

Not Determining External File Load Progress Correctly
I have a SWF that loads three external files that are passed to it dynamically. The loaded files are two JPGs and a SWF. Using a simple 3 frame design, I am trying to show a loader bar for the progress of the combined load of all three files. What is happening is that the signal that the load is complete is happening well before the load actually completes.

The design is shown below.

I know the problem lies in how I am calculating either bytes_loaded, bytes_total, or both as I have tested the progress bar in this very design with some hardcoded values and it works flawlessly.

I have read all over these forums about how a JPG load can not be tracked with a progress bar because Flash does not know the file size until it is fully loaded. However, I have also read how, even dynamically, placing the JPG in a SWF solves this problem. Perhaps, dynamically placing a JPG in a SWF as I do below does not solve this problem.

Hence, I have even tried hard coding the bytes_total to 10,000,000 (much larger than the sum of what is being loaded) and added the very first snippet of code in Frame 2. If no change in the number of loaded_bytes has occured from the last "loop", the loaded_bytes is incremented by 10,000,000, thus satisfying the load condition. In this case, my assumption is that if no change has occured in the loaded_bytes, all files must be loaded. This has no impact on the execution - it still acts as if all files are loaded almost immediately.

Does that tell me that the problem is in my calculation of bytes_loaded?

I simply want to show the progress of these three loads in a single progress bar and then hop out of the routine when it completes loading. I am fresh out of ideas and would appreciate another pair of eyes to see where I might be going wrong.

Scott

--------------
Frame 1:

// Create the container SWF
createEmptyMovieClip("backgroundLoader", 0);
backgroundLoader._visible=false;

// Draw the loader bar on level 4
_root.createEmptyMovieClip("BarLoader", 4);
_root.BarLoader.beginFill(0x555555);
_root.BarLoader.lineTo(0,0);
_root.BarLoader.lineTo(400,0);
_root.BarLoader.lineTo(400,20);
_root.BarLoader.lineTo(0,20);
_root.BarLoader.endFill();
_root.BarLoader._x=80;
_root.BarLoader._y=190;

// Load the first image to level 3
backgroundLoader.createEmptyMovieClip("Image1", 3);
backgroundLoader.Image1.loadMovie(Image1); // Image1 is a JPG that is dynamically passed to the SWF

// Load the second image to level 1
backgroundLoader.createEmptyMovieClip("Image2", 1);
backgroundLoader.Image2.loadMovie(Image2); // Image2 is a JPG that is dynamically passed to the SWF

// Load the animation to level 2
backgroundLoader.createEmptyMovieClip("Animation", 2);
backgroundLoader.Animation.loadMovie(AnimName); // Animation is a SWF that is dynamically passed to the main SWF

// Determine the size of what is to be loaded
bytes_total = (backgroundLoader.Image1.getBytesTotal() + backgroundLoader.Image2.getBytesTotal() + backgroundLoader.Animation.getBytesTotal());

// Setup the bytes loaded values
old_bytes_loaded=-1;
bytes_loaded=0;

----------
Frame 2:

// If the size has not changed since last loop, jump to the end of loading
if (old_bytes_loaded==bytes_loaded) {
bytes_loaded+=10000000;
}
else {
// Remember what was loaded from last "loop"
old_bytes_loaded=bytes_loaded;

// Check the bytes loaded
bytes_loaded = (backgroundLoader.Image1.getBytesLoaded() +
backgroundLoader.Image2.getBytesLoaded() +
backgroundLoader.Animation.getBytesLoaded());
}

// If everything is loaded continue with presentation
if (bytes_loaded >= bytes_total) {
gotoAndPlay(4);
}

// Otherwise, show the loader bar
else {
loadpercent=int(100*bytes_loaded/bytes_total);
_root.BarLoader._xscale = loadpercent;
}

-------
Frame 3:

gotoAndPlay(2);

Preloading Multiple External .swf’s With One Single % Loading Progress Status Bar.
Preloading multiple external .swf’s with one single % loading progress status bar.

------------------------------

Hi Guys I am in need of any flash dadio’s to help me with this one. I’ve been through loads of the preloading external stuff on the forums but non of them satisfy what I am after.

Right I have main.swf where I have a preloader % progress loading/status bar which is place in the first frame and preloads main.swf. fine.

Now what I want to do is make the preloader preload 4 external .swf’s so that when the preloader finishes it has preloaded main.swf and 1.swf, 2.swf, 3.swf, and 4.swf all within the % progress loading status bar which is in the first frame of the main.swf .

BTW – the external .swf’s (1,2,3 and 4) will be loaded into empty movie clips rather than onto levels.

If anyone could supply me with the source code or a working fla then that would be dope, as this level of action script will be over my head.

Thanks for any help any of you can provide.

Cheers
</2deep>
www.2deep.uk.com

HELP Progress Bar Doesnt Work How I Want It 2when Loading In Multiple External Files
ok i've spent all day trying to figure this out, and i'm sure to be fired soon if i dont get any work done, so any help would be more than welcome.

im loading 2 jpegs and a swf in externally, but i want my progress bar to only display them once everything has been loaded in. At the moment, they load in individually, which is not help to me.

I've tried setting the empty movieclips _visible to flase, but I think the problem is, when i try to set the _visible property to false, at the time nothing has been loaded into the empty movie clips.

plz help

left_column.loadMovie("images/1940s/background/left_column.jpg");
intro.loadMovie("xml/1940/intro.swf");
right_column.loadMovie("images/1940s/background/right_column.jpg");

loadingBar._xscale = 1;

loadingBar.onEnterFrame = function() {
kBytesLoaded = this._parent.left_column.getBytesLoaded()+this._pa rent.intro.getBytesLoaded()+this._parent.right_col umn.getBytesLoaded();
kBytesLoaded = kBytesLoaded /1024;

kBytesTotal = this._parent.left_column.getBytesTotal()+this._par ent.intro.getBytesTotal()+this._parent.right_colum n.getBytesTotal();
kBytesTotal = kBytesTotal/1024;

percentage = Math.round(kBytesLoaded/kBytesTotal*100);
this._xscale = percentage;
if (percentage == 99) {
delete this.onEnterFrame;


}
};

How To Preload An External Swf?
how to preload an external swf???

I need to load an external movie with load movie action,
but before i need to be loading hide in the main movie.

yes I can also load a swf into a MC and this movie can have a preloader itself. but is there a way to preload a movie.

thanks nicolas

How To Preload External Swf's?
I have made a movie for my small Gardening company. It exists of a menu and several movieclips (with contains the info about my company, services etc.) and some examples of gardens (pictures). These are 4 external swf's which the user/visitor can load through a loadmovie action.

This is what I like to happen:

1. The visitor get's a short preloader which loads the main things of the movie. Then DURING the time he/she is reading about my interesting stuff I want to PRELOAD the 4 external swf's so that by the time he/she would like to see the pictures the waiting time for loading the external swf's is minimal.

2. I want to load an external swf with a large soundfile for background/ambient. It contains birds, bee's and all kind of natural sounds. But I want the imported info loaded first! So the background sound may play when all other info is loaded. Should the sound in the movie be an event sound or streaming?

Question: how do I manage this? Once the timeline hits my first STOP (actionscript) the other movies are not loaded right?

Can someone help me?

Thanx very much!!

G.

Preload External Swf
Lost the cd with the fla, and im not gonna redo the file, it will take to long. Is there a way to load it through another main swf and once the external swf is loaded then later on i can call the loaded file in later on?

Preload External Swf Into MC
could anybody tell me how I can preload external
swf's into a MC (movieHolder or container) with loaderBar.... You could save me from going mental!

Preload External Swf Into MC
sombody must know how to do this...
help me OB1 your my only hope''

How do you pre load external swf's with loader bar
into a movie clip or movieHolder...

Preload External Swf
is it possible to preload an external swf?

i have a seperate swf file for music which the user can choose to have on or not, initially it is off. but i would like it to start preloading the music after the main swf has loaded so the user is not waiting too long, is this possible?

Preload External Swf
this is my preloading script:

onClipEvent (load) {
total = Math.round(_root.getBytesTotal()) + " bytes";
}
onClipEvent (enterFrame) {
download = Math.round(_root.getBytesLoaded()) + " bytes";
bytesleft = Math.round(_root.getBytesTotal()-_root.getBytesLoaded())+" bytes";
percent = Math.round(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"% Loaded"
if (_root.getBytesTotal() == _root.getBytesLoaded()) {
_root.gotoAndPlay( "Scene 1", 1 );
}
}

I want to add an external swf. I currently call (in frame 1, scene 1): loadMovieNum("flash2.swf", 1);

How can I get the contents of this swf preloaded with the _root swf? Any help out there?

How Can I Preload An External .swf
I've been using Flash for a while now.. but Im Fairly new to Action Scripts. Heres what I wanna do. I want my main swf to preload the external .swf. The reason is that i want the main movie to wait until the external movie is loaded to continue playing.

Ive tryed different stuff but IM STUCK!!!!!

Please Help!!

Preload External .swf's?
Does anyone have the code to preload (with a loader bar) an external .swf...

External Preload
Could someone get me pointed in the correct path to create preloading like the external loading going on on http://www.twinphotographie.com/

I want to have buttons that appear when the material they will show is preloaded.

Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved