Preloader That Displays Load Progress Tut
I've gone through the tutorial and it works on my computer. If I hit CTRL Enter twice I'll see the preloader play. It doesn't seem to work on my website though. I've cleared out the internet cache and the files but when I click on the link I just see an empty white box until the movie starts playing.
You can see the movie here: http://www.sweeperhead.com/dojo/videos.htm It's the upper left video I'm testing this on. Can someone please tell me what I'm doing wrong or... if you test it and you see the preloader let me know that too! I'm on a T3 at work and that might have something to do with why I'm not seeing it but I don't think the screen should be white for as long as it is...
Much Thanks,
Sara
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 02-03-2005, 10:01 AM
View Complete Forum Thread with Replies
Sponsored Links:
Preloader That Displays Load Progress Tut
I've gone through the tutorial and it works on my computer. If I hit CTRL Enter twice I'll see the preloader play. It doesn't seem to work on my website though. I've cleared out the internet cache and the files but when I click on the link I just see an empty white box until the movie starts playing.
You can see the movie here: http://www.sweeperhead.com/dojo/videos.htm It's the upper left video I'm testing this on. Can someone please tell me what I'm doing wrong or... if you test it and you see the preloader let me know that too! I'm on a T3 at work and that might have something to do with why I'm not seeing it but I don't think the screen should be white for as long as it is...
Much Thanks,
Sara
View Replies !
View Related
Preloader That Displays Progress
Hi, I
was able to follow this tutorial succesfully and all works fine.
http://www.kirupa.com/developer/mx/preloader.htm
I just have one question, why do I still get a white blank spot (with the same size of my movie) right before displaying the loading process... any clue?
You can see it here www.janav.com, I am using the preloader in the main page and also in the pictures link..., it shows more on Netscape than IE.
Thanks,
Jana
View Replies !
View Related
Multiple Load Progress Displays
I've created an Xml gallery and want to display the load progress of each image in the space where the thumb will be. I have nested a progress movieClip in each instance of the image movieClip, load the image through a MovieClipLoader object and monitor progress with a listener object. I cant seem to link the correct instance of the progress movie clip to each each loading movieClip's listener object. At best only the last instance of the progress movieClip is updated. So my question is, how do I pass the nested movieClip of a loading movieClip to a function via the loading movieClip's listener object ? thanks for any suggestions.
here is the relevant code:
Code:
this.createEmptyMovieClip("imgMatrix_MC", this.getNextHighestDepth() );
function createMatrix(obj) //obj is 2 dimensional matrix of nodes
{
for(objIndex = 0; objIndex < obj.length; objIndex++)
{
subObj = obj[objIndex].childNodes;
for(subObjIndex = 0; subObjIndex < subObj.length; subObjIndex++)
{
img_MC = imgMatrix_MC.createEmptyMovieClip("img_MC_x"+objIndex+"y"+subObjIndex+"_MC", imgMatrix_MC.getNextHighestDepth() );
progress_MC = imgMatrix_MC.createEmptyMovieClip("progress_MCx"+objIndex+"y"+subObjIndex+"_MC", imgMatrix_MC.getNextHighestDepth() );
// [code for img_MC placement on grid and progress_MC]
var loaderObj_MCL:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
mclListener.onLoadProgress = function(thisLoading_MC:MovieClip)
{
percentL = Math.ceil( thisLoading_MC.getBytesLoaded() / thisLoading_MC.getBytesTotal() * 100);
updateProgressMC(?????, percentL)
};
loaderObj_MCL.addListener(mclListener);
loaderObj_MCL.loadClip(subObj[subObjIndex].attributes.img, imgMC);
}
}
}
function updateProgressMC(progressMCToUpdate, percentDone) []
View Replies !
View Related
Preloader Lag, Has To Load 70k In Frame 1 Before It Displays...help
I looked at my bandwitch profiler and realized why my preloader wouldn't pop up until 80% or so, the movie had to load around 70k in the first frame before it would display it. So I read somewhere to uncheck any symbols in the library that have the "export in first frame" option checked...i did, it only saved my 3k or so. So how can I fix my problem? How can I make frame 1 not load a ton on stuff (since the only thing on the stage is the preloader)?
-Tim
View Replies !
View Related
AS3 Preloader Stops And Displays External Swf At Only 10% Of Load
Can somebody help me with this?
I have this code so far...
// Set up the loader object
var request:URLRequest = new URLRequest("biped_walk_think_v1.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Progress Event.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loadComplete);
// Update the percentage display
function loadProgress(event:ProgressEvent):void
{
var percentLoaded:Number = event.bytesLoaded / event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
this.percentLoaded.text = String(uint(percentLoaded)) + "%";
}
// Load complete, hide the animating graphic and text
function loadComplete(event:Event)
{
trace("Load Complete");
this.thing.visible = false;
this.percentLoaded.visible = false;
}
loader.load(request);
this.addChild(loader);
View Replies !
View Related
F8 - Files Load, But Preloader Progress Bar Doesn't Appear
Can anyone tell me why the preloader script below might not be working correctly in all browsers? It definitely loads the files properly, but the progress bar does not show in firefox. It just shows a blank screen until the files are 100% loaded, then the enter site logo appears.
I have tried the following things:
1. Using relative vs absolute file paths for the external swfs makes no difference to the behaviour.
2. Changed publish settings to export AS classes in other than the first frame - didn't have any anyway. No change.
3. Unchecked "export in first frame" for absolutely everything. Tried both checking and unchecking this for the actual loader_mc. No change.
I'd post my fla instead of code, but I'm using Flash 8 and can't save any earlier than MX2004 and people don't really seem to look at them that much when I post them. If anyone would like to see, I will upload.
Please help, I'm at wit's end!
Preload code (on main timeline)
Code:
stop();
onEnterFrame = function()
{
if(!isNan(Percent))
{
Total = Math.floor (616);
//original code using getBytesTotal to get the total
//preloader behaves exactly the same in firefox no matter
//which method i use.
/*
(load_container._level1.getBytesTotal()/1000)+
(load_container._level2.getBytesTotal()/1000)+
(load_container._level3.getBytesTotal()/1000)+
(load_container._level4.getBytesTotal()/1000)+
(load_container._level5.getBytesTotal()/1000)+
(load_container._level6.getBytesTotal()/1000)+
(load_container._level7.getBytesTotal()/1000)+
(load_container._level8.getBytesTotal()/1000)+
(load_container._level9.getBytesTotal()/1000)+
(load_container.getBytesTotal()/1000);
*/
Loaded = Math.floor (load_container._level1.getBytesLoaded()/1000)+
(load_container._level2.getBytesLoaded()/1000)+
(load_container._level3.getBytesLoaded()/1000)+
(load_container._level4.getBytesLoaded()/1000)+
(load_container._level5.getBytesLoaded()/1000)+
(load_container._level6.getBytesLoaded()/1000)+
(load_container._level7.getBytesLoaded()/1000)+
(load_container._level8.getBytesLoaded()/1000)+
(load_container._level9.getBytesLoaded()/1000)+
(load_container.getBytesLoaded()/1000);
Percent = Math.floor((Loaded/Total)*100);
//trace ("total = " +Total);
//trace ("loaded = " +Loaded);
//trace ("percent = " +Percent);
if(Loaded != Total && Total >= 4)
{
loader_mc.gotoAndStop(Percent);
}
if (Percent == 100 && Total > 4)
{
delete this.onEnterFrame
loader_mc.gotoAndStop(Percent);
}
}
}
Loadfiles code - sitting on the container movie (which is on the stage) at the moment because I've been experimenting with moving it around. Not the best place, but where I put it doesn't seem to make a difference to the behaviour.
Code:
onClipEvent (load)
{
loadMovieNum("loop.swf", 1);
loadMovieNum("bottlesmasked.swf",2);
loadMovieNum("first.swf",3);
loadMovieNum("gallery.swf",4);
loadMovieNum("location.swf",5);
loadMovieNum("menu.swf",6);
loadMovieNum("private.swf",7);
loadMovieNum("winelist.swf",8);
loadMovieNum("nav.swf", 9);
}
onClipEvent (enterFrame)
{
//make the loaded movies invisible
for (i=1; i<10; i++) {
set("_level"+i+"._visible", false);}
}
View Replies !
View Related
F8 - Files Load, But Preloader Progress Bar Doesn't Appear
Can anyone tell me why the preloader script below might not be working correctly in all browsers? It definitely loads the files properly, but the progress bar does not show in firefox. It just shows a blank screen until the files are 100% loaded, then the enter site logo appears.
I have tried the following things:
1. Using relative vs absolute file paths for the external swfs makes no difference to the behaviour.
2. Changed publish settings to export AS classes in other than the first frame - didn't have any anyway. No change.
3. Unchecked "export in first frame" for absolutely everything. Tried both checking and unchecking this for the actual loader_mc. No change.
I'd post my fla instead of code, but I'm using Flash 8 and can't save any earlier than MX2004 and people don't really seem to look at them that much when I post them. If anyone would like to see, I will upload.
Please help, I'm at wit's end!
Preload code (on main timeline)
Code:
stop();
onEnterFrame = function()
{
if(!isNan(Percent))
{
Total = Math.floor (616);
//original code using getBytesTotal to get the total
//preloader behaves exactly the same in firefox no matter
//which method i use.
/*
(load_container._level1.getBytesTotal()/1000)+
(load_container._level2.getBytesTotal()/1000)+
(load_container._level3.getBytesTotal()/1000)+
(load_container._level4.getBytesTotal()/1000)+
(load_container._level5.getBytesTotal()/1000)+
(load_container._level6.getBytesTotal()/1000)+
(load_container._level7.getBytesTotal()/1000)+
(load_container._level8.getBytesTotal()/1000)+
(load_container._level9.getBytesTotal()/1000)+
(load_container.getBytesTotal()/1000);
*/
Loaded = Math.floor (load_container._level1.getBytesLoaded()/1000)+
(load_container._level2.getBytesLoaded()/1000)+
(load_container._level3.getBytesLoaded()/1000)+
(load_container._level4.getBytesLoaded()/1000)+
(load_container._level5.getBytesLoaded()/1000)+
(load_container._level6.getBytesLoaded()/1000)+
(load_container._level7.getBytesLoaded()/1000)+
(load_container._level8.getBytesLoaded()/1000)+
(load_container._level9.getBytesLoaded()/1000)+
(load_container.getBytesLoaded()/1000);
Percent = Math.floor((Loaded/Total)*100);
//trace ("total = " +Total);
//trace ("loaded = " +Loaded);
//trace ("percent = " +Percent);
if(Loaded != Total && Total >= 4)
{
loader_mc.gotoAndStop(Percent);
}
if (Percent == 100 && Total > 4)
{
delete this.onEnterFrame
loader_mc.gotoAndStop(Percent);
}
}
}
Loadfiles code - sitting on the container movie (which is on the stage) at the moment because I've been experimenting with moving it around. Not the best place, but where I put it doesn't seem to make a difference to the behaviour.
Code:
onClipEvent (load)
{
loadMovieNum("loop.swf", 1);
loadMovieNum("bottlesmasked.swf",2);
loadMovieNum("first.swf",3);
loadMovieNum("gallery.swf",4);
loadMovieNum("location.swf",5);
loadMovieNum("menu.swf",6);
loadMovieNum("private.swf",7);
loadMovieNum("winelist.swf",8);
loadMovieNum("nav.swf", 9);
}
onClipEvent (enterFrame)
{
//make the loaded movies invisible
for (i=1; i<10; i++) {
set("_level"+i+"._visible", false);}
}
View Replies !
View Related
Preloader Displays The Percentage In Eg. 23.000000000% Rather Than Just 23%
Hey all i'm usin this preloader and following the instructions i cant get it to dispaly just two characters of the percentage. Instead it displays two numbers then .00000000000000000000% which is not what i need, I can get it displayin just two numbers but then it wont actually wait for my swf to load, rather just increments ibytes by 2, which is what it is supposed to do in demo mode
http://opax.swin.edu.au/~403945/Simple.zip
any guidance needed
View Replies !
View Related
Preloader Problem - Movie Displays But Doesn't Run
I have created a preloader. It runs thru the preload scene as expected, goes to the first frame where the main movie starts - and stalls.
Preload layer has 2 frames
Frame 1:
ifFrameLoaded (_totalframes) {
gotoAndPlay(3);
}
Frame 2:
gotoAndPlay(1);
Main movie starts in frame 3
Load movie layer has 3 frames frame 1 has the movie, 2 is a blank frame 3 is a blank keyframe.
I have tried variations on the code:
if (_framesloaded >= _totalframes) {
gotoAndPlay(3);
}
and:
getBytesLoaded() and getBytesTotal().
Neither make any difference.
This was an existing file that I added the three preload frames to. The existing layers now consist of: Frame 1; blank keyframe, frame 2; empty, frame 3; contains all images, movies, etc. Please refer to attached jpeg image.
In Test Movie mode I set the display to Bandwith Profiler, and Frame by Frame Graph. Under Control, loop is checked (it does this whether I want it to or not). I click on Rewind under Control, then Show Streaming under View. The preloader runs, the frame display moves to frame 3, the main movie displays, and it sits there. If I click on frame 3 in the graph the movie runs.
Does anyone know what's going on? This is driving me nuts!
View Replies !
View Related
Tween Preloader - Displays Only After 40 Percent Loaded
Hi,
I found one interesting tutorial regarding the tween preloader here
Everything works good when I follow the tutorial,
My problem comes when I insert the following script:
Code:
var stageAlign_cb:mx.controls.ComboBox;
stageAlign_cb.dataProvider = ['T', 'B', 'L', 'R', 'TL', 'TR', 'BL', 'BR'];
var cbListener:Object = new Object();
cbListener.change = function(evt:Object) {
var align:String = evt.target.selectedItem;
Stage.align = align;
};
stageAlign_cb.addEventListener("change", cbListener);
Stage.scaleMode = "noScale";
When I insert this, the preloader only starts to display from 40 percent loaded but when I remove the above script the preloader displays correct from 0 percent
Can anyone help me to solve that?
Thanks
View Replies !
View Related
Load Movie With Formatted Dynamic Text (only Displays Images)
hi, i made a movie called clases.swf that contains a dynamic text(that contains images), and it works perfect, but when i load it into a main swf called arte.swf, it only displays the images without text.
here is the code of clases.swf
var format = new TextField.StyleSheet();
var path = "estilo.css";
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
my_txt.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load("clases.php")
myLoadVar.onLoad = function (success){
if (success == true) {
my_txt.variable = "texto"
my_txt.htmlText=myLoadVar.texto;
}
}
} else {
my_txt.text = "Error loading CSS file!";
}
};
how do i modify the code to load the dynamic text on the new invisible movie on arte.swf (on the main swf)???
please i need help urgently!!!!!!
View Replies !
View Related
Progress Bar In The Preloader
how do we make a progress bar using flash....
i need a preloader showing how much of the flash file(.swf) has been downloded into the local system,,and the downloaded file progress should be shown to the user
how is that done.. can it be done with flsh or only with the help of macromedia director..
how can it be done in flash plz help.....
View Replies !
View Related
Preloader Progress Bar
I've looked through every tutorial and sample .FLA I can find, but I can't seem to find the answer I'm looking for. Fourm.com uses a preloader on every section. It shows a progress bar that animates as it loads, even on small files (under 15kb). Is there a way to make that progress bar work without motion tweening? I'd like to use onClipEvent to animate it dynamically if possible. Any ideas?
Thanks!
View Replies !
View Related
[[[[[[ Preloader Progress Bar Help]]]]]
I 've made a flash 5 movie, wich is got a main movie with few telltargets into it.
The main movie line is about 50 frame, the movies to be targeted from it, are 4 and the longest one is about 255 frames.
So I've made a preloader progress bar into a new scene, and I divided the progress in 4 sections : 1% 50% 80% and 99% - 15 frames loaded, 25 frames loaded, 40 frames loaded and 50 frames loaded.
Strangely the progress it stay still on the 1% and all the 50 frames are loaded without showing the progress. And that makes me very very cross 'cause If I remove all the tell targets the progress bar works fine. So the problem is the Tell Targets. I've tried to put "Ifframe loaded<_path of the target>" but nothing is changed.
Can you please let me know why sometime Flash drives me mad not executing very simple operations like this ??
Thank godness for answering me !!
View Replies !
View Related
Using Progress Bar As A Preloader
The help topic on using a preloader is a bit confusing with reference to a progress bar as a preloader. I'm not sure what is meant by this:
"deselect Export in First Frame for any compiled clip symbols in your library.
Note: If you’re using the ProgressBar component to display loading progress, leave Export in First Frame selected for the progress bar.
"
Not sure where to find the option to select or deselect.
View Replies !
View Related
Progress Bar (not Preloader)
i want to show the current (play) progress of a swf without "tweening" a bar across the whole timeline of the scene, as i will have around 30 of these loadMovies. a script that could do this dynamically from the main swf would save alot of time.
ive looked around and see alot on preloaders/status bars but nothing to show realtime progress of the swf playing.
is this still a getBytesLoaded/total thing?
or sound.getBytesLoaded/total?
not really sure where to start!
im a graphic designer with flashMX 04 and an actionscript book so be kind.
View Replies !
View Related
No Progress On Preloader Bar
when i run in test the preloader shows up but there is no progress in the bar.
loadingbar is a rectangle movie clip. i used free transform and moved the registration point to the far left. thnks.
frame 1
bytesloaded=this.getBytesLoaded()
bytestotal=this.getBytesTotal()
this.loadingbar._xscale = (bytesloaded/bytestotal)*100;
if (bytesloaded == bytestotal) {
this.gotoAndStop(3);
}
frame 2
gotoAndPlay (1);
View Replies !
View Related
Preloader Bar Does Not Progress...HELP...eek
I have designed a web site using shell navigation (external swf`s loaded into master page using place holders) but for some reason i cant get the progress bar to work despite it previewing correctly. The data loaded values on the preloder update and work fine.
Its something do to with it being loaded externally
Go to www.omega-data.com and you will see what i mean.
Have attached a typical fla file
This is the last thing i need to get sorted ..its driving me bonkers
View Replies !
View Related
[F8] Preloader--progress Bar
Hi,
I want to install a preloader to my A2 website.
I found many options in the tutorials but I have a problem:
All the preloaders require to be installed in the beginning of the timeline.
I was working on my website since some weeks and it's sort of impossible to change all the frame numbers in the actionscript, well I just basically forgot the preloader...
could you suggest me a way to install a preloader functioning without it being in front of the movie?
all the best for 2009
Taner
View Replies !
View Related
Swf Progress Bar (not Preloader)
Hi all
I am attempting to place a progress bar into a swf that plays a separate swf or movie clip when triggered by a button. This is not a pre-loader bar, but a bar that displays what percentage of the movie clip has played. I can find plenty of online resources for a pre-loader, but nothing that helps for assembling a progress bar. Can anyone help?
Thank you in advance.
View Replies !
View Related
Progress Bar XML Load Of Swf
Hello,
I'm making a site where i load a bunch of swf files from a XML file.
But now i want a progress bar to show how far the file are loaded.
I used the script below to load all of the swf files from the xml file.
But know the progress bar only shows the progress of the first file loaded. And not of the total of all the files.
Can someone help me?
Thanx.
Greetings,
Spaantje
Ps. sorry for my broken English, i'm from the Netherlands
/* AS: */
Code:
my_pb._visible = true;
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
// Set the starting X and Y positions for the gallery images.
_global.thisX = 30;
_global.thisY = 200;
/* Set static values for the Stage's width and height.
Using Stage.width and Stage.height within the code results in
strangely positioned full images when testing in the Flash environment
(but the problem doesn't exist when published to a SWF file). */
_global.stageWidth = 970;
_global.stageHeight = 550;
// create array to hold data
var dataArr = new Array();
// XML object
dataXML = new XML();
dataXML.ignoreWhite = true;
dataXML.onLoad = function (success:Boolean) {
// this function takes care of the XML-data
if (success) {
// data loaded in successfully
// put XML data into dataArr
var d = this.firstChild;
dataLen = d.childNodes.length;
trace("----------------------------------------------------------------------");
trace("Aantal Clipjes: " + dataLen);
// loop over childNodes
for (var i=0;i<dataLen;i++) {
// get childNode
var cNode = d.childNodes[i];
// fill dataArr
dataArr[i] = {};
dataArr[i].href = cNode.attributes.href;
dataArr[i].swf = cNode.attributes.swf;
trace("----------------------------------------------------------------------");
trace("Array Href" +i+ ": " + dataArr[i].href);
trace("Array Swf" +i+ ": " + dataArr[i].swf);
}
//for (var i=0;i<dLen;i++) for (a in dataArr[i]) trace(dataArr[i][a]);
//
// remove XML object as much as possible
d.removeNode();
// Place Gallery
displayGallery(dataArr);
} else {
// failure to load in data successfully
throw new Error("Unable to parse XML");
}
}
dataXML.load("test_short_movies.xml");
/* ------------------------------------------------------------------------------------------------------------------ */
/* create a function which loops through the images in an array,
and creates new movie clips on the Stage. */
function displayGallery(dataArr:Array) {
var galleryLength:Number = dataArr.length;
var movieclip_names_array = new Array();
// loop through each of the images in the gallery_array.
for (var i = 0; i<galleryLength; i++) {
/* create a movie clip instance which holds the image. We'll also set a variable,
thisMC, which is an alias to the movie clip instance. */
var thisMC:MovieClip = this.createEmptyMovieClip("image"+i+"_mc", i);
movieclip_names_array[i]._alpha = 0;
/* load the current image source into the new movie clip instance,
using the MovieClipLoader class. */
mcLoader_mcl.loadClip(dataArr[i].swf, thisMC);
// attach the preloader symbol from the Library onto the Stage.
preloaderMC = this.attachMovie("preloader_mc", "preloader"+i+"_mc", 5000+i);
/* set the preloader's bar_mc's _xscale property to 0%
and set a default value in the progress bars text field. */
preloaderMC.bar_mc._xscale = 0;
preloaderMC.progress_txt.text = "0%";
// set the _x and _y coordinates of the new movie clip.
thisMC._x = _global.thisX;
thisMC._y = _global.thisY;
// set the position of the image preloader.
preloaderMC._x = _global.thisX;
preloaderMC._y = _global.thisY;
// if you've displayed 9 columns of images, start a new row.
if ((i+1)%9 == 0) {
// reset the X and Y positions
_global.thisX = 30;
_global.thisY += 80;
trace("new X Pos: " + _global.thisX);
trace("new Y Pos: " + _global.thisY);
} else {
_global.thisX += 80+10;
//trace("new X Pos: " + _global.thisX);
}
}
}
// define the MovieClipLoader instance and MovieClipLoader listener Object.
var mcLoader_mcl:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
mclListener.onLoadStart = function() {
};
// while the content is preloading, modify the width of the progress bar.
mclListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
var pctLoaded:Number = Math.round(loadedBytes/totalBytes*100);
// create a shortcut for the path to the preloader movie clip.
var preloaderMC = target_mc._parent["preloader"+target_mc.getDepth()+"_mc"];
preloaderMC.bar_mc._xscale = pctLoaded;
preloaderMC.progress_txt.text = pctLoaded+"%";
my_pb.setProgress(pctLoaded, 100);
};
// when the onLoadInit event is thrown, you're free to position the instances
mclListener.onLoadInit = function(evt:MovieClip) {
my_pb._visible = false;
evt._parent["preloader"+evt.getDepth()+"_mc"].removeMovieClip();
var movieclip_name:String = evt._parent["image"+evt.getDepth()+"_mc"];
var tween1:Tween = new Tween(movieclip_name, "_alpha", Regular.easeOut, 0, 100, 50);
/* set local variables for the target movie clip's width and height,
and the desired settings for the image stroke and border. */
var thisWidth:Number = evt._width;
var thisHeight:Number = evt._height;
/* Diepte opvragen (Get Depth) */
var diepte:Number = evt.getDepth();
evt.scale = 100;
/* scale the target movie clip so it appears as a thumbnail.
This allows users to quickly view a full image without downloading it every time,
but unfortunaltey also causes a large initial download. */
evt._xscale = evt.scale;
evt._yscale = evt.scale;
/* On MouseOver Start Play */
evt.onRollOver = function() {
this.play();
}
evt.onRollOut = function() {
//this.stop();
}
evt.onRelease = function() {
trace("----------------------------------------------------------------------");
trace("Name: " + evt._name);
trace("Depth: " + diepte);
trace("Url: " + dataArr[Number(diepte)].href);
var myLink:String = dataArr[Number(diepte)].href;
getURL('' + String(myLink) + '');
};
// if the mouse cursor was released outside of the movie clip, call the onRelease handler.
//evt.onReleaseOutside = evt.onRelease;
};
mcLoader_mcl.addListener(mclListener);
/* XML Code */
Code:
<?xml version="1.0"?>
<gallery>
<data href="pages.php?name=abn" swf="movies_swf_test_short/abn_amro.swf"></data>
<data href="pages.php?name=andrea" swf="movies_swf_test_short/andrea_bocelli.swf"></data>
<data href="pages.php?name=great_palaces" swf="movies_swf_test_short/great_palaces_of_the_world.swf"></data>
<data href="pages.php?name=nijntje" swf="movies_swf_test_short/nijntje.swf"></data>
<data href="pages.php?name=smit_clyde" swf="movies_swf_test_short/smit_clyde.swf"></data>
<data href="pages.php?name=vision_heal" swf="movies_swf_test_short/a_vision_to_heal.swf"></data>
<data href="pages.php?name=great_castles" swf="movies_swf_test_short/great_castles_of_europe.swf"></data>
<data href="pages.php?name=jongert_regatta" swf="movies_swf_test_short/Jongert_Regatta.swf"></data>
<data href="pages.php?name=treasures_earth" swf="movies_swf_test_short/treasures_of_the_earth.swf"></data>
<data href="pages.php?name=tycoons_nike" swf="movies_swf_test_short/tycoons_nike.swf"></data>
</gallery>
View Replies !
View Related
Load Progress
Having trouble getting load progress to work. The variable totalloaded is added as the clips are loaded and I'm trying to merge a number of onLoadProgress handlers. Is the following possible
function displayLoadProgress(_mc:MovieClip, loaded:Number) {
var loadedsofar:Number = totalloaded + loaded;
trace("loadedsofar "+loadedsofar);
};
loadHandler.onLoadProgress = displayLoadProgress;
logoLoadHandler.onLoadProgress = displayLoadProgress;
View Replies !
View Related
Xml Load Progress?
is there a way to know how much of your xml file is loaded?
it seems to me that with large xml files and slower connections the .onload isn't quite safe
and it is also nice to show ho much you still have to load of course
Hope someone knows about this...
thanx
View Replies !
View Related
Need A Simple Preloader Progress Bar
Hello guys,
Can anyone sort me out with a simple preloader progress bar, I cant get any on flash kit to work in my movie.
Its a movie in one scene about 100 frames long. i need to put the preloader in the first few frames of the scene.
Thanks for your help and time.
Stefan150
View Replies !
View Related
Preloader Progress Bar Direction
I did a tutorial that showed me how to create a preloader with a progress bar that loaded the bar from left to right.
I modified it to progress top to bottom for my own needs but would like to make it progress from bottom to top.
Can someone tell me how to do this?
Here's the code:
onClipEvent (enterFrame) {
_yscale = _root.percentDone;
}
Also, this is a bar/image that becomes visible as the page loads.
Is there a way to make the bar disappear as the page loads & reveal an image on a layer behind it?
Any help is appreciated.
Thanks in advance.
jmitteco
View Replies !
View Related
Progress Bar Of Preloader Not Moving, Please Help
Hello,
I've made a preloader, and the action script is working because the percentage complete number increases correctly, and once it is at 100% it moves the playhead to where it needs to go next, but I can't get the progress bar to move and show the percentage in a more visual way.
Here are the steps I went through when creating my preloader:
on my preloader sceen main stage I created a layer named preloader
using the rectangle tool without a stroke I made a bar
I converted the bar to a movie clip named preloaderMc
it has left registration
In the property inspector I named the instance of the MC preloader_mc
I double clicked the MC to work inside it
I selected and copied the bar, pasting it in place on to a new layer called progress, then changed it's color.
I made this bar into a MC called progessMc, it has left registration
I named the instance progress_mc
Then in the transform pannel I unchecked the constrain proportions box and put the percentage to 1%.
I locked the progress layer.
I made a new layer named percent_fld
I drew a text filed on the stage- with dynamic text
I typed in 100 and positioned it at the right side of the bar
In the property inspector, in the variable box I typed in display
Then I changed the number 100 to 0 instead
Back on the main scene I clicked on the mc to apply action scripting to it
I opened the actions pannel and switched to expert mode
this is the code I entered in:
onClipEvent (enterFrame) {
mctotal = _root.getBytesTotal () ;
mcloaded = _root.getBytesLoaded () ;
mcpercent = math.round((mcloaded / mctotal) * 100);
display = mcpercent + "%";
progress_mc_xscale = mcpercent;
if (mcpercent == 100) {
_root.play ();
}
}
Then I saved my file and tested my movie.
Once the swf was exported I turned on the bandwith profiler, and show streaming and put the debug spedd at 14.4.
As I said above the percentage loader shows accurately, but the progress bar doesn't grow to fill the space as it is loading.
If you can figure out what the problem is, please let me know. Thanks!
Kim
View Replies !
View Related
Progress Bar Preloader When Percentage Is Less Than 100
I should be able to figure this out but I've been hunting with Cheney.
Using basic prelaoding code
onClipEvent (load)
{
total = _root.getBytesTotal();
}
onClipEvent (enterFrame)
{
loaded = _root.getBytesLoaded();
percent = int(loaded / total * 100);
text = percent + "%";
gotoAndStop(percent);
if (loaded == total)
{
_root.gotoAndPlay(2);
} // end if
}
this works if I want to load the whole movie before playing, What do I need to change if I want the movie to start playing when 25% is loaded? Or a particular frame?
I can use teh ifFrameloaded but I'd like a progress bar.
Can the progess bar still show 100% loaded when the movie is only loaded 25%? So in reality it is saying 100% of the required prelaod is loaded.
Thanks so much
View Replies !
View Related
My Progress Bar Won't Work (Not A Preloader)
I am trying to create a progres bar to show how much of a movie, playing inside a dynamically created movie clip, has played. The ProgressMC is inside of a MC called mcHoldControls which also contains the play, FF, REV, and stop buttons. These buttons all work.
This is how I created the holder:
_root.createEmptyMovieClip("mcHold", _root.getNextHighestDepth());
The LoadBar code is below:
function checkLoadProgress(){
var cf = _root.mcHold.currentframe;
var tf = _root.mcHold.totalframes;
var pct = (Math.round(cf/ct * 100));
_root.mcHoldControls.ProgressMC._width = pct;
}
_root.mcHold.onEnterFrame = _root.mcHold.checkLoadProgress
Thank you in advance for any assistance.
Adam
View Replies !
View Related
Newbie / Preloader-progress Bar Help
Hello - building my first site. created a preloader.fla and also a master.fla that i want the preloader to load into.
1. when i preview just the preloader file, it starts displaying my flash page before the progress bar is complete.
2. when i preview my master file, the preloader does not work, but 2 splash pages load on top of each other.
--------------------
my actionscript for my preloader is:
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
var loaded:Number = Math.round((bytesLoaded/bytesTotal) * 100);
progressBar.gotoAndStop(loaded);
}
myListener.onLoadInit = function (target_mc:MovieClip) {
progressBar._visible = false;
}
myListener.onLoadStart = function (target_mc:MovieClip) {
progressBar._visible = true;
}
myMCL.loadClip("splash.swf", "container");
--------------------
my actionscript for my master file is:
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target_mc:MovieClip, loadedBytes:Number, totalBytes:Number) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes/totalBytes) * 100);
_level50.preloader.gotoAndStop(preloadPercent);
}
myListener.onLoadComplete = function(target_mc:MovieClip) {
_level50._visible = false;
}
myMCL.loadClip("splash.swf", 5);
myMCL.loadClip("preloader.swf", 50);
-----------------------------------------
can anyone see right off hand what my problem(s) are? also, i've gotten to this point with online tutorials and books and it would be most appreciative if you could reply in as simple as possible newbie terms - thx developers!
View Replies !
View Related
Progress Bar As Preloader Prob
Hi,
I can't get the progress bar to disappear once a video via FLVPlayBack has loaded.
I'm using the following code... any ideas anyone...
myBarListener=new Object();
myBarListener=function(eventObject) {
myBar._visible=false;
}
View Replies !
View Related
Progress Of A Movie (not A Preloader)
I am simply trying to display the frame number of a movie as it plays.
I have a dynamic text box with a var(iable) called framenum. I use an off stage movie clip with the following code attatched to the movieclip:
onClipEvent (enterFrame) {
framenum = _currentframe;
}
(I believe that you don't need to target the movieclip if the code is associated with that clip, although I have tried this as well)
Why doesn't this work please ?
Thanks
View Replies !
View Related
Have A Progress Preloader Problem
here is the script that i am using.
Code:
myMCL.loadClip("load.swf", 50);
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes){
_level50._visible = true
var preloadPercent:Number =Math.round((loadedBytes / totalBytes) * 100);
_level50.load.gotoAndStop(preloadPercent);
}
myListener.onLoadComplete = function (target_mc){
_level50._visible = false;
}
i have attached the prelaoder. i am wondering what i am doing wrong, because it is not working. could someone make a new fla file drop a pic into it, an then apply this script to see where i am makeing the mistake.
the purpose of this script is that it will load this particular image instead of numbers to display downloaded progress. if this doesnt make sence please ask.
thank you all in advance.
View Replies !
View Related
Progress Of A Movie (not A Preloader)
I am simply trying to display the frame number of a movie as it plays.
I have a dynamic text box with a var(iable) called framenum. I use an off stage movie clip with the following code attatched to the movieclip:
onClipEvent (enterFrame) {
framenum = _currentframe;
}
(I believe that you don't need to target the movieclip if the code is associated with that clip, although I have tried this as well)
Why doesn't this work please ?
Thanks
View Replies !
View Related
?load-progress Bar - K Vs Frames
How do I have my progress bar grow based on % of k loaded rather than % of frames?
Currently I have my loadbar displaying percentage of frames loaded- using _currentframe and _totalframes.
But my movie is a short intro animation and then a huge load of functionality in the last frame.
So the loading bar(which is counting frames) jumps from 2% to 98% and stays there until the last frame is fully loaded.
I believe I've seen swf 'apps' that display a progress bar based on filesize rather than #of frames. How is this done?
send email replies to dmroussin@hotmail.com
--thanx to all who disseminate their knowledge through forums such as this.
View Replies !
View Related
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
View Replies !
View Related
Movie Load Progress
I want the load progress of the to be tracked and when it finished loading I want the play head on the time line to resume play. Here is the code I have now
stop();
loadMovie("Intro.swf",1 );
What code do I need to add after this?
View Replies !
View Related
Sound Load Progress
I'm having issues getting the progress of an externally loading mp3.
I can load it, but what code should I be using to get the amount loaded, and amount total of the file?
Here's my current code, and I want to keep this as simple as I can....
ActionScript Code:
track = new Sound();
track.loadSound("music/track1.mp3", true);
percent = (track.getBytesLoaded() / track.getBytesTotal()) * 100;
setProperty(loadBar, _xscale, percent);
track.onLoad = function() {
_root.info = "Song has loaded";
};
track.onSoundComplete = function() {
_root.info = "Song complete";
};
Like I said, the song loads and will play, but I can't get the bar to show the load progress.
Also, I want to get just a text field that displays the elapsed and total time of the song.
Any help would be great!
Sean
View Replies !
View Related
Load Progress Problems
Hi, I'm trying to implement a progress bar. Currently, I load in the picture - there is a listener to tell when it is loaded, and then it fades in. I'm trying to add a progress bar to this, and not getting much success. Could someone point me in the correct direction? Thanks!
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.events.ProgressEvent;
var fadeIn:Tween;
var mainPicArea:MovieClip = new MovieClip();
var mainPicPlacementX:Number = 309.6;
var mainPicPlacementY:Number = 37.6;
var mainLoader:Loader = new Loader();
var mainRequest:URLRequest = new URLRequest();
function loadPic(picName):void
{
if (mainPicArea.numChildren)
{
trace("test " + mainPicArea.numChildren);
mainPicArea.removeChild(mainLoader);
}
addChild(mainPicArea);
mainLoader = new Loader();
mainRequest = new URLRequest ( picName );
mainLoader.load( mainRequest );
loadText_mc.visible = true;
mainLoader.addEventListener(ProgressEvent.PROGRESS, loadProgress);
mainLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, mainLoaded);
}
function loadProgress(event:ProgressEvent):void
{
var percent:Number = Math.floor( (event.bytesLoaded*100)/event.bytesTotal );
if(preloaderMC is MovieClip){
preloaderMC.gotoAndStop(percent);
}
if(percent == 100){
trace("DONE LOADING PIC");
}
}
function mainLoaded(event:Event):void
{
loadText_mc.visible = false;
mainPicArea.x = mainPicPlacementX;
mainPicArea.y = mainPicPlacementY;
fadeIn = new Tween(mainPicArea, "alpha", None.easeOut, 0, 1,12, false);
mainPicArea.addChild(mainLoader);
trace(mainPicArea.numChildren + "hello");
}
View Replies !
View Related
Jpeg Load Progress
Is it possible in flash mx to report the download progress of a jpeg in the same way that the progress of a downloading swf can be reported.
If so would it be correct to address the jpeg or the container into which the jpeg will be loaded and contained?
View Replies !
View Related
Using Progress Bar To Load Movie
is it possible to use the progress bar to display the load progress of the movie that the progress bar is placed in?
the only way i've seen the progressbar used is to display the load progress of a swf loaded into the loader component..in my case though i dont want to load anything in, i just want to drop the prog bar in the movie and have it load that movie
possible?
View Replies !
View Related
Load Progress Problem
Hi, I'm trying to implement a progress bar. Currently, I load in the picture - there is a listener to tell when it is loaded, and then it fades in. I'm trying to add a progress bar to this, and not getting much success. Could someone point me in the correct direction? Thanks!
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.events.ProgressEvent;
var fadeIn:Tween;
var mainPicArea:MovieClip = new MovieClip();
var mainPicPlacementX:Number = 309.6;
var mainPicPlacementY:Number = 37.6;
var mainLoader:Loader = new Loader();
var mainRequest:URLRequest = new URLRequest();
function loadPic(picName):void
{
if (mainPicArea.numChildren)
{
trace("test " + mainPicArea.numChildren);
mainPicArea.removeChild(mainLoader);
}
addChild(mainPicArea);
mainLoader = new Loader();
mainRequest = new URLRequest ( picName );
mainLoader.load( mainRequest );
loadText_mc.visible = true;
mainLoader.addEventListener(ProgressEvent.PROGRESS, loadProgress);
mainLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, mainLoaded);
}
function loadProgress(event:ProgressEvent):void
{
var percent:Number = Math.floor( (event.bytesLoaded*100)/event.bytesTotal );
if(preloaderMC is MovieClip){
preloaderMC.gotoAndStop(percent);
}
if(percent == 100){
trace("DONE LOADING PIC");
}
}
function mainLoaded(event:Event):void
{
loadText_mc.visible = false;
mainPicArea.x = mainPicPlacementX;
mainPicArea.y = mainPicPlacementY;
fadeIn = new Tween(mainPicArea, "alpha", None.easeOut, 0, 1,12, false);
mainPicArea.addChild(mainLoader);
trace(mainPicArea.numChildren + "hello");
}
View Replies !
View Related
Preloader / Progress Bar For Loaded .swfs
Hi,
I'm trying to get a progress bar to work which shows how much of my movie has loaded. I downloaded one from the tutorial site, but can't get it to work.
I have my main .swf (hetm.swf) and within that, I load other swfs (section1.swf, section2.swf, etc.), at various times into a movie clip I call "CurrentSection". For each of these swfs, I want the progress bar to show how much is loaded. What I have is:
iBytesTotal = _root.CurrentSection.getBytesTotal();
iBytesLoaded = _root.CurrentSection.getBytesLoaded();
iBytes = (iBytesLoaded/iBytesTotal)*100;
trace(ibytestotal);
trace(ibytesloaded);
setProperty("pBar", _xscale, iBytes);
sStatus = iBytes add "%";
There's other code (in other frames), but this is where I think the problem is. It seems as if its getting the totalbytes, and bytesloaded for the CurrentSection movie clip, not the swf that I'm loading into it. The trace commands both show a value of "10" (whereas section1.swf is about 1.5 megs of video).
Any ideas?
Thanks
Maria
View Replies !
View Related
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!
View Replies !
View Related
|