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




Preloader In Between Scenes?



Is there a way to have your preloader only load 1 scene at a time and come up every time you click to load a new scene?



FlashKit > Flash Help > Flash MX
Posted on: 01-29-2003, 10:58 AM


View Complete Forum Thread with Replies

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

Bar Preloader Between Scenes?
I created a site with an intro, I have a preloader that loads the intro scene, plays it then goes to the main scene(or page if you will). From the main scene I have four other scenes, these are all picture galleries so it takes some time to load. How do i create a bar preloader with percentage for the other scenes? The whole site is one swf.

Preloader With Scenes
I have built a MC with 3 scenes : Preloader , Spikes , Main, My preloader uses the following code:
frame1:
loadpercent = "0%";
loadBytes = "0 of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb";

frame2:
loadPercent = (Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%");
loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
loadPercent = "100%";
loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
gotoAndPlay("main",1);
}

frame3:
gotoAndPlay(2);

I want the preloader to load and check scene "spikes" only and then go on to scene "main". right now it checks and loads the whole MC. HELP!

Preloader With Scenes
(Preloader In Flash MX)
i have been trying to create a preloader, i have 10 scenes in my movie. i have tried many tutorials,and nothing has worked so far. thanx.
bfly03
clarustechnologies.net

Preloader B/w Scenes
Is it possible to make a preloader
between scenes in one swf file??
(is it possible to make the first
preloader to load only portion of the file?)

Thanx

Preloader With 2 Scenes (HELP PLEASE)
Pre-loader question?..

Is it possible to have two scenes (2)

The first scene is used for a preloader to load the second scene.

Meaning the first contains the pre-loader only and it does not change until all of the second scene is loaded.


If this is possible could you give me an idea of a counter ecript to use. Counter 100 - 0% when it hist 0% then the movie will gotoAndPlay the second scene.



Thanks a lot guys..


Love what yall do..

Preloader With Scenes
Hello,

I am recently learning how to use scenes. How do I make it so that if frame 230 is loaded on the next scene (scene Movie) than it goes to the next frame, otherwise it looks back to frame 1 on current frame. My current non-working code is:


PHP Code:




if ("Movie"._framesloaded>=230) {
gotoAndPlay(14);
} else {
gotoAndPlay(1);
}







Also, I am trying to make a button so that if clicked it will go to frame one on the next scene (movie).. my code is this, but also failing:


PHP Code:




on (release) {
    gotoAndPlay("Movie", 1);
}








Thank you,

lieb39

PreLoader And Scenes ?
Does a preloader preload for all scenes after it or just the one direclty after it? And if it does only preload the one scence after it, are there any ways to get around this without putting everything on one scene?

Preloader Within Scenes
Hello, just a minor problem (i think)
I have a flash site with different scenes. These scenes have little movie clips within them. The problem is that I have a preloader to load up the clips but when i run the whole site it just skips the scene and loads up scene1 again. Any ideas? Thanx in advance.

One Preloader 2 Scenes
I can't seem to get my preloader to display the percentage when I have it on scene one. Is there a problem with having the main movie on scene 2 and putting the preloader and intro movie on scene 1?

Preloader For Scenes ?
the site I'm doing is all done in flash. I have a preloader for the site and I load the navigation bar as external swf. The main site has 2 scenes and will have more later on. Do I need a preloader for each scene ? or does the main preloader for my site take all the scenes into consideration ?

Is A Preloader For Different Scenes Possible?
I know how to make a preloader for a whole movie, but now I was wondering if it is possible to create a swf file that loads in seperate parts.

I'm creating a game and I want to create loaders between the levels. I could create different swf files for every level ofcourse, but I rather have the whole thing one single swf.

So I'm looking for something like this, in witch every line is a different scene.

- Loader -
intro
menu
- loader -
short animation and first level
- Loader -
short anime and second level

[CS3] Preloader And Scenes
Hi,
I have a turtle movie that i am working on for a class project. It will be a turtle animation, and I thought that I would put a preloader in it, not required, but I thought that it would be cool. I does not seem to work as both the scenes load at once. There are two scenes "preloader" and scene 1. I want to preloader scene to load and then go to scene 1(there will be more scenes later). Is this possible or do you have to load the swf externally?

you can see the weirdness at:
http://www2.hawaii.edu/~johnbarr/tur...rtle_boy2.html

Attached is the fla, can somebody please help me save my class project

thanks so much,
Johnny

Here is the actionscript I am using in the movie:

PHP Code:



stop();

var loaded:Number;
var percent:Number;
bar.addEventListener( Event.ENTER_FRAME, load_progress );

function load_progress(e:Event):void{
    loaded = stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal;
    percent = Math.round(loaded * 100);
    
    bar.scaleX = loaded;
    loader_info.text = "Loading... " + percent + "%";
    
    if( percent == 100 ){
        bar.removeEventListener( Event.ENTER_FRAME, load_progress );
        play();
    }
}

Add Preloader For Scenes
Hi all,

I have a site that was built with scenes, the problem is i need to somehow have a preloader for each scene cause the nav is getting messed up when different scenes havent finished loading. Is converting the scenes to seperate movies the way to go or is there a way to do it using the existing scenes(which would save me work)

thanks

Please Help With Preloader And Scenes
loadedBytes = _root.getBytesLoaded();
totalBytes = _root.getBytesTotal();
if (loadedBytes<totalBytes) {
percentageOutput = int((loadedBytes/totalBytes)*100);
_root.loaderBar._xscale = percentageOutput;
gotoAndPlay(1);
} else {
gotoAndPlay(5);
}

This is a typical script for a percentage preloader.
I need to changer this so that it targets a scene.
ie. It preloads only scene one.
scene two will need a similar preloader that only preloads scene two.
etc

any help or links would be appreciated.

Preloader For Scenes
Hi.

I have a successfully working preloader on my movie .. but .. because the movie is over 5Mb .. it's taking ages as it's loading "everything" ..

I have several similar "scenes" within the movie (each about 1Mb) and would rather have a preloader at the beginning of each "scene" .. to load that scene only at that time ...

The code I'm using in the "whole movie" version of the preloader is ..

totalBytes = Math.round(getBytesTotal()/1024);
loadedBytes = Math.round(getBytesLoaded()/1024);
percentDone = Math.round((loadedBytes/totalBytes)*100);
if (_root._framesloaded>=_root._totalframes) {
gotoAndPlay("start");
}

If my scene is called "PF_01" how do I alter the above code to make it load that scene only ?

p.s. .. is the "underscore" in the scene-name a problem ??

Thanks for any help.

H.out

One Preloader And Two Scenes
I currently have my preloader on scene 1 and the rest of my movie on scene 2.

Here is the code I have on my preloader movieclip:

onClipEvent (enterFrame) {
loading = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";//Dynamic text field Var: percentage
loadBar._width = per; //Symbol with instance name of loadBar
if (percent>99) {
gotoAndPlay("Scene 2", 1);
}
}


So basically when it is done loading I want it to goto scene 2 and play at frame 1.

Currently nothing happens.

Is there a problem having a preloader with 2 scenes?

Scenes And Preloader
I´m planning a new website, and I want to make it an all-flash based one..
What I´m wondering, is how I should use preloading, and how it really works.. Is it enough to put a preloader in the first scene, or do I need a preloader for ervery scene? :-)

One Preloader And Two Scenes
I currently have my preloader on scene 1 and the rest of my movie on scene 2.

Here is the code I have on my preloader movieclip:

onClipEvent (enterFrame) {
loading = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";//Dynamic text field Var: percentage
loadBar._width = per; //Symbol with instance name of loadBar
if (percent>99) {
gotoAndPlay("Scene 2", 1);
}
}


So basically when it is done loading I want it to goto scene 2 and play at frame 1.

Currently nothing happens.

Is there a problem having a preloader with 2 scenes?

Scenes And Preloader Bar
hi guys, im very new to actionscripting. so here goes. im developing a site done entirely in flash. after reading many posts on various sites, i realised you cant easily seperate your site into different scenes, as navigating outside them becomes a problem. however, i would like a preloader bar for my flash
this posed as a bit of a problem when it came to bringing the entire site into one scene, as the preloader bar wouldnt grow if it was all done in one scene, but when the preloader was in a seperate scene..it grew fine. but if i have just 2 scenes, and i use the navigation i have created it reloads the entire flash site once i click the menu buttons. so i was wondering.. is there a way to get the flash site and the preloader bar (to grow) in one scene, or is there a work around with having seperate scenes?

any help is greatly appreciated

Preloader..? 2 Scenes..?
i've got 2 scenes created. i've got a preloader set up for scene1. would anyone know how i can get my preloader to wait for both scenes to load before playing any of them? currently the preloader only displays long enough for scene1 to download and begins to play scene1 long before scene2 has finished loading. would anyone have any ideas which would help? thank you.

1 Preloader For Multiple Scenes
hi,

I'm trying to make a movie with an option to choose between the intro page or going directly to the website. I have 3 scenes :
1. opening page
2. intro
3. website
Is it possible to make one preloader on the opening page that will load either both scenes or else only the website? How can this best be done?

Thnx

Preloader With Multiple Scenes
I am having some trouble with my preloader since I added more scenes.
Is there anything in this tutorial I could change that would still check total kb loaded but also make sure last frame of last scene is loaded before it plays?

Now it loads scene 1 and about 30 or 40% of the movie and gets hung up in later scenes. This is the tutorial I used. http://www.flashkit.com/tutorials/Ac...89/index.shtml

Mark

Preloader With Multiple Scenes
I am having some trouble with my preloader since I added more scenes.
Is there anything in this tutorial I could change that would still check total kb loaded but also make sure last frame of last scene is loaded before it plays?

Now it loads scene 1 and about 30 or 40% of the movie and gets hung up in later scenes. This is the tutorial I used. http://www.flashkit.com/tutorials/Ac...89/index.shtml

Mark

Let Preloader Load Several Scenes?
I want my preloader to load 3 scenes at one time, can somebody help me?

Loading A Preloader Between Scenes
how do i call the preloader so that it will load up when a link is pressed?
i have one generic preloader that i found. It works when the movie is loading initially, but i want to use it when its loading a big scene.
Thanks in advance.

Preloader That Loads All Scenes
hey,
is there a way i can make a preloader that loads all the scenes before it plays the first scene? and does anyone know how to do it? it would be really helpful.

thanks for your time.

Problem With Scenes (preloader)
I have a preloader in another scene than my main movie. For the preloader-bar I use a movieclip with 100 frames. But when my movie is loaded, the mainscene starts at the 101st frame.
Can anyone help me solving this problem, please. thanx

Preloader Looping Between Scenes
Alright, i got a preloader and it seems to be working, but when it reach 100% it goes to the last frame in the next scene, instead of the first frame. The other scene works fine without the preloader.

preloader code:

frame 1 : nothing

frame 2 :

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) {
gotoAndPlay (_root.frame);
}


frame 3 :
gotoAndPlay(1);

Hope someone can help me

Preloader Issue Using Scenes
I have a problem with files that have a preloader in the first scene. when the Loads it load directly the Second scene, with no preload from scene #1

its happens twice on my web site.

Any Ideas would be appreciated

www.mnr.ca/vidal/intro.html <- is the link to the trouble site



Sarginion

Preloader For Individual Scenes
just wondering if it is (im sure it must be) to load each scene individually when requested...

prob something to do with an if statement.

if someone could help this would be great.

cheers

elewexi

Preloader On Separate Scenes
Alright let's say I am making a movie with Flash 5. Picture 3 rectangles one on top of the other. Now if I want to make the top and bottom rectangle stay the same but make the middle one change and each scene have it's own preloader how do I do this?

One Preloader For Multiple Scenes?
Hi, I'm a flash newbie trying to teach myself the joys of flash scripting. So, I thought I'd try to redesign my personal website using flash.

Things are going smoothly thus far, but I have a question:
My .fla file has multiple scenes that constitute the various pages. I was wondering, is there a way to set up a preloader in the main scene that checks if ALL the scenes within the flash movie are loaded (not just the home page)? I don't need anything fancy, just the basics.

If so, how would I go about doing it?

I know it must get tiring to repeatedly answer preloader based questions, but I'm not the sharpest tool in the shed, and some of the tutorials read like Greek.

Thanks for any help you can provide!

Preloader/Specifiying Scenes In Actionscript? Please Help
Hey everyone,

First off let me say I am fairly new to Flash 5... I read about 200 pages into the "Foundation Flash 5" book before I finally jumped head first into this fairly simple Flash project for work, a product 360 view. I just threw the movie up to a temporary spot if you would like to check it out @ http://www.realm64.com/patrick_360.html

Heres my problem: I had the movie in one scene and got it tweaked and working 100%, and was happy as little girl that I got my first flash project up and running Work then requested that I add a preloader, and thats where the troubles came...

I now have two scenes, "preloader" and "360". The preloader scene is a simple 11 frame animation with frame 12 having the action of:

============================
nextScene();
}
============================

And this jumps to my second scene "360" as planned, but now it doesn't really work 100%. The play button would reset to the begining of the preloader when it was trying to loop the animation, which I was able to fix by adding a 13th frame with:

============================
gotoAndPlay (1);
============================

It works now, not sure if that could be the cause of my other problems... my current problems that I can't solve lye in the left/right arrows that allow you to rotate the product frame by frame. As you can see if you loaded that movie, when hiting left arrow after frame 1 it just goes to a blank screen, and after hitting the right arrow past frame 12 it starts the animation playing again, which is getting frustrating because it totally contradicts the actionscript I have for that button.

Left arrow:
============================
on (release)
{
if (_currentFrame == 1)
{
gotoAndStop (12);
} else
{
prevFrame ();
}
}
============================

Right arrow:
============================
on (release)
{
if (_currentFrame == 12)
{
gotoAndStop (1);
} else
{
nextFrame ();
}
}
============================

Is there maybe a way to specify what scene I am refering to in the gotoAndStop action? To be honest, I have no idea as to why it is acting the way its acting... all I know is it worked perfect without the preloader. I tried having the preloader as part of the same scene, but ran into some problems getting the play button to work correctly with that one. Is there maybe something wrong my actionscript code? I would really appreciate any feedback you guys could give me, I am really stuck against a wall here and have no idea where to go next. I know this post was a bit long-winded, Thanks for taking the time to read this.

- Patrick Hartman
patrick@nbwebexpress.com





[Edited by patrickh on 12-26-2001 at 11:37 AM]

Preloader Question For Movie With X Scenes
hello.

i've just downloaded a preloader from the movie section - i'm not sure that i'm using it right or that it works for a movie to multiple scenes.

what i did is put the preloader into the scene before the rest of my movie.

i have 10 scenes total.

now..

this is what the preloader says


Code:
1st frame
FrameLoad = int((100/_totalframes)*_framesloaded);
lf = _framesloaded;
tf = _totalframes;

--

next frame with as
if (Number(lf)>=Number(tf)) {
gotoAndPlay (26);
} else {
gotoAndPlay (1);
}
now.. since i have mulitple scenes.. how can i edit the code to tell it that if the next 3 scenes have loaded that it can run ??

thanks
~chika

Preloader Question For Multiple Scenes - Help Please
hi.

ok i' downloaded this preloader from the movie section... now i'm trying to implement it to work for mulitple scenes.

i have about 10 scenes in my movie.

i need for the preloader to load all of the frames for the first 5 scenes for example..

now i'm pretty sure that the code i have only loads the frames in the first scene and then plays the movie or whatever..


Code:
if (_root._framesloaded>=_root._totalframes)
{
gotoAndPlay ("Eco Has", 1);
} else {
downloaded = math.floor((_root.getbytesLoaded()/_root.getbytestotal())*100) add "%";
download_bar.gotoandstop(downloaded);
bytesloaded = math.floor(_root.getbytesloaded()/1000);
bytestotal = math.floor(_root.getbytestotal()/1000);
message = bytesloaded add "Kb pour " add bytestotal add "Kb";
}
then what i'm talking about is frames loaded within this scene right? so can i change the code to say...



Code:
if (_root.Scene5._framesloaded>=_root.Scene3._totalframes)...
... such that the frames in the _root of Scene 5 are loaded

or somehow can i say load all scenes THEN start the movie??!

please help. sort of urgent
thanks
~chika

please help
Thanks~chika.

Preloader Loading Multiple Scenes?
Can you have a preloader load Scene 2, but Scene 3 as well?
I just want to know if it's possible. The scenes are all in one .fla file. If it is possible and you are nice enough to post the actionscript- please be specific and make it simple as possible- actionscript is very new to me. Oh, I've made a preloader capable of loading one scene at least (so I have an idea).

Preloader Error When Scenes Renamed? Help?
I edited out scenes of my movie, and added new scenes. i renamed them just to be more organized, but when i went to update the preloader's actions ("goto frame # of scene #" and "if frame # of scene # is loaded") wouldn't allow me to select the scene anymore. i'm using swish v2.0. anyone out there have an idea?

Flash Site And Preloader W/scenes
Hey all,

I'm redesigning my site to be completely flash. I have a problem though. When i create my flash site all my content is loaded in the first frame and thus makes my preloader unusable. So to get around this, I was thinking of using scenes. 1 preloader scene and then scenes for the site. I've never worked with scenes though so I don't have any idea how to do this or the actionscript for accessing different scenes. Can someone help with either an example or a point in the right direction. Thanks in advance.

g

Preloader:load Scenes Seperately
Okay, I want my preloader to load only the scene the preloader is in. The preloeader is always in a movie. I assigned the second frame with the following actions:

tellTarget ("../") {
FrameLoad = int((_framesloaded/_totalframes)*100);
}
percentage = ../:FrameLoad add "%";
setProperty("Bar", _xscale, ../:FrameLoad);
if (Number(../:FrameLoad) == 100) {
tellTarget ("../") {
gotoAndPlay(Number(_currentframe)+1);
}
} else {
tellTarget ("../") {
gotoAndStop(_currentframe-1);
}
}

I placed the movie clip in every scene but the first preloader loads all scenes. What do I have to change to have it only load the scene the preloader is in?

[MX] After Tutorials Still Have Preloader Issue For Scenes
i created 2 scenes one named preloader one named scene 1 preloader was the 2nd one and re-orged them but when i try to test the preloader it still doesn't work. prog bar immediately says 100% and it doesn't goto next scene

here's the code

onClipEvent (load) {
_xscale = 0;
}
onClipEvent (enterFrame) {
counter = math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100);
_root.progress = counter+"%";
if (counter>=100) {
_root.play();
} else {
_xscale = counter;
}
}

what am i doing wrong?

How To Use A Preloader To Load Multiple Scenes?
Hi,

I'm building a small website in flash and I have decided to use scenes. I have divided the scenes into the different pages that make up the site. (home, about me, contact)
I also made a scene called preloader, that had my preloader animation and code.

I now want to use that preloader to load each scenes when the button is clicked.

Can you show me how this works? I have attached an example my flash file here.

Preloader: For Sites Made In Scenes Not Frames
Hi all, my friend was so impressed with the help I got with a problem yesterday from these forums, that he's asked me to post a plea for help for him.
He has just about completed building his website in flash 5, but he has built is using around 8 different scenes for his site, i.e its not all contained on the one timeline. So basically his home page is scene one, his contents page is on scene 2 etc etc and hes linked it all up with navigation jumping from one scene to another.
Now he's basically finished, he has realised he will need to use a preloader for his site as its rather big.
Now the problem he has found is that every tutorial he can find on doing preloaders are created for sites where the entire site is contained in the one scene / timeline, and he's unable to adapt it to suit the setup (scenes) of his site.
Could anyone point him in the direction of a tutorial to suit his needs or to give an explanation on how to create a preloader for sites made with scenes, it really doesnt have to be detailed he just wants something to inform the viewer that his site is loading.

Single Preloader For Multiple Scenes/movies
yeah, I have alot of dynamically loaded materials into my site, however, some of the graphic elements from them, make some individual movie clips large.


I was wondering if there was a way to create a single movieclip/preloader to insert whenever necessary, that would work just as any other one.

I would like for it to also work with my main movie, in which all my dynamic materials are loaded into!

any help or some sort of direction in this process would be greatly appreciated.

I would need some sort of step by step process almost, just a jumpstart, like

make new mc... add this action script on this frame, fill your info here, and then place wherever...etc

because im litterally stoped dead on this one.

Thank you so much FK, you guys rock!

When Using Scenes Will A Preloader Load The Entire Movie Or Just That Scene?
when using scenes will a preloader load the entire movie or just that scene? i have five scenes and want to use a preoloader for the entire movie.

Exporting Scenes Separately And/or Importing Scenes From Other Files
does anyone know a way to import a scene from one file to another or a way to export/publish scenes separately (make each scene a different file)

thanks

Sound Across Scenes & Changing Volume In Certain Scenes..
OK, this is kind of hard for me to explain but i'll try...

I want to have a continuous sound loop over various scenes, but I want the volume to increase (i.e. fade up - and i would like it to fade rather than just suddenly turn up) during one of the scenes.. and decrease (i.e. fade out) to 0 during another scene.

On top of that, I'd like the sound loop to stop altogether when they play another audio file on the movie - then the loop resume when they return to scene 1.

Anyone able to help me here - i know it's sounds complicated but I am sure someone knows how i can do this.

Any help would be much appreciated,

thanks,
Chris

Get The _x & _y Of Two Different MC In Two Different Scenes
hi guys,

i've got this problem.

I've got an MC "handpalm" in the scene 'pre'.
And a MC "automatic" in the scene 'auto'.

The MC has a complicated timeline, that creates a interaction with the user (question - answer). The MC itself can be dragged over the stage.
(it can be dropped everywhere; and be used anytime during the interaction).

At one point the movie had to jump to the next scene (this is controlled in the MC - timeline.
But the MC "auto" must be starting at the same spot where the MC "handpalm" in the first scene had been dropped.

I tried to read the _x & _y value in the last frame in the "handpalm"-timeline, and give these values to the MC "auto".
BUT IT DIDN't work !!!

I'm desperate...
Can someone help me !!!

thanx in advance
kgp

Scenes...
Hi

I have a button inside a movie clip within my main movie. When you press the button i want it to go to scene 2..

How do i do this?

Thanks
zerodonor

Scenes
QUESTION.... I have six different scenes in my movie.... how do I link them together??

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