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




Preloader, FlashVars, OldNewbie Question



I adapted oldnewbie's generic preloader to a version system I use (to load a swf as a cachebuster) to combine the two functions, and one thing I'm having a problem with is the FlashVars variables. After the main swf loads in place of the preloader, I seem to lose all my variables.Is there any way to preserve those variables, or carry them over to the preloaded swf? It has to work in a generic way, I don't really want to write a custom preloader for all my projects, although I suppose I can if I have to.

Thanks!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-15-2006, 09:14 PM


View Complete Forum Thread with Replies

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

OLDNEWBIE And Others. I Need Some Preloader Help
OK I am creating a very simple percentage and bar preloader for one of my movies. The preloader works just fine on a simple movie, but for some reason on this particular movie it gets hung on frame 2. Its like there is a stop command in there somewhere, but I can'seem to find one?!?!? Can someone look at my .fla real quickly and try to help me out?

THANKS IN ADVANCE

Oldnewbie I Need Your Help With This Preloader
@ oldnewbie

I'm a little confused why my preloader works in FP6 and not FP7

could anyone tell me what I'm doing wrong or what has changed in FP7 syntax


ActionScript Code:
onClipEvent (enterFrame) {
    loading = _parent.getBytesLoaded();
    total = _parent.getBytesTotal();
    percent -= (percent-((loading/total)*100))*.25;
    per = int(percent)-4;
    percentage = per+"%"-35;
    _root.preloader.loadBar._width = per;
    if (percent>99) {
        _parent.gotoAndStop(2);
    }
}

Help With Oldnewbie's Preloader...
Hello there,

I've got a copy of Oldnewbie's preloader (which works really well) but I had to modify it a little bit. You know when you keep looking at the same code for so long that it starts meaning greek? Well, I don't understand greek at all. Can any good soul give me a little hand over here?

The Oldnewbie's original version is something like this:


Code:
_level0.container_mc.loadMovie("MainMenu.swf");
As I have more than one file I need to load (using the same container), I thought I could use a variable which will store the name of the file that is to be load next:


Code:
var currentSection:String;

if(currentSection == undefined) {
_global.currentSection = "MainMenu.swf";
}

// function that creates the container and places the .swf in it
onEnterFrame = function() {
if(currentSection != undefined) {
this.createEmptyMovieClip("container_mc", 0);
_root.container_mc.loadMovie(currentSection);

// setting the preload's clip in motion
_root.preloader_mc.gotoAndStop(2);
}
}

stop();
And in the preloader's time line I have:


Code:
this.onEnterFrame = function() {

// tracing the percentage of the movie that has loaded
percent = (_root.container_mc.getBytesLoaded() / _root.container_mc.getBytesTotal()) * 100;

if(!isNaN(percent)) {
// the following only concern the preloader's display
if (percent == 0) {
display = "";
} else {
display = Math.ceil(percent) + "% ...";
}
this.loadBar_mc._visible = true;
this.loadBar_mc._xscale = percent;

// end of preloader's display
_root.container_mc.stop();
}

if(percent == 100) {
// this sends this preloader clip back to frame 1
// where it awaits the next call to it
this.gotoAndStop(1);

// this deletes this onEnterFrame event
// so that the movie clip stops looping
delete this.onEnterFrame;

// preloader's display handling
display = "";
this.loadBar_mc._visible = false;

// here's the variable again
_root.container_mc.play();

// loadMovieNum(currentSection, 1);
}
}

stop();
It was suppose to load the "MainMenu.swf" firstly. Then, inside the "MainMenu.swf" I have a few buttons and when you click on one of them, I want it to load the next .swf file in the same container (replacing the "MainMenu.swf"). So, the action of the main menu's buttons is something like this:


Code:
on(release) {
_global.currentSection = "Photography.swf";
_root.loadMovie("Preloader.swf");
}
Well, in fact this code does nothing really. It does load the file, and the variable gets the expected value. I don't have more than one frame in all my files, everything happens through code animation. I don't know why but when this preloader loads the file, you can see only the background and nothing else nothing happens.

I'd be really thankful if someone could see where the mistake is and give a little light. I'm still quite newbie.

Cheers guys,
James.

Oldnewbie's Preloader Help
First, thanks oldnewbie for the preloader code!

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
    this.gotoAndPlay(3);
}

My question: is there a way to have the first few frames of a movie play while the rest is still loading? This preloader seems to load the whole movie until moving to the 3rd frame.
Thanks,
technoknow

Preloader + UI Components -- Oldnewbie ?
Oldnewbie told me to uncheck the "export in first frame" because my preloader was preloading 20k late.

My problem is when i do that to the UI Components, i get the preloader to work great -- 2k late is lowest ive gotten and thats fine for me.

But, when i do that, the preloader bar disappears! It doesnt work once I uncheck export in first frame.

Anyone know a fix?

Ty,
~DW~

A Preloader Oldnewbie Posted...
hey!

i'me using one of the preloaders that oldnewbie posted here a while ago, maybe you'll recognize the script:


Quote:




this.reelmc._visible = false;
this.loadbar._visible = false;
percent_display = "";
this.createEmptyMovieClip("container", 10);
container.loadMovie("about.swf");
this.onEnterFrame = function() {
percent = (this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
if (!isNan(percent)) {
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent)+"%";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent>1) {
this.reelmc._visible = true;
}
container.stop();
} else {
}
if (percent == 100) {
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
loadMovieNum("about.swf", 0);
}
};
stop();




and it's giving me some trouble... I have a main swf, and i want to load different sections into it. So in the main swf on the press of a button, this swf, the loader swf, is loaded into a mc. what happends is when the about.swf that the preloader loads is loaded, the main swf closes and you're left with only the about swf. are you following? i tried modifying the code but with little success... i'd really appreciate it if you could help me out! thanks!

Oldnewbie Preloader Question
Oldnewbie - if you read this, thanks for sharing your code.

I have an MC which loads two .swf's onto levels 2 & 1. (interface & initial - respectively)

Level 2 contains an interface and has some sliding components which overlay Level 1

Level 1 contains an initial MC that changes out to other .swf's depending on which buttons
are pressed on Level 2.

Level0 has nothing but the loadMovieNum code.

All of the MC's have linkages so the Oldnewbie preloader is appealing.

I'd like to use it to load the main movie - containing the interface and initial mc below it as well as use the preloader for each mc that is later loaded into level 1 replacing the inital mc.

Your thoughts on how to edit the code for this situation would be GREATLY APPRECIATED. I've struggled for the past 6 hours and had no success. I've tried attaching the movie clips on different layers instead of loading them into levels - but that seemed to create more headaches yet.

Thanks in advance!!!

OldNewbie...question About Your Preloader
A friend of yours, Adam14, had directed me to your component preloader and I have a question for you. My site is set up as follows:

main swf with a load in target window (MC1) that loads external swf's on that timeline once a button is selected. In one of my swf's,ie. "gallery" it also has another targeted window (MC2) to load external swf's, ie "details" into MC1(its a gallery section) and im using the export in frame 1 feature for images.

Now i followed you script and i somewhat understand it but when i apply it to my project, it doesnt seem to work. I didnt even replace ur loader, just to see if it worked and no luck. My question is, do i have to also target the MC's that im loading into in your script. I tried targeting those MC's but when i render, your preloader doesnt even show up. do you have any ideas what might be the problem or should i start pulling my hair out?

thanks again for any advice and help
Tracy

Oldnewbie's Generic Preloader At 56k
Hi all, and Oldnewbie. First of all I say that I use your generic preloader code in my site www.rubber.gr to load the main movie first and also the other swf's in the main scene. No problem at all. Except that i tried it once in 56k speed and it seems that the preloader "stucked" at 70 % loading... I tried to refresh the page but it had no result. I checked my Temp internet files and I saw that this swf was not fully loaded - it was about 200kb. I had to delete all temp files and refresh the page- this time the swf loaded 100%
Is there any way so I can be sure that the whole movie wiil be loaded before it appears at the stage? I say that this happend one time when i tested my site at 56k but I wanna be completely sure.
Thanks for your help in advance!

OLDNEWBIE, Teach Me Your Preloader
this is oldnewbie's code:
Clear to see, it is, the force is strong with him.

ActionScript Code:
this.reelmc._visible = false;
this.loadbar._visible = false;
percent_display = "";
//create a new movieclip to load
//the external movie into
this.createEmptyMovieClip("container", 10);
//load the external movie into the new movieclip
container.loadMovie("sound.swf");
//check the download status of the external
//movie once every frame
this.onEnterFrame = function() {
    //trace the percentage of the movie that has loaded
    percent = (this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
    if (!isNan(percent)) {
        //      trace(percent+"% loaded");
        if (percent == 0) {
            percent_display = "";
        } else {
            percent_display = Math.ceil(percent)+"% LOADED.";
        }
        this.loadbar._visible = true;
        this.loadbar._xscale = percent;
        if (percent>1) {
            this.reelmc._visible = true;
        }
        container.stop();
    } else {
        //      trace("0% loaded");
    }
    if (percent == 100) {
        delete this.onEnterFrame;
        this.reelmc._visible = false;
        percent_display = "";
        this.loadbar._visible = false;
        loadMovieNum("sound.swf", 0);
    }
};
stop();
My questions are:
1) Why do you load into a blank mc and then load into a level?
Why not just load it into a level if that is where it is going to end up?

2)this line
ActionScript Code:
if (percent>1) {
            this.reelmc._visible = true;
        }
When is percent ever greater than 1? If it is, would you want the loaded movie to play? EDIT: STUPID QUESTION!. I was thinking just _l / _t , not percent. duh. However, I still don't see the point of that line. It is basically covered under !NaN, right?

3) How do your's pull from the cache and not show the preloader on refresh? I don't see in your code how it does that?

4) Thank you.

5) Any reason for the Flash 5 syntax on the dynamic text?

Oldnewbie, Have A Question About The Preloader You Once Gave Me
Hello there,

I'm using a preloader you once gave me, but I'm invoking it from inside a function. Can that be done? This is the code for your preloader, which is inside a movieclip.


Code:
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
percent=(this[_level10].getBytesLoaded()/this[_level10].getBytesTotal())*100;

if(!isNan(percent)){
// The following only concern the preloader's displays...
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent) + "% LOADED.";
}
this.loadbarBars._visible = true;
this.loadbarBars._xscale = percent;
if (percent > 1) {
this.reelmc._visible = true;
}
// End of preloader's displays...
this[_level10].stop();
}
if(percent == 100){
//trace(percent);
// this sends this preloader clip back to frame 1
// where it awaits the next call to it...
this.gotoAndStop(1);
// this deletes this onEnterFrame event...
// so that the movie clip stops looping...
delete this.onEnterFrame;
// preloader's displays handling...
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
// end of preloader's displays handling...
this[_level10].play();
//_parent.play();
}
}
stop();
and I'm invoking it from inside the function like this

_root.preloaderBars.gotoAndStop(2);

but it's not working. Am I doing something wrong?

Thanks

Preloader (based On Oldnewbie Code) ...
This is an issue to do with using a seperate .swf (preload.swf) to preload another .swf (main.swf) because main.swf builds dynamically and as such nothing appears on the screen until it has all loaded (which is no good).

So using the following code (which oldnewbie gave me a while ago) I have managed to solve this problem. Only thing is, I want to leave this preload.swf at the base level of _level0 (if this makes sense and is possible - I don't know) so that I can have main.swf call a function in preload.swf at anytime which will begin the preloader again but actually preload another .swf, like main2.swf or main3.swf

Here is the code:

Code:
//---------------------FUNCTIONS
preloader = function() {
//Attach preloader anim
_root.attachMovie("loading_mc", "loading_mc", 911);
_root.loading_mc._x = 5;
_root.loading_mc._y = 1;

//create a new movieclip to load the external movie into
this.createEmptyMovieClip("container_mc", 1);

//load the external movie into the new movieclip - test which area to load
container_mc.loadMovie("main.swf");

//check the download status of the external movie once every frame
this.onEnterFrame = function() {
//trace the percentage of the movie that has loaded
percent = (this.container_mc.getBytesLoaded()/this.container_mc.getBytesTotal())*100;
if (!isNan(percent)) {
if (percent == 0) {
_root.loading_mc.percent_display = "";
_root.loading_mc.percent_display2 = "";
} else {
_root.loading_mc.percent_display = Math.ceil(percent)+"%";
_root.loading_mc.percent_display2 = Math.ceil(percent)+"%";
}
container_mc.stop();
}
if (percent == 100) {
delete this.onEnterFrame;
_root.loading_mc.percent_display = "";
_root.loading_mc.percent_display2 = "";
_root.loading_mc._visible = false;
loadMovieNum("main.swf", 0);
}
}
};
}

//---------------------RUNTIME
stop();
preloader();
So is what I'm trying to do possible ? Is the above code, and specifically loadMovieNum , currently replacing preload.swf with main.swf once the preloading is done and therefore not letting me use anything from preload.swf again because for all intents and puposes it has been 'overwritten' ???

Please assist if you can.
Thanks,
Stephen.

Preloader - Based On Oldnewbie's Code ...
This is an issue to do with using a seperate .swf (preload.swf) to preload another .swf (main.swf) because main.swf builds dynamically and as such nothing appears on the screen until it has all loaded (which is no good).

So using the following code (which oldnewbie gave me a while ago) I have managed to solve this problem. Only thing is, I want to leave this preload.swf at the base level of _level0 (if that makes sense and is possible - I'm not sure) so that I can have main.swf call a function in preload.swf at anytime which will begin the preloader again but actually preload another .swf, like main2.swf or main3.swf

Here is the code:

Code:
//---------------------FUNCTIONS
preloader = function() {
//Attach preloader anim
_root.attachMovie("loading_mc", "loading_mc", 911);
_root.loading_mc._x = 5;
_root.loading_mc._y = 1;

//create a new movieclip to load the external movie into
this.createEmptyMovieClip("container_mc", 1);

//load the external movie into the new movieclip - test which area to load
container_mc.loadMovie("main.swf");

//check the download status of the external movie once every frame
this.onEnterFrame = function() {
//trace the percentage of the movie that has loaded
percent = (this.container_mc.getBytesLoaded()/this.container_mc.getBytesTotal())*100;
if (!isNan(percent)) {
if (percent == 0) {
_root.loading_mc.percent_display = "";
_root.loading_mc.percent_display2 = "";
} else {
_root.loading_mc.percent_display = Math.ceil(percent)+"%";
_root.loading_mc.percent_display2 = Math.ceil(percent)+"%";
}
container_mc.stop();
}
if (percent == 100) {
delete this.onEnterFrame;
_root.loading_mc.percent_display = "";
_root.loading_mc.percent_display2 = "";
_root.loading_mc._visible = false;
loadMovieNum("main.swf", 0);
}
}
};
}

//---------------------RUNTIME
stop();
preloader();
So is what I'm trying to do possible ? Is the above code, and specifically loadMovieNum , currently replacing preload.swf with main.swf once the preloading is done and therefore not letting me use anything from preload.swf again because for all intents and puposes it has been 'overwritten' ???

Please assist if you can.
Thanks,
Stephen.

Preloader Using Oldnewbie Code. Problems.
As oldnewbie suggested I'm putting this topic here in this thread. Instead of this thread.

I'm trying to build a preloader and I've read and tried several different ways of making a preloader to load my main movie. Since I'm still obviously a n00b I need help. Below is the code I'm using. Attached is the preload_mc.fla file. Also, below is the URL you can find my preloader and movie file it loads. Just append ?d=1 etc at the end where you change the 1 to 2 or something so you don't have to clear the cache every refresh.

*Note how the % Loaded text don't update from 0 to 100 for some reason. Also, note how there is a "blink" from when the preloader finishes to the loading of the main swf that the preloader is loading.

http://www.dvdfuture.com/preload_mc.html


ActionScript Code:
stop();
this.preloader_mc._visible = false;
createEmptyMovieClip("container_mc", 100);
container_mc.loadMovie("intro111105.swf");
onEnterFrame = function () {
     _l = container_mc.getBytesLoaded();
     _t = container_mc.getBytesTotal();
     percent = (_l/_t)*100;
     trace(percent + " _l: " + _l + " _t: " + _t);
     if (!isNaN(percent)) {
          if (percent>0) {
               this.preloader_mc._visible = true;
               this.preloader_mc.percentL = percent + "% Loaded";
          }
          if (percent == 100) {
               delete onEnterFrame;
               loadMovieNum("intro111105.swf", 0);
           this.preloader_mc._visible = false;
          }
     }
};

Preloader (based On Oldnewbie Code) ...
This is an issue to do with using a seperate .swf (preload.swf) to preload another .swf (main.swf) because main.swf builds dynamically and as such nothing appears on the screen until it has all loaded (which is no good).

So using the following code (which oldnewbie gave me a while ago) I have managed to solve this problem. Only thing is, I want to leave this preload.swf at the base level of _level0 (if that makes sense and is possible) so that I can have main.swf call a function in preload.swf at anytime which will begin the preloader again but actually preload another .swf, like main2.swf or main3.swf

Here is the code:

Code:
//---------------------FUNCTIONS
preloader = function() {
//Attach preloader anim
_root.attachMovie("loading_mc", "loading_mc", 911);
_root.loading_mc._x = 5;
_root.loading_mc._y = 1;

//create a new movieclip to load the external movie into
this.createEmptyMovieClip("container_mc", 1);

//load the external movie into the new movieclip - test which area to load
container_mc.loadMovie("main.swf");

//check the download status of the external movie once every frame
this.onEnterFrame = function() {
//trace the percentage of the movie that has loaded
percent = (this.container_mc.getBytesLoaded()/this.container_mc.getBytesTotal())*100;
if (!isNan(percent)) {
if (percent == 0) {
_root.loading_mc.percent_display = "";
_root.loading_mc.percent_display2 = "";
} else {
_root.loading_mc.percent_display = Math.ceil(percent)+"%";
_root.loading_mc.percent_display2 = Math.ceil(percent)+"%";
}
container_mc.stop();
}
if (percent == 100) {
delete this.onEnterFrame;
_root.loading_mc.percent_display = "";
_root.loading_mc.percent_display2 = "";
_root.loading_mc._visible = false;
loadMovieNum("main.swf", 0);
}
}
};
}

//---------------------RUNTIME
stop();
preloader();
So is what I'm trying to do possible ? Is the above code, and specifically loadMovieNum , currently replacing preload.swf with main.swf once the preloading is done and therefore not letting me use anything from preload.swf again because for all intents and puposes it has been 'overwritten' ???

Please assist if you can.
Thanks,
Stephen.

OLDNEWBIE's Preloader...how Can I Get It To Work With GETURL Instead Of Loadmovie?
I need to use OLDNEWBIE's preloader as shown below (it is placed in the first frame of the .fla.) BUT (there is always a BUT). I need it to use getURL once the movie has loaded in the clipholder.

Any ideas? I've tried many variations, but nothing works.

Thanks a Million!

fitchic77


==================================================
/* First thing to do is set the stage size of
this movie at the same size as your
"to be loaded" movie, and re-position the display
elements to your liking.
Also set the same framerate as your movie.
Then replace "sound.swf" in 2 of the lines below,
with the name of your movie.
Last, make sure your present movie is cleared
of any preloader, and most importantly, that it
starts off with a first blank keyframe.
*/

// Hides displayed elements
this.reelmc._visible = false;
this.loadbar._visible = false;
this.outline._visible = false;

percent_display = "";
//create a new movieclip to load
//the external movie into
this.createEmptyMovieClip("container",10);
//load the external movie into the new movieclip
container.loadMovie("intro_movie.swf");
//check the download status of the external
//movie once every frame
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
percent=(this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
if(!isNan(percent)){
// trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent) + "% Loading";
}
this.loadbar._visible = true;
this.outline._visible = true;
this.loadbar._xscale = percent;
if (percent > 1) {
this.reelmc._visible = true;
}
container.stop();
} else {
// trace("0% loaded");
}
if(percent == 100){
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
this.outline._visible = false;
loadMovieNum("intro_movie.swf",0);

}
}
stop();

Question About New Preloader Video Re Flashvars
Hi All,

I have been using the method shown by Lee in his new video tutorial but ran into an issue today.

How to load flashvars to the loaded swf?

My solution in the end was to pass the flashvars to the preloader.swf and then have it pass them to the loaded.swf.

I had to set a timer to wait for a moment though because the flashvar had not been passed in time before I was trying to use it.

Can anyone please advise if this is the way they would do it or can suggest a better way?

Regards,
jkaris

Oldnewbie's "generic" Preloader?
can anyone provide me a link to this?...in every post i've come across searching for it, it either has been removed, or it apparently was never included in the post at all. I'm having some preloader troubles and would rather start trying to figure it out on my own, as opposed to posting a thread asking for help here. (and since oldnewbie usually comes to my rescue in here, i figured his preloader would be a good place to start)

any help or a push in the right direction would be appreciated.

Thanks all.

OLDNEWBIE
Dear Oldnewbie,

I saw you directed someone to Macromedia's load_images.fla sample file. I used that file as a template for a page I created. I have uploaded my HTML file, SWF file and a folder full of jpgs to my webspace provided by my cable modem co. BUT the jpgs do not show up when I click on the appropriate buttons on my web page. They did when I tested the movie before publishing for the web. Here is the Actionscript from Macromedia's file:

_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("../images/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}

Is there something I need to change for my file to "find" those jpgs? I am thinking the loadMovie ("..blah blah blah..." part needs to be changed. The jpgs ARE in a folder named "images".

Can you help me?

Thanks

For Oldnewbie
Hey Oldnewbie, How you been?
I was wondering if you would be able to help me with this dynamic text problem I have been dealing with. I notice you answer on alot of these types of posts. I posted this a few days ago:

http://board.flashkit.com/board/show...hreadid=337654

If you can, Much Appreciation
If you can't, Much Appreciation

Oldnewbie
I see you hit 1000 posts. Thanks for helping everyone.

Kennyb

Help W/ Oldnewbie's Pre
Oldnewbie,
I got your component preloader to work, but with one MAJOR problem.

when the preloader movie loads in, it works okay UNTIL it gets to the part with the scrollbar.. I guess the best way to describe it is, the pictures and sybols in that particular section of the movie become displaced..
another problem, the preload movie doesnt want to unload...


here's my script on the first frame:

stop();

this.createEmptyMovieClip("container", 1000);
// Replace "content.swf" by your file name.
container.loadMovie("perkinsSite.swf");

this.onEnterFrame = function() {
LoadedBytes = container.getBytesLoaded();
TotalBytes = container.getBytesTotal();
Percent = (Math.ceil((LoadedBytes/TotalBytes)*100));
if((LoadedBytes==TotalBytes)&&(LoadedBytes>0)){
_level0.nextFrame;
}
}


and here's the second frame:
stop();
_root.onEnterFrame = null;

I even tried using oldnewbie's FLA and just replaced the name of the movie to be load and got the same problem, except the text of the loader movie did disappear..

HELP??
-myk

Oldnewbie Help
I have been trying to create preloaders in between SWF files but nothing seems to work. I am trying to create a flash website and I want to have doors close when a person clicks on a button to go to another section. While the other section loads the doors will remain close, once the SWF file loads the doors will open. Please help me!!!

2advanced.com is the perfect example!

Oldnewbie?
I need help getting the right coding for something like what you sent me here.

http://odin.prohosting.com/~oldnew/f...rgloadswf3.swf

Please Respond ASAP

Oldnewbie Is No 1
Ah oldnewbie, im sitting here finishing up teaching my calss some computer literacy skills, and i deicded to give a cheer to you! I really respect your intelligence on the answers you gave me, damn near everything you have answered that ive seen has been correct. But i guess enough of the mushy appraisal, i do have a ?, how long have you been messing with flash? and all the methods you have learned. im sure youve had other methodss besides tearing apart .fla/s Speaking of which im doing that now , but i dont seem to get a great deal out of it so.. hmm any words of wisdom adn encourgament so i dont throw in the towel?/

Oldnewbie... Can You Help?
Hey buddy.. hehe sorry to center you out.. but every single question I've asked here you've solved for me......
I've attached a copy of a flash photo gallery I am working on.
There is a movie clip of thumbnails the scrolls whe you click the left or right buttons... that works fine.... now on each thumbnail there is a button (within the thumbnail movie). When each button is clicked the movieclip with the larger photos is supposed to slide the corresponding photo into the view screen.. Umm but it doesn't.... The first one works. The AS I used is:

on (release) {
_root.gotoAndPlay("01");
}

The main elements of the gallery (viewing area) are on the main timeline, and as I mentioned the thumbs and photos are set in movie clips....

The first button works with the above AS but when I use this same AS on the other buttons (referencing the other frame labels of course ) don't work.... I've been pulling my hair out trying to figure this out and I know I'm gonna kick my butt if I find out it's something really simple that I missed...
Can ya help out?

One For Oldnewbie (or Anyone Else Who Knows)
Hey, oldnewb.. After reading that actionscript book, i finally understand the script of your external preloader and am fairly _level-savvy... anyway, on to my question..
I have a main movie with a few buttons. Each button will load a new movie to a certain level.. I use this script to make my preloader respond to the button press...


Code:
function contactLoader() {
if ((button + "Loaded") == true) {
_level1._visible = true;
}else{
progress._visible = true;
this.createEmptyMovieClip("contactForm", 1);
contactContainer.loadMovie("contactForm.swf");
this.onEnterFrame = function() {
LoadedBytes = contactForm.getBytesLoaded();
TotalBytes = contactForm.getBytesTotal();
percent = (Math.ceil(LoadedBtyes/TotalBytes) *100);
progress.percentLoaded.text = percent;
if (LoadedBytes >= TotalBytes) {
progress._visible = false;
loadMovieNum("contactForm.swf", 1);
contactFormLoaded = true;
}else{
contactForm.stop();
updateAfterEvent();
}
}
}
}
I want to make this function univeral so i dont have to rewrite it for each button.. I'd like to make a few arguments in the function declaration that simply give maybe a name (see contactForm throughtout the script) and a level, so each button will call a function like:

Code:
on (release) {
pageLoader(contactForm, 1);
}
the trouble is formatting the script to handle the number i put into the arguement and asign it to a level.


does this make sense?

thanks,
-myk

Hey Oldnewbie, Got One For You...
What's wrong with this code?

loadMovie("picture1.swf", "picture");
setProperty("picture", _width, "300");
setProperty("picture", _height, "373");
setProperty("picture", _x, "0");
setProperty("picture", _y, "0");

Causes weird problems with Flash MX.

http://www.flashkit.com/board/showth...hreadid=428584

To: OldNewbie
Can I email you a zip file containing the movie I have been working on. I have those dynamic text fields that scroll they work ok but after you go into the frames that contain the so many times they stop being able to scroll. Really strange how it works for a while and then it stops.

Oldnewbie, Can You Help?
I have a movie that loads 4 sample mp3's for background music dynamically when you select one of the samples. The first sample loads as default as soon as you enter the site. However, it works fine locally, but once on the server it doesn't work right.

If you click the stop button first and then click play it loads and plays, but not until you click the stop button. You have to hit the stop button only if it is the first time you try to play the sample. You can see what I mean if you go to www.delstrange.com/2bluemoon

I Have attched the .fla if you care to take a look at the code.

Thanks in advance.

OldNewbie This Ones For You
Hey oldNewbie.

I wrote to you via email about a week ago asking whether you had forgotten about me andf the generic preloader.

You said you might be able to send me a quick demo a few days later but I never recieved anything.


I know you are probably heaps busy but was hoping that you still might be able to help me as at the moment the site i am building is using a preloader on each external swf and your generic main timeline preloader would work so much better I think and save me so much time.

Any help soon would be invaluable.

much appreciated pixelmagikau

Help, OldNewbie Anyone, Someone, Help
Ok, I have a menu system that when the user double clicks anywhere on the stage the menu bounces from off stage to where the user clicked on the y axis, allowing the user to see the navigation for the site. When a user clicks on one of the main buttons it sends the menu system bouncing back off stage and out of the way. One of my buttons has a sub nav and I would have thought that I would just use the same actions on the sub nav buttons as on the main nav buttons to send the menu bouncing back off stage...apparently not. Or maybe I'm just doing some small stupid mistake somewhere. I've attached my .fla, it was made on a Mac but PC users should be able to open it if you open Flash first then go to open and select the file. Thank you all for your help, this is driving me insane.

OldNewbie...
I don't know if you remember the example I showed you last week with the pictures scrolling. I guess that scrolling takes up a lot of resources which is why it's a little slow. It makes CPU usage jump to 98%. If the scrolling is stopped by placing the mouse in the middle, the CPU usage drops to 10%. So I guess my question is how to stop the pictures when the mouse rolls out of the masked area. Is it doable.

site

here's the fla for just the pictures scrolling. The blue screen is on another level
fla

thanks in advance. I hope you're computer is fixed.

Oldnewbie Can You Help Me With This
I have a copy of this code at my office but I'm not able to access it from here. I need the code to loadmovie in to a empty MC same as load external swf.

Thanks in advance.

Hey Oldnewbie...
This ones for you. Sort of a payback.

Hey Oldnewbie
Hey man thanks a lot for showing me that awesome example of what you can do with the scrollpane. One problem though...how do I go about modifying it like that?

Oldnewbie I Need Your Help Again.
How are you?

I have a picture website that loads pictures individualy on different levels. Each picture.swf is loaded on top of the previous one by

on (release){
loadMovieNum(name, i)
i++
}

bacause I want the top picture to fade over the one under it. I'm using a scrollPane, and it's not fading. Any idea how I can achieve this effect. The scrollPane is a must, and I want to fade them as I said eariler.

Thanks in advance

Oldnewbie....
My friend, I've lost you. I hope everything is OK. I know you are just very busy. I'm still trying to figure out that problem that you helped me with. I even tried downloading the swfs from your your website but the actions don't import. Is there any way I can get the fla's. I would really appretiate that.

Thanks in advance oldnewbie

For Oldnewbie
Hey oldnewbie, sorry to bother. just wondering if you were still gonna help me out with this preloader.

http://www.flashkit.com/board/showth...hreadid=537528

Much Appreciation

Oldnewbie
can you check out this thread and see if you can help me

http://www.flashkit.com/board/showth...hreadid=573701

thanks

Oldnewbie...please Help
Can you look at the post titled Project due in two days and see if you have any ideas. You have helped me on projects before and now I need you help again!!!

Thanks
Jim

Oldnewbie.........
you had posted a thread with probably the best easing scroll bar I have EVER seen.....i had it marked and now I can not find it...

Can you either link me to the thread or just send me the url again?

Help Oldnewbie
Hey,

Welp. Everything is running perfectly smoothly now. There's one more thing I want to make my movie do.

I'm including the flash file as I have it right now. As you play it you'll see that the "minimize" button works perfectly as it should. The transparency changes on cue, and the movie clip closes as it should.

The only thing is, I would like to make the entire clip fade out as opposed to just dissapearing. So basically I set up the coding so that the alpha of the entire clip would change on it's way out. Unfortuantely, I had no idea how to put in some kind of coding that would manually fade out the clip over a period of frames or time.

So basically...if you could tell me how it would be possible to make the clip fade without having to link to a seperate scene first, it would be an awesome help. Thanks much.

Help Oldnewbie...
Hey...

Need some help in some coding.

Assume that I wanted to simply apply an action on a button. Here's what I want to happen.

On a mouse roll over, I want a button with an alpha of 0 to change to 100. At the same time, I want a piece of code that will take the button back to 0 upon the mouse rolling out. Here's what I tried...

on (rollOver) {
company_block._alpha = 100;
}
on (rollOut) {
company_block._alpha = 0;
}

That was my best guess as to solving the problem. It ended up fading out the entire movie clip on mouseover instead of the company_block button. Thanks in advance for any help.

Oldnewbie
Oldnewbie, I tried the solution to exporting the swf to avi then to quicktime with no success, I was wondering if I gave you the swf, if you would have time to look at it, Thanks soilentgreen

Oldnewbie...help A Guy Out...
oldnewbie...

I once again come back seeking your assistance. Had a quick simple question. I was checking out a nifty design studio and they gave me an idea for mine that could work pretty well.

Here's the basic gist of what I want. Every time my flash site loads up, I want a RANDOM picture to load up inside the flash movie clip which will act as the background while externally loaded .swf's will load on top with navigation and content.

For an example of what I'm talking about...check out

http://www.exopolis.com/site/

After you load up the site, close the pop up window and reload it. Note the different bg but the same content. That's what I'm shooting for. Thanks in advance for the help!

Oldnewbie...help
Yo,

I'm back yet again for another teaching in the ways of flash use.

Question. Is it possible to load an external swf into a movie clip INSIDE of another movie clip? The name of the first movie clip is "body copy bg" . The name of the mc INSIDE that mc is "aboutcontent" . So...Here's the code I attempted (failing miserably).

on (release) {
loadMovie("flash/about_technology.swf", "_body copy bg.aboutcontent");
}


Please help! Thanks...

Oldnewbie...help
Okay,

I think I'm going out of my mind...

I'm simply trying to load an external swf into a mc container.

I'm inside a mc, in that mc is a button. The code I have on the button is as follows:

on (release) {
loadMovie("http://www.oodelally.com/flash/portfolio_clients_margo.swf", "_parent.portfoliobox");
}

The name of the mc container is portfoliobox. I've tried _parent. _root. _level0. and several others. What am I doing wrong???

Oldnewbie, Please, Help
Oldnewbie,

I was searching the board looking for a way to solve my problem, when I finally found one message of yours talking about a preloader that would load external SWF´s (The thread was named "Best possible way to do a preloader for external swf?". To preload external SWFs... That´s my problem...

Would you please be kind enough to send me this external preloader that you´ve made? It would help me a lot...

Thanks in advance!

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