Nested Preloader Doesn't Work [renamed]
HelloI have a big trouble, in this case i use a pi e preloader but this only works in te principal timeline, (_root) but i need put all code and layers into a movieclip, so in the timeline only exist one moviclip that contain the preloader, this is for i need reposisionate the movieclip, so I copy al layers into a new movie clip, and the preloader not work, why? please i need help, i put the sorce so if anyone can help me to test te preloader please import into the scenario a image, so you can test and view how work, (i delete the image because the file is so big)please help meregards Pamela
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 09-08-2006, 09:57 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
GotoAndStop Doesn't Work With Scenes? [renamed]
...which has probably been asked before, but here goes anyway:
I'm working on a flash presentation, which comprises basically of a load of identical scenes, except for a variable which defines different content to be loaded into each one. anyway that's not the important bit because it seems to work fine. but! another element of the movie is creating a probably pretty simple unforeseen problem. the user navigates between scenes by clicking on a navigation area on the left hand side of the movie. this comprises basically of a series of buttons contained in a movie clip. each button is supposed to call a relevant individual scene, and the actionscript is pretty basic...
on (release) {
_root.gotoAndStop("scenename", 1);
}
but for some reason, it doesn't work!!! is there some kind of issue with regard to calling a new scene using a button that's contained inside a movie? by the way, the scene name is unique, and the movie that contains the buttons has an instance name... I'm baffled. somebody help!
thanks for reading. dar
Help: Createtextfield Doesn't Work When Nested
Hello,
Has anyone run into this problem? In my child.swf the text displays
perfectly. When I load this swf from parent.swf the text doesn't display.
Please look and help... I have been fighting with this for 2 days.
http://www.notbeshaken.com/help/parent.fla
http://www.notbeshaken.com/help/parent.swf
http://www.notbeshaken.com/help/child.fla
http://www.notbeshaken.com/help/child.swf
CHILD.FLA:
frame1:
myformat = new TextFormat();
myformat.font = "myFont";
myformat.color = 0x000000;
myformat.bold = true;
myformat.size = 12;
form.createTextField("text",2000,5,5,300,100);
form.text.embedFonts=True;
form.text.text = "Please describe your ideal match";
form.text.setTextFormat(myformat);
PARENT.FLA
frame1:
loadMovie("child.swf", mc);
Thanks,
--SL
Note: myFont has been exported on first frame.
Scrollable Type Doesn't Work When Swf Is Nested.
Ok, this has been killing me now for a week and I figured since this site rocks and I'm here daily I might as well ask you guys!
Alright, I have a Dynamic textbox that loads text from an external file. I created buttons to scroll the type up and down based on a tutorial I read. There is a "controller" movie clip that has this code:
if (_root.up) {
_root.text.scroll += 1;
} else if (_root.down) {
_root.text.scroll -= 1;
}
gotoAndPlay(1);
Here is the code for the Down button:
onClipEvent ( enterFrame ) {
if (lMouseover) {
_root.text.scroll += 1;
}
}
Now this works great when it's tested, but if I create a new, seperate movie and try to load that .swf into it (here's the code):
on (release){
loadMovie ("fmakers.swf" , "nested");
}
the scroll arrows no longer work. This goes for any tutorial I find online. They all work until they are loaded into another movie. I'm not sure where I have to fix the code but I think it might be in the _root.text part.
Please help. I'll be ever greatful!
Scrollable Type Doesn't Work When Swf Is Nested.
Ok, this has been killing me now for a week and I figured since this site rocks and I'm here daily I might as well ask you guys!
Alright, I have a Dynamic textbox that loads text from an external file. I created buttons to scroll the type up and down based on a tutorial I read. There is a "controller" movie clip that has this code:
if (_root.up) {
_root.text.scroll += 1;
} else if (_root.down) {
_root.text.scroll -= 1;
}
gotoAndPlay(1);
Here is the code for the Down button:
onClipEvent ( enterFrame ) {
if (lMouseover) {
_root.text.scroll += 1;
}
}
Now this works great when it's tested, but if I create a new, seperate movie and try to load that .swf into it (here's the code):
on (release){
loadMovie ("fmakers.swf" , "nested");
}
the scroll arrows no longer work. This goes for any tutorial I find online. They all work until they are loaded into another movie. I'm not sure where I have to fix the code but I think it might be in the _root.text part.
Please help. I'll be ever greatful!
Alpha Tween Doesn't Work On Nested Clip
I have a movie with a nested dynamic text movie clip moving changing and alpha.
It works fine from its own timeline, but when I run the movie in test mode or published the alpha does not change (the movement still works, but is somewhat jerky).
The FLA file is huge, so posting it is a problem. I am trying now to replicate the problem with a simpler project. But maybe someone is familiar with the issue and can give me a hint?
JP
Convert To BitMapData Doesn't Work With Nested Movieclips?
Hey all,
So i'm trying to do the following:
Take a movieclip called "MainMC" which has two movieclip's inside it "ANIM" and "SHADOW". Inside Anim and Shadow are png's to make up an animation on frames.
Now when I convert to bitmapdata like so:
Code:
var bmapData:BitmapData = new BitmapData(MainMC.width, MainMC.height, true, 0x00000000);
bmapData.draw(MainMC);
I end up getting a tiny little piece of the Movieclip when i convert to bitmap and add to the stage.
So i tired going in further with this:
Code:
var bmapData:BitmapData = new BitmapData(MainMC.ANIM.width, MainMC.ANIM.height, true, 0x00000000);
bmapData.draw(MainMC.ANIM);
This time I get most of the image but not all of it. This seems to be because the original png's are 150 by 300 pixels where as the ANIM Movieclip is scaled down to 100 by 200 pixels.
Any idea how I can overcome this?
Thanks!
Btn_mc.enabled Method Doesn't Work When Nested In A Function
Eg i have 3 btns:
//disables current btn and enables any previously pressed btns
btn1.onRelease = function(){
this.enabled = false;
btn2.enabled = true;
btn3.enabled = true;
}
btn2.onRelease = function(){
btn1.enabled = true;
this.enabled = false;
btn3.enabled = true;
}
btn3.onRelease = function(){
btn1.enabled = true;
btn2.enabled = true;
this.enabled = false;
}
how do i consolidate the enabled methods into 1 function to shorten the ovrall script?
i wanna achieve smthing like this though i know wat i type is wrg coz it doesn't work when i nest .enabled methods into a function:
function disableThisBtn(){
btn1.enabled = true;
btn2.enabled = true;
btn3.enabled = true;
this.enabled = false;
}
btn1.onRelease = disableThisBtn;
btn2.onRelease = disableThisBtn;
btn3.onRelease = disableThisBtn;
hope its not confusing.
Preloader Won't Work In Nested Movie
Help! I've got one movie which has its own preloader which works fine. In this movie, theres an event which calls in another movie clip which is displayed on the main stage using a movie clip instance.
The problem i have, is that the second movie which is being called in has its own preloader, which when tested in Flash works fine. But online its a different story.
The preloader of the second nested movie doesn't display and the secon movie just seems to loop round even though i have a stop event in it....
Can anyone help? I feel like i'm going round in circles here....Do preloaders even work when nested? If not, is there a work around?
Cheers
My Preloader Still Doesn't Work?
Hmm... I've redone my flash, everything seems to work unlike in the past, which most of my buttons are messed up *grin*
But still, i still have this problem with my preloader...
The flash seems to be stuck in the preloader screen and even thou it's fully loaded, it just won't proceed to the other page. Can anyone check to see if there's any mistake which I've made?
Thanks
the *.fla file is located in http://web.singnet.com.sg/~ongzilla/preload.fla
while my flash is situated in http://web.singnet.com.sg/~ongzilla/index.swf
My Preloader Doesn't Work On A MAC?
Does anyone know where I can find a preloader that works on a MAC and on a PC? Currently it only works on a PC.
Here's the code I'm using at the moment..
onClipEvent (enterFrame)
{
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded >= bytes)
{
_root.gotoAndPlay(2);
}
else
{
percentage = Math.floor(((bytes_loaded/bytes)*100))
myVar = percentage + "%"
}
}
Why Doesn't My Preloader Work?
Ok, can somebody please tell me why my preloader doesnt work? I've been through countless tutorials and I cant figure it out.
heres the .fla (220k)
http://www.moderndaysupplement.com/flash/sideflash2.fla
Why Doesn't This Preloader Work
So it works if i publish it in Flash 6 but not 7 and i have no idea why
here is the code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*.4;
if (percent>99) {
_parent.gotoAndPlay(2);
}
}
anyone? anyone?
Preloader Doesn't Work Anywhere
i've tried numerous preloaders to use in my flash movies, all of which i know work because i've seen them in action, but when i create a preloader in my movie, nothing preloads...the screen just stays white and then displays my flash movie after everything has loaded, but never shows the preloading screen...i've put the preloader in a scene before my main movie...i've put the preloader in the same timeline as my main movie...i've even made a preloader that loads an external movie...the external one is the one i've had the most luck with, but after the percentage reaches 100, it just sits there for about 8 seconds or so, and then displays my main movie...i don't know if it's the way i designed my movies or what, but i can't get any preloader to display the percentage loaded or anything before my main movie shows up...here is my external preloader -> preloader ...after it reaches 100, it'll hang there for about 8 seconds, then display my movie...if anyone can help me out as to why my preloaders don't show anything but a white screen, i would greatly appreciate it...
My Preloader Doesn't Work
i am loading an external .swf and i have a preloader attached to it, and it doesn't work. if i take the preloader away, the page works... can anyone help me out?
i have the preloader as its own mc... and its the first frame of the .swf.
it works on the previous .swf. am i coding something wrong?
Preloader Doesn't Work
I have an swf file as the main page and inside of it I load another
swf file into a blank area and inside of it another swf...
I try to make a preloader for each one of the swf by having another scene with the preloader on each one of the movies - this is the code I use in the first frame
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*271.6;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(3);
}
and this code in the second frame of the preloader scene:
_root.gotoAndPlay(1);
..But it works only for the main movie? why and how can I use it for all the others?
Preloader.. Doesn't Work >.>
I've put a preloader in a flash of mine, it's small.. but the preloader doesn't seem to work..
if I look at it in a browser.. it remains white.. and then suddenly there's my swf file.
however I did put in a preloader.
code:
ifFrameLoaded ("end") {
gotoAndPlay ("start");
}
in frame 1-5
and another layer with a little loop that links back so it keeps looping
that's also frame 1-5
and in frame 6 is the "start" but it just doesn't show at all..
I mean if it's small only like 200 KB.. but even then if it would've been done loading it'd show immediatly.. I wouldn't have to wait for it but now I do without the preloader..
Preloader Doesn't Work
Hello to everybody
I have a little problem with a preloader I've used a lot of times. This time I have a site of about 90 Kb. I have a preloader that's always worked perfectly but now it doesn't. Nothing shows on the screen for about 10 seconds and when the preloader finally apears it's showing 70 % loaded. I don't understand what's wrong on the movie.
Anybody can help me.
I use flash mx.
Thank you very much
Why Doesn't My Preloader Work?
I've had this problem tons of times before, and i still don't know how to fix it. The code should be fine, since i basically copied and pasted it. Furthermore, the preloader worked spontaneoulsly during some test runs (about every other time) without me changing anything. Can anybody help me?
Preloader Doesn't Work
have 2 frames with stop() on each and here is the cod in the first and big picture in second, test ....and nothing happens(I meen I can't see "loading...". why?
_root.stop();
_root.onEnterFrame = function() {
if (this.getBytesLoaded() == this.getBytesTotal()) {
delete this.onEnterFrame;
this.info_txt.removeTextField();
this.play();
} else {
var info_str = "Loading..."
this.createTextField("info_txt", 1, 0, 0, 0, 0);
this.info_txt.autoSize = "left";
this.info_txt.text = info_str;
}
}
My Preloader Doesn't Work
I am new to flash and I am almost done creating my site however, i can not get the preloader to work. I am using the following tutorial: http://www.actionscript.org/resource...der/Page1.html
The only difference with my preloader is the dimensions and that my bar is positioned vertically on the screen. thus i updated the loadBar._width = per*5.74; to suite. However when i publish it, nothing happens, the loading bar does not grow and the percentage does not show. I attached the code to the preloader movie clip. Any ideas as to why this is not working???
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*5.74;
if (percent>99) {
_parent.gotoAndStop(2);
}
}
Why Doesn't Preloader Work In IE?
My first Dreamweaver site (still under construction) and my first serious effort at a Flash presentation. The preloader which took me days to get to work right doesn't work in IE but fine in everything else. What's the problem?
http://www.families4change.org/Lifespan%20Media/FSP%20Dreamweaver/fsp.html
I Don't Know Why My Preloader Doesn't Work ?
I don't know why my preloader doesn't work,can somebody help me?
u can download it and look what's wrong inside...
(The file is a flash MX file)
Plz help !!!
Thank you!!!
by Ryan...
Doesn't Work Right With Preloader
For some reason, when I have a preloader my scrollbar in the "journal" section and loader in "emily" section don't load. Anybody know what might cause this?
With preloader:
www.ryancopeland.com/flash/index2.fla
www.ryancopeland.com/flash/index2.html
Without:
www.ryancopeland.com/flash/index3.fla
www.ryancopeland.com/flash/index3.html
HELP My Preloader Doesn't Work
Greetings. I'm having trouble getting a pre-loader to work. I have an external .swf file that I'm trying to load into an empty movie clip. This is my first time using MovieClipLoader and while onLoadStart and onLoadComplete seem to work onLoadProgress is skipped right over. My code is below and it will probably look familiar since I got it from this site. The traces come up in the output window indicating the start and the complete but all the things that should happen in the progress portion seem to get skipped right over.
many thanks in advance to anyone who can check into this for me. I'm about to go nuts!
bar._visible = false;
border._visible = false;
var empty = this.createEmptyMovieClip("container", "50");
empty._x = 35;
empty._y = 70;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
container._visible = false;
bar._visible = true;
border._visible = true;
pText._visible = true;
}
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*100;
pText.text = "% "+Math.round((lBytes/tBytes)*100);
}
preload.onLoadComplete = function(targetMC) {
container._visible = true;
border._visible = false;
bar._visible = true;
pText._visible = true;
trace(targetMC+" finished");
}
btnOne.onPress = function (){
my_mc.loadClip("bk1_mov.swf", "container");
lineDraw.gotoAndPlay(1);
one_mc._visible = true;
}
Preloader Doesn't Work...
Hello all,
This is the second time that I have had this problem . When I add a preloader to a flash movie that I gave made, it does not work. When you test the movie it just sits there and blinks really fast. Sometimes it works if you hit ctrl+enter a second time. I even tried to upload it to my site and it still would not work.
Here is a link to an SWF: http://www.webcontinuum.com/menu.swf
Here is the code that I placed on the movie clip that does the counting:
ActionScript Code:
onClipEvent (enterFrame) {
bytes = _root.getBytesTotal();
bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded == bytes) {
_root.gotoAndStop("frame1");
} else {
stop();
this.loader = "("+bytes_loaded+"/"+bytes+")";
}
}
I can also upload the fla if needed. Anyhelp is very much apreciated!
Preloader Doesn't Work When....
I have a preloader at the beginnen of my movie ... that works
perfectly fine, but when I want to use Linkage option
and export a sound and use it, but when I do this the preloader
doesn't work???
any ideas
My Preloader Doesn't Work
My preloader has been working properly until this time, and I don't understand why because I didn't even receive an error message.
My codes is
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per;
if (percent>99) {
_parent.gotoAndPlay(2);
}
}
Preloader Doesn't Really Work
I have a main movie...and when you click on a button there, it loads a new swf into a blank movie clip. I have two of these, each with a preloader...one is the guitar dude on the "home page" the other is under "what we create". One works where you can see it loading....the other...the CREATE one, waits before it even loads the movie. I know this movie is larger, but shouldn't the preloader work?
Location of movie:
http://www.rookscommunications.com
Here is the loading code:
1st frame:
percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);
myOutput.text = percent + "% is loaded";
2nd frame:
if (percent == 100){
gotoAndPlay(3);
}else{
gotoAndPlay(1);
}
Any suggestions?...so as to avoid the nothingness after you click.
Thanks!
Bar Preloader Doesn't Work...help With Script
hey...i know this is probably a stupid question, but i wanna know how you create just a normal percentage bar preloader...
what i've done is got a movie clip, with a bar that i've tweened over 100 frames to show it growing, and i've got a stop action on frame 1 of the clip!...then i've added this script to the first frame of the main timeline:
if (_root.getBytesTotal()>0) {
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
percent = Math.ceil((loaded/total)*100);
_root.bar.gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(3);
}
}
plus in frame 2, i put a gotoAndPlay (1) action...
i got this from another thread within the boards, but i doesnt seem to work for my movie when i uploaded it...
check this out on http://www.breakinankles.co.uk/version4/testpage.html
please!
so, can anyone walk me through the steps of how to create a bar preloader that shows how much of the movie has loaded, and one that actually works...please?????
cheers...
jeff oakley
www.breakinanklees.co.uk
Preloader Doesn't Want To BLEEEEP Work :(
Ok .. so this is my last hope ... coz i'm giving up on it... I have a movie... with buttons and movieclips. Now i have a button which opens an external movieclip into a movieclip in the main movie(thus having an kind of window in anotherwindow) I am trying to make a prelaoder for this external movieclip, so that it only opens after is has fully loaded. For this i put on the main timeline a loading text and a dynamic box which shows the %
I am using this
on (release) {
mm.loadMovie("home.swf", mainmovie);
}
on (release) {
percentloaded = Math.floor(mm.getBytesLoaded()/mm.getBytesTotal()*100);
percentdisplay = percentloaded+"%";
if (percentloaded == 100 && !initialized) {
initialized = true;
_visible = false;
}
}
now when i use this the % thingie doens't work and i get a NaN% instead of it nothing loads and it stops there.
but when i use this
on (release) {
loadMovie("home.swf", mainmovie);
}
on (release) {
percentloaded = Math.floor(_level2.getBytesLoaded()/_level2.getBytesTotal()*100);
percentdisplay = percentloaded+"%";
if (percentloaded == 100 && !initialized) {
initialized = true;
_visible = false;
}
}
the nan%still shows but the thing laods.... the funny thing is that the _level2 can be cahnged to _level1 or _level11 it doesnt matter what ever that is coz it still laods...
Can anyone help me please????
Preloader Doesn't Work On All Browsers
Flash MX
The preloader is in the main timeline of the top movie.
When a link is clicked (bikes, parts, home) the preloader runs and the loading movie (load_content) plays frame 2 when it is loaded.
This works fine on my windows XP machine using IE 6.
Doesn't seems to work (very well) on:
Netscape Nav 7 - Windows XP
Netscape Communicator 4.7 - Mac OS 9.2.2
Doesn't work at all on:
IE 5.1 - Mac OS 9.2.2
Preloader Script:
Preloader Script:
Frame 1:
play();
Frame 2:
loadedbytes = _root.load_content.getBytesLoaded();
totalbytes = _root.load_content.getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/100);
totalkbytes = Math.ceil(totalbytes/100);
frame = int(loadedbytes/(totalbytes/100));
Frame 3:
_root.preloader.loader.gotoAndStop(frame);
if (loadedbytes == totalbytes) {
_root.load_content.gotoAndPlay(2);
gotoAndStop("stop");
}
Frame 4:
gotoAndPlay(1);
Frame 5:
stop();
Please take a look at my site (currently under development) and report on how it performs on your os/browser. Any suggestions on how to make this script more compatibale accross all browsers/platforms are welcome.
It seems that the
loadedbytes = _root.load_content.getBytesLoaded();
totalbytes = _root.load_content.getBytesTotal();
in frame 2 of the preloader are not returning the variables (on all browsers).
Thanks.
View working flash here:
http://www.50ccmotocross.com/flash
(only home, bikes, and parts are currently active.)
Preloader Doesn't Work With Big Swfs
Hi all,
I composed a simple preloader using a progress bar:
//for the bar
this._xscale = (_parent.getBytesLoaded()/_parent.getBytesTotal())*100);
if (this._xscale > 99) {
with (_parent) {
play ();
}
}
and it works great on small swf files. the problem is that i have and 80k swf file where it only works during the last 5% or so. the pieces of the loader (text and the loader bar) don't even show up until this point. does anyone have any idea why this is? if so, i'd really appreciate any help you can give.
Preloader Doesn't Work When Using Loadmovie....help
Hey all,
I'm creating a site and when a button is pressed in the menu it loads a movie into an MC. And in the movie that's loaded I'm using a bar and percentage preloader.
Now when I test only the movie, that is not throught the menu, the preloader works fine.
But when I use it through the menu and with the loadmovie action, the preloader just jumps to 100% and stops there until the movie is loaded and then continues, in other words the preloader is pointless. Here's the preloader I'm using:
http://www.actionscripts.co.uk/tutorials/kimholland/01/
Does anybody have any clue of what I could do?
thanks in advance
Cetrez
Why Doesn't This LoadVars Preloader Work?
Here's the code:
---
// INIT VARS
var id = 123;
var letters = 9;
// create loadVars instance
get_row = new LoadVars();
// get 1 row from zoeken table
get_row.load("select_row.php?id="+id);
// if get_row is loaded
get_row.onLoad = function(){
if (vars_loaded){
// WORDS
// put results in array
woorden_array = woorden.split(" ");
// choose random word from array
choise = Math.floor(Math.random() * woorden_array.length);
// get random word from woord_array
woord = woorden_array[choise];
// determin length of woord
woord_leng = woord.length;
kb = woord;
//
// loop through woord, put letters verticaly in textfield
for (i=0; i<woord_leng; i++){
letter = woord.substr(i, 1);
f_letter = letter+"
";
woord_mc.f_woord += f_letter;
}
}
else {
// call load_check function
load_check();
}
};
//create interval for bytes check
row_preloader = setInterval(load_check, 100);
//
// FUNCTION LOAD_CHECK check bytes loaded
function load_check (){
var kb_loaded = Math.floor(get_row.getBytesLoaded()/1024);
kb = kb_loaded;
var kb_total = Math.floor(get_row.getBytesTotal()/1024);
kb = kb_total;
if (kb_loaded > 4 && kb_loaded == kb_total){
vars_loaded = true;
// stop checking bytes
clearInterval(row_preloader);
kb = "true";
}
};
---
Hope someone can help, many thanks in advance, Danielle.
Preloader Doesn't Work With Firefox?
http://circuspony.100free.com/the%20...dentsindex.htm
that's the page. the preloader works for me with internet explorer but not firefox. There isn't alot of content on the page so I tossed a large MP3 on there to give it something to load. The page shows up in firefox but it just skips the preloader. No sound ever comes on.
Preloader Doesn't Work With LoadMovie
hi!
I am creating a website and I have a main .swf file that loads other .swf files when needed. for each swf file I have created a preloader and all of them work fine individually (if I open the swf file directly).
The problem is when I make the loadMovie from the main swf, the file loads fine but jumps the preloader!!?? the animations starts imediatly and freeze when they have bigger things to load!
the preloaders are in a scene and have the folowing code:
bytesloaded = _root.getBytesLoaded();
bytestotal = _root.getBytesTotal();
percent= int(( bytesloaded / bytestotal ) * 100);
if(bytesloaded == bytestotal) {
gotoAndPlay(3);
}
else {
loadBar.gotoAndStop(percent);
}
I have read the other topic about preloading and loadmovie but I decided to post here because the problem is different.
Thanks a lot
please help, it's really really urgent!!
Preloader Doesn't Work In Firefox
hello,
I couldnt figure out why I couldnt get a simple preloader to work. I had been testing in firefox, and then tried it in explorer and it works fine. It has to do with the way I'm referencing the movies size.....when I do a trace in IE the variable bytes_total gives me a value of 99919 (which is correct) but in firefox it gives me a value of 0
Code:
frame 1
loadMovie("ext/images/entrees.jpg",placeholder);
frame 2
bytes_loaded = Math.round(placeholder.getBytesLoaded());
bytes_total = Math.round(placeholder.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
loadPercent = Math.round(getPercent*100);
loadPercent2 = loadPercent + "%";
if (bytes_loaded == bytes_total) {
gotoAndPlay(4);
}
frame 3
gotoAndPlay(2);
any input in the matter would really help me out
thanks
Heeeeeelp Preloader Doesn't Work On The Net
i have some pages that i used pictures as a background in them, these backgrounds got to be min 1024x768 so they are large files that decrease the speed of loading the site's content.. so i wanted to make a flash file that is an intro to the whole the site where i can load 2 or 3 backgrounds then they are saved in the temporary internet files so when entering the site after the flash is loaded the backgrounds are loaded instantly and thouigh the site's browsing speed increases...
the flash file goes like this.. a loading text, a loading bar (instance name 'bar') and an Mx.components.loader(instance name 'load1'), i set the path to "backgrounds/image1.jpg" (it's where the background is(suppose we are loading only one)) then set it's visibilty=false..two dynamic text boxes, one with instance name 'loaded' and one with instance 'total'.. then put all of the controls in 2 consequtive frames, without any stop or goto commands, so the flash goes between the 2 frames endessly.. so i can wright the code in the frames, and here the code goes like this :
Code:
var i=this._parent.load1.getBytesLoaded();
var i2=this._parent.load1.getBytesTotal();
var p=Math.floor(i/i2);
this.bar._width=p*173.3;
loaded.text=i/1024;
total.text=i2/1024;
if(p==1)
{
getURL("index.aspx");
}
I test the movie on my computer and it works just fine... the contents are loaded and the loaded KBytes keep increasing every second till it's equal to the total Kbytes and then the link is redirected, just as i wanted. Then i upload it on the server.. and open it from my browser, it doesnb't work at all, the bar's width is 0, and the textboxes are like this 0 / 0.0001231355 alot of numbers like that and sometimes it's Nan/Nan, i don't get it ? how this happens ? why does it work on my computer ?
Preloader Doesn't Work On Flash 8
Hi all,
I've been looking for a preloader that works in flash 8 in all kind of forums for the past 2 hours and I can't seem to find it.
I have this code in a preloader movieclip with another mc called loadBar and a dynamic text with a variable called percentage inside. And this is the code I have on it:
Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per;
if (percent>99) {
_parent.gotoAndStop(2);
}
}
I took it from another thread and it works fine when exported as flash player 6 and 7 but when I try it with Flash 8 it doesn't... it stays stopped in 0%. I don't know why, and I can't seem to figure it out. I only want to preload the general movie in which I charge the others and I'm getting desperate.
Thanks for the future help!
PS. I'm attaching the movie that I found in the other thread (in flash 4 and 5 forum I think). Please try to publish it in flash player 8 to see what I mean
Preloader For Sound - Doesn't Work
I have 3 frame animation. First frame looks like this:
this.stop();
this.onEnterFrame = function () {
var loadedbytes:Number = getBytesLoaded();
var totalbytes:Number = getBytesTotal();
frame = int(loadedbytes/(totalbytes/100));
_root.loader.gotoAndStop(_root.frame);
if (loadedbytes >= totalbytes) {
gotoAndPlay(3);
}
}
"loader" is a movie clip with one layer and 100 frames motion tween.
Second frame has only "gotoAndPlay(1);";
Third frame has a set of sound controls (taken from Flash F1 Help) and this code:
var song_sound:Sound = new Sound();
song_sound.attachSound("MrJack-Filmowa.mp3");
song_sound.setVolume(40);
if(!isPlaying){
song_sound.stop();
soundstop.gotoAndStop(10);
}
volume_mc.top = volume_mc._y;
volume_mc.bottom = volume_mc._y;
volume_mc.left = volume_mc._x;
volume_mc.right = volume_mc._x + 100;
volume_mc._x += 40;
volume_txt.text = 40;
volume_mc.handle_btn.onPress = function() {
startDrag(this._parent, false, this._parent.left, this._parent.top, this._parent.right, this._parent.bottom);
};
volume_mc.handle_btn.onRelease = function() {
stopDrag();
var level:Number = Math.ceil(this._parent._x - this._parent.left);
this._parent._parent.song_sound.setVolume(level);
this._parent._parent.volume_txt.text = level;
};
volume_mc.handle_btn.onReleaseOutside = volume_mc.handle_btn.onRelease;
soundstop.onPress = function () {
if(isPlaying){
song_sound.stop();
soundstop.gotoAndPlay(10);
isPlaying = false;
}else{
song_sound.start(0,4);
soundstop.gotoAndPlay(1);
song_sound.setVolume(60);
isPlaying = true;
}
}
stop();
Preloader doesnt work (doesnt show). The strange thing is, that if i use this preloader for a picture or sth else than sound, it works ok.
What's the problem?
Preloader+loadMovie=doesn't Work
Hello all,
I am working on a mini folio for my website. I have a main movie into which I am loading individual projects. I have a preloader with each project and what is happening is when I put the files on the server, the preloader will load to 100%, but not go to the next frame to show the project? Works like a dream locally of course. To see it online check out: http://www.erikwallace.com/folio/
Here is the code I am using for the preloader:
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();
}
}
Thanks to everyone for looking!
EW
My Preloader Doesn't Work Correctly
This is the fist site I make and it doesn't seem to work very well. The main problem is that the gallery ("imagenes") is quite big and it takes some time to load, it has a preloader but it doesn't appear until 70% of the movie is loaded.
How can I make the preloader appear when I click the button to open the gallery?
My site is:
www.geocities.com/plmorell
Tnkx for the help
My Preloader Doesn't Work Correctly
This is the fist site I make and it doesn't seem to work very well. The main problem is that the gallery ("imagenes") is quite big and it takes some time to load, it has a preloader but it doesn't appear until 70% of the movie is loaded.
How can I make the preloader appear when I click the button to open the gallery?
My site is:
www.geocities.com/plmorell
Tnkx for the help
Even With Working Preloader, It Doesn't Work
Hey guys,
I'm trying to preload a bunch of swf's and audio files. I got the preloader to preload 20% of each external swf and audio file which load together. However, even after the preloading, the swf takes a couple seconds to load and consequently is not in sync with the audio. Could this be b/c the swf is 1.3 mg large? I would think that preloading 20% of a file would allow for full streaming eventhough the files is so large.
Any ideas on how to make my swf sync with my audio?
In case you're wondering, my preloader preloads the video first, if the video preloads 20%, then I check if the audio is at 20%, if it is, then I go to the frame.
I hope this wasn't too confusing .
Preloader Actionscript Doesn't Work On Macintosh?
I recently constructed a one scene Flash site with a 'totalbytes' and 'getbytes' preloader (code below). The swf file plays fine on both platforms (PC-n-Mac). BUT the problem is that the preloader loops when published and played in a Mac Browser. It will not advance to the correct frame when loaded (frame 16). I have read numerous reviews on Java and FS errors on Mac browsers, will the 'getBytesLoaded' work on Mac browsers?
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1024);
totalkbytes = Math.ceil(totalbytes/1024);
if (loadedbytes == totalbytes) {
stopAllSounds ();
gotoAndStop (16);
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
Does this type of preloader / script work only on a PC browser? or is there something wrong w/ my script?
Note: Both browsers on my mac are current versions.
Thanks in advance for any help--Marcos
Preloader With External Movie Doesn't Work, Help Please
This simplistic loader does not work with an external movie loaded into level1 from level0 with this command:
loadMovieNum ("image.swf", 1);
(Image.swf movie frames)
FRAME 1:
ifFrameLoaded (5) {
gotoAndPlay (5);
}
FRAME 2:
gotoAndPlay (1);
FRAME 5:
The Image and a stop command
It does some funky stuff on level0. What needs to be changed so I can use this on my level1 movie?
Thanks
Bar Preloader In External Swf Doesn't Work Correctly
Prologue:
1) what's wrong with my preloader script?
or
2) is this a known issue with MAC OS9/IE5
and
3) and how can I test preloaders when they are in external .swfs
Developing on Windows98 and Flash 5)
My preloader, (which is script taken from PeachPit Press' Macromedia Flash5 Advanced book) does the following when viewed on a 56K modem/MacOS9/IE5:
It loops several times, then proceeds to SLOWLY run the preloader bar incrementally, except that it's now godawful slow. You can view it at our test site:
http://mccay.hitchcock.org/ADL/summi...dings/joe.html
the live version seems to load just fine on a dial-up (it doesn't yet include the preloader, and makes me wonder if a preloader is necessary for this one, but I want to know what makes this happen anyway...). It is here:
http://iml.dartmouth.edu/ADL/summit/...dings/joe.html
How I built it:
I used one main .swf which contains the non-changing components and title sequence (as a MC) and several external .swfs which contain the audio and timed text which are loaded and unloaded depending on which frame you are in of the main .swf.
I used external .swfs because, it was easier to time the text to the audio, and a little bird once told me that Flash degrades audio when it's put into an MC. Plus, Flash crashed every time I tried to export a movie with 11 minutes of streaming audio!
The popup menu ("Jump to Section") is also and external .swf which is loaded into level2.
Our network is too fast for me to test this project at work (and I read that the bandwidth profiler doesn't help with external .swfs), so I must go home for a slow connection, so i can never tell until that evening if what I've done has fixed the problem. Or if it's a problem that only occurs with a limited number of OS/IE combinations (I've encountered other funny little mac issues). So any comments on a better way to test a preloader in this situation are also helpful.
Here's the object script of my preloader, in the first frame of each external .swf:
onClipEvent (enterFrame) {
if (_root._framesloaded>=_root._totalframes) {
_root.gotoAndPlay("thisMovie");
} else {
this.gotoAndStop(Math.floor((_root._framesloaded/_root._totalframes)*this._totalframes));
}
}
the preloader itself is simply a bar which has a motion tween and 20 frames, and a stop() on the last frame. Incidentally, there is also a stop() in the same frame as the preloader MC.
Thanks! Regrets for the blandness of the content. Not my choice!
Preloader Loads But Next Scene Doesn't Work Right
Ok, I'm puttin a preloader on this flash file right. Well it seems to work right and loads the next scene, but when the next scene plays none of the motion tweening works. The music plays, the movie clips animate, but they don't do any motion from the places they are supposed to come from (if that makes any sense.) Most the to stuff starts at 0 alpha and slowly comes to 100% and slides into the screen. But once the preloader goes to the next scene, everything is already up on the screen at 100%????
I used one of the preloader Tutorials on this site and it all seems to work...
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
But like i said before, when the next scene comes up it doesn't show correctly, no motion in it. Am i missing something obvious? I've even changed the if statement to gotoandplay frame 1 of preloader scene and it still does the same effect.
HELP! I'm clueless.
Why Doesn't My Preloader Work In Flash Player 6?
I found & have been using for months, a good example of loading multiple SWF's into multiple levels (completing each swf preload before moving to the next, and managing the task lisk via an array). Unfortunately, while it worked fine in Flash 5 player, I've had very intermittent functionality with Flash 6 player! Can anyone tell me why the following seemed to work fine in F5P & not in F6P?
The problem is that sometimes (but not always), when viewed in F6P, the loader finishes & the music starts playing, but the splash animation doesn't start (leaving you stuck on loader). To make me pull my hair out, other times (after clearing cache) it works fine. Typically it works best if you've been there & haven't cleared the internet cache.
Hopefully the following code from my loader.swf will help someone figure out if it's a loader issue or if something in my splash.swf would be interfering.
Thanks!
---
Frame 1:
Code:
// provide a list with all your movies to load and the levels to load into
moviearray = new Array("flash/audioloop.swf", 100, "flash/splash.swf",2);
// set the index of the first movie to load
actMovieIdx = 0;
// set the initial values of the loading movie display counters
fileNum = 1;
fileNumber = 0;
// provide a list with all the layman's terms for files being loaded
movieKindArray = new Array("audio","splash");
------
Frame 2:
Code:
// get the next moviename and level
moviename = moviearray[actMovieIdx++];
movielevel = moviearray[actMovieIdx++];
// load the given movie
loadMovieNum (moviename, movielevel);
movieKind = movieKindArray[fileNumber];
fileNumber = fileNum++ ;
----
Frame 3:
(blank - this frame allows time to pass)
----
Frame 4:
Code:
// get the actual loaded bytes
actBytes = eval("_level" add movielevel).getBytesLoaded() || 0;
// get the total bytes to load
totBytes = eval("_level" add movielevel).getBytesTotal() || 100;
// calculate the percentage loaded
percent = Math.round(actBytes*100/totBytes);
if (totBytes-actBytes>10) {
// more bytes available, keep on loading
gotoAndPlay (3);
} else if (actMovieIdx<moviearray.length) {
// if we got more movies to load
gotoAndPlay (2);
}
// else go to frame 5
-------
Frame 5:
Code:
// ready, go - here starts your movie
Frame 6:
Code:
// start audio
_level100.gotoAndPlay(2);
// start splash at beginning
_level2.gotoAndPlay(2);
stop ();
|