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




Preload Scene



How do I preload a scene and not an entire movie, My movie have multiple scenes and my preloader is taking too long. is there a way to preload one scene at a time instead of the whole movie. this is the code I am using now. thankyouAttach Codeinterval = setInterval(preload, 100);function preload() {var current = _root.getBytesLoaded();var total = _root.getBytesTotal();var percent = Math.round(current/total*100);loader_bar_mc._xscale = percent;if (current == total) {gotoAndPlay("mywork");clearInterval(interval);}}



Adobe > ActionScript 1 and 2
Posted on: 12/14/2006 07:19:46 PM


View Complete Forum Thread with Replies

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

Preload Scene DOESN'T PRELOAD
ok, so i have this file, full of images, it's huge. i have a preload scene, the actionscript is as follows:

setProperty ("loadBar", _xscale, "((_root.getBytesLoaded() /_root.getBytesTotal() )*100)");
ifFrameLoaded ("Scene 1", "End") {
gotoAndPlay ("Scene 1", "Start");
}

so basically, it SHOULD increase the width of the preload bar as the movies progressively loads, and it SHOULN'T start playing the main scene(Scene1)until the whole scene is finished loading.

It doesn't do this!

i haven't done much actionscripting b4, so any help would be appreciated.

you can see the extremely CRAP movie at: http://www.angelfire.com/ca/adamstuff/paragon3.html

Preload Scene 2
Is it possible to just make a preloader for scene 2 in scen 1?

Preload Scene
anyone know how I can preload ONE specific scene in my movie? For example, I have a movie with 10 scenes in it. I want to preload scene 6. How can I do that


TIA

How Do You Preload Each Scene?
I have made a new flash document with four scenes. If I insert a preloader it preloads all four scenes first but I only want to preload each scene instead of all four. Can someone tell me how I need to correct this problem.

Thank You

Preload Next Scene Only
Hey y'all. I made a preloader based on this tutorial http://www.flashkit.com/tutorials/Ac...689/index.php, but I don't want it to preload the whole movie before presenting the option to continue. I just want it to preload the next scene (or "Home" page). Can anyone tell me how to do that?

Thanks for your help.
Summarah

Preload Only 1 Scene
Hi guys!

I have got 1 .fla file with 4 scenes and I only want to preload one of them. How can I do to preload an specific scene?

TIA

Preload Just One Scene
Could anyone tell me, is it possible to preload just one scene and leave the others to stream? All the preloaders that i have found out there, just get the bytes total of the entire movie clip and calculate the percentage loaded based on that.

Thank you

Preload Scene Only
I have a preloader that gives total amount loaded feedback. But at the moment I only want it to preload a scene at a time rather than the whole .swf file. How can I change the script to do that? At the moment i have this...

my_bytesTotal = Math.round( this.getBytesTotal ());
my_bytesLoaded = Math.round( this.getBytesLoaded ());
my_percentLoaded = ( my_bytesLoaded / my_bytesTotal) * 100;
this.my_bar._height = 36 * ((100 - Math.round (my_percentLoaded)) / 100);
this.loadedAmount.text = Math.round (my_percentLoaded) + "%";
if (my_bytesLoaded == my_bytesTotal) {

this.gotoAndPlay ("start");

}

Also, my 'skip intro' button only seems to work AFTER the scene has loaded and begins playing rather than during the preloader, is this because the actions on the main timeline take precedence over those on the canvas?



Thanks for helpiong this total flash noob,
Jeremy

Preload A Scene
I have

iBytesTotal = _root.getBytesTotal();
iBytesLoaded = _root.getBytesLoaded();
iBytes = (iBytesLoaded/iBytesTotal)*100;

This obviuously loads the entire movie.

I just want to be able to load a scene, called 'animation', how would i alter this code to make it work.

Thank you

Preload A Scene?
Is it possible to preload a scene? If so how would you do it? Thanks in advance

BSMH

URGENT - Preload Scene
URGENT !!!

Please, I need urgent help !
I created a preload scene for intro I'm making up and Flash
somehow add 90 Kb to the first frame of that scene.
My preload scene have 30 Kb and now sudenly 120 Kb.
When I try do delete that scene to make a new one, Flash
move that 90 Kb to the first frame of main scene,
and I'm going crazy !

Can anybody tell me what is a trick ?
I need help urgent.
Grateful
stef

How To Preload If Scene Is Made Up Of Mc's
i'm trying to preload my flash movie which has 5 frames. on those frames are movie clips which are at least 100 - 200 frames long. so how do i do it?

Preload Every Scene Seperate ¿
hi all

this just crossed my mind...
is it possible to preload every scene seperate ?

i know its silly.. hehe

anyway thx in advance

Preload An SWF To Play In A Later Scene
Hey all...

I was wondering what the code would be to preload an external .swf in one scene to be played later down the main timeline in a different scene.

The first main movie has a nice preloader animation, but I would like this separate .swf file to not be part of the initial preloaing and simply start loading in the background while the main timeline is playing, so that is could be preloaded and begin playing when the playhead finally arrives at the appropriate place and scene.

Any ideas?

Thanks
-Brian-

Preload Content In A Scene
I'm using the ProgressBar component to create a preloader for my flash file, however I only want the ProgressBar to preload the content for the first scene in the movie as opposed to the entire thing. Normall I just use _root for the ProgressBar.source, however is there someway I can set the source to be the content for a scene as opposed to the root?

Preload Scene 1 From Scene 2?
Is it possible to preload scene 1 using a preloader in scene 2. The reason I ask is because I dont want to have to move everything o scene one up three frames, its the way I`ve built the movie .
Thanks

Preload 1.jpg For Scene 1 And 2.jpg For Scene 2
story: i'm creating like a book in flash - frontcover/main/backcover = 3 scenes. frontcover and backcover have external jpgs. it's ok if i have a preloader on the frontcover, but it's kind of awkward on the backcover cause all it does is loading the backcover.

Is there anyway to tell flash to load the backcover jpg together with the frontcover and like cache the backcover jpg till it is needed when you come to the backcover?

Preload + Multiple Scene Problem (?)
Hey,
I have put myself in a situation !
I started a site, but forgot to place a preloader on the first scene !
Is there a possibility to make a scene the first one (by a code or something)? if not can i make a .swf preload the .swf site ?
Thx guys (and chicks !)
G.

Preload Each Scene Upon View, And Not The Whole Movie?
Hey flashers,

I have a movie which consists of about 8 scenes, I would like to be able to put a preloader for each scene so the viewer wont have to load the whole entire movie each time they go to the website. (This would also save a lot of bandwidth). Everytime I've tried with a preloader, it just loads the whole movie.

Here is what my movie looks like:

http://www.ext311.com/joe

I'll post the .FLA if it is needed.
'
thanks!!
-Joe

injoy311@aol.com

Images Look Crappy When Adding Preload-scene
I have an imagesequence that should be exported with the swf in highest quality. Works great on it self and all, no problem whatsoever, UNTIL....

I added a preloader in a scene

Now when I export, the images look all crappy! Almost bitmap-like. I swear I've checked the properties of all images and the export-settings and all that.

Can someone help me with this problem?
Much appreciated,

Mediamonkey

How To Preload The First Scene And Show It While Loading Other Scenes
hi,

I have a swf as a base animation and I load different swf files as sections.
Those swfs that load as sections have 5 scenes each inside them.So we load a movie with 5 scenes into another base swf.

Problem is;

we don't have to see the all 5 scenes, 3 of those scenes are shown if the user wants to see.Normally we have to see the first 2 scenes and we call the other 3 with a button.
Normally I have a preloader for that 5 scenes totally.But now,I want the preloader load 2 scenes and show them.While we are seeing those 2 scenes,I want the computer download the other 3 scenes.But show the animation when the first 2 scenes are downloaded.You see what I mean?
Now while we see downloaded 2scenes, we can call the one of the 3 scenes.It can show if it is downloaded already or can show another (6th) scene that says loading....

I guess I am not very good at explaining it, please ask me if there is anything unclear.

Is it possible and how?

Thanks in advance

Preload Madness - Preload Movies Clip In A Movie?
hey people... a brought up this subject here a while back but it didn't really go anywhere... now that this sections seems to be a bit more lively perhaps some of you flashers can help me out... I am going to break this down very simple... I haven’t even storyboarded this so this is an extremely rough draft of the idea



I am building a photo gallery



this gallery has eight images which range from 30k-75k (roughly) so I don't want the user to wait for a full load of 240k-600k



I want to first load the thumbnails for the images... and then begin to preload the first image directly after that... then display it



and then from that point when the user clicks a thumbnail the corresponding full image will preload and then display


basicially this is about preloading a movieclip in a movie... I jsut can't wrap my head this... so I will ask for help before I get too deep.... any input on the basics of this idea would be appreciated

thanx!

Selectively Preload, Preload Rest While Playing
Hello,

I have updated a pre-bought flash template for a photographer. Long story short, the file is now 4M's -mostly from images- and he wants it to load faster. Right now it is all in one swf, no load movies. So the large jpg's are embedded. (I could make them all movies and load them as needed, but am trying to avoid that.)

I would like to know if it is possible to selectively preload. For instance load everything except the large images mc. This way the movie would play its long intro and the viewer would have to go to the thumbnail gallery before getting to the large images gallery. Meanwhile the large images mc could load in the background?

Any thoughts?

The site is here:
www.crphotography.com

Any help is greatly appreciated.

Preload, Finish Preload Anim, And Then Play
Hello!

I have a preloader with a mc that plays while it loads. I want the movie to preload the whole show, then finish playing the section of animation that it is in, and then play the main movie.

For example:
A ball goes from the right corner to the left (section 1) and then reverses back to the right (section 2). While the show loads the ball just goes back and forth. But once loaded, I want the ball mc to finish going to either corner and then _root.gotoAndPlay(5);

I am thinking of something like this (try not to giggle at me):

if (loaded == total) {
_root.ball_mc.gotoAndPlay(until the next frame label);
then
_root.gotoAndPlay(5);
}



This is my preloader code which works great but cuts of my ball mc abruptly:

onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(5);
}
}

Thanks so much!

Preload Code Help - Holding Content During Preload
First off, the current code works fine in terms of function but I want to see if someone has a code fix for me. When the preloader starts, I want the current image to "hold" inplace instead of being unloaded from the "container" MC. I want the bar to load, covering up the current image and then when the preload is complete, load the next image in and display it. Does anyone have an idea on how I might rearrange or change the code? I know I have seen this same technique on several web pages, I just havn't been able to figure out how to execute it.

click on btn1 or btn2 to load an image.

Here's the current SWF

http://josephryannasipak.com/test.html

Here's the code:

stop();

bar._visible = false;


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;

}

preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*550;
pText.text = "% "+Math.round((lBytes/tBytes)*100);
};

preload.onLoadComplete = function(targetMC) {
container._visible = true;
bar._visible = false;
trace(targetMC+" finished");
};

my_mc.loadClip("sunset.jpg", "container");

btn1.onPress = function () {
my_mc.loadClip("bluest.jpg", "container");
}

btn2.onPress = function () {
my_mc.loadClip("church.jpg", "container");
}

and the FLA file:

http://josephryannasipak.com/test.fla

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

i have one swf which is a site!

and one that is the music!!

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

this possible??

Won't Change Scene...neither With Actionscript,neither From Scene To Scene
I have a big problem...why won't my movie change from my intro to scene one...I built my intro, i built my scene one but it won't skip from one to another. At the begining i had a loop problem on my intro,and it would never go on to the next scene,and now even if i build a new page it won't change to another scene either....HELP PLEASE!!!

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

does anybody have a clue or suggestion?

thanks.

[F8] Flash Site, Multiple Scenes, Button Moves Scene To Scene Instead Of Navigating
Hi...I am very new at flash, so forgive my ignorance in advance...I really really need help!

I created a site, separated into scenes (intro, main-home, about, portfolio, press, contact).

About half the time the navigational buttons work fine. However, the other half of the time one of the buttons, the Press button, instead of bringing me to the Press scene, just moves scene to scene (for example, say I'm on the home page and I want to go to the Press page, it just goes to the about page...I hit the button again it goes to the Portfolio page, etc.). I think the problem lies somewhere in bypassing the intro prematurely (you can skip intro and go straight to the site/home-main scene), but I'm not positive.

Here's the code for the Press button:
on (release) {
gotoAndPlay("press", "pressframe");
}


where pressframe is the name of the first frames in the Press scene.

I can upload the fla file to my own site for download and review if necessary....

Please help!....I am losing sleep and hair over this.

Help With Passing Number From Scene 1 To Scene 2's Dynamic Text Field
hi all ,
i have 2 scenes on the first i retreve user information from flash and through php to a mysql database then send it back to flash. on one of the lines i retreive a id number

content.htmlText += "&nbsp;&nbsp;<a href='#" + this["id"+i] + "'>" + this["id"+i] + "</a><br><br>";

when the user clicks on this ahref i want to goto scene 2 and insert the id into a dynamic textfield with an instance name of "recorde_id"

this scene is complete and works it retreives more infor about the user..

but i have to manualy enter a id number into a INPUT filed i want it to be automatic that why i have changed it to be dynamic so it can capter the ahref from scene 1.. if you need more code or information just ask and ill deliver, im a flash newbee..

cheers aron.

Targeting Frame Label In Scene From Movie Clip In Same Scene
Hey Pals,

I'm trying to target a frame label on the timeline of a scene from a movie clip within the same scene, using Flash MX 2004 Pro. The scene is ultimately used as a .swf to load as a page of a website. The frame label is called "miscOn", the scene is called "misc". The below code is attached to a button within the movie clip.

on (release) {
loadMovieNum("tajwebsite_main.swf",1);
gotoAndPlay(miscOn);

}


Thanks!

Stu

Simple Gotoandplay - Animate The Scene Out Before Playing Selected Scene?
Hey there again,

Just wondering if you guys could point me in the right direction.
Before, when I made full-flash websites, when I clicked a button I'd have it gotoandplay frame 60 or whatever (or scene 2 or 3 or 4 etc.) and that page would start up there and have a nice little animating intro but it would be a very abrupt start because anything on the previous page would just disappeer jaggedly.

But I've seen a lot of nice sites, that once you press a button, it'll clean up the current scene, say have everything burn out or fade or or something instead of just having the next option just appear, then go to the selected page. Say they clicked News or Contact, and they were on products. It would allow me to have a timeline to animate all the objects out (just a simple tween) then once it reached the end and all the objects were out, it knew which button they pressed and where to gotoandplay.

This is probably easy actionscripting (or not, I have no clue) so it would be greatly appreciated if someone could direct me, thanks!

Scene 2 Works Fine, But When Preloaded Added Scene Will Not Work
I have a website at wosso.com which I needed a preloader. So currently the site works fine. I am toying with a preloaded, but when I add it the main part of the site does not function.

There are two scenes, PRELOADER and SCENE 1. My preloader includes this script in the first frame of the preloader: ifFrameLoaded ("Scene 1", 105){
gotoAndPlay ("Scene 1", 1);
}


I have also inluded this line at the end of the preloader, but also tried it without this line:

gotoAndPlay ("Preload", 1);

I haven't used Flash in some time and I am not good at scripting. It seems to make sense, but why is it not working when SCnene 1 works fine by itself.
Any sulotion/suggestions?

Thanks,

Wayne

Play The Rest Of Current Scene, THEN Gotoandplay Another Pre-determined Scene
Hi,

Im my scene contains 6 buttons, I want button '1' to play the rest of the current scene (for example scene '0' then goto and play scene '1'

I want button '2' to play the rest of the current scene (for example scene '0' then goto and play scene '2'


I want button '3' to play the rest of the current scene (for example scene '0' then goto and play scene '3'

etc....

any ideas? this is for actionscript 3. My current script just makes the button goto a certain frame, can I edit it? here it is:

stop();

thumbbtn1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndStop(2);
}
thumbbtn2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
gotoAndStop(3);


any help greatly appreciated.

Ger

Scene -> Object? Turning A Scene Into An Importable Symbol For Other Projects
Okay I made a scene with movement and everything, but when I convert it to a symbol I lose the movement frames.
I want to be able to import it as an object so that the animation loops for as long as I need it to in the other project.

How do I do this?

Sound Plays From Next Scene, While Playing In Current Scene?
i am making an animation, i have about 8 scenes.
for some reason it starts playing the sound from the next scene in the middle of the current scene.
why?? i checked movie explorer and the sound is in another scene. does that sound like a flash bug, or just me? it is a big file, could that be it. please help it is driving me crazy!!!!!

I Cant Navigate 1 Scene From Another Scene Thorogh Movie Clip
SIr i made a Movie Clip and in the movie clip there are 4 buttons when i want to use the button so go to another scence it cant happen so how can i go to Another scene by the button which is present in the MOVIE clip
i think u understand my Problem
simply summary is that i there is a button in the movie clip and i want to use the button to go to another scene but it cant happen
Thk u in adnvance for any body Consideration

On My Movie, At The Middle Of The 3rd Scene, Goes And Plays The Sounds On 4 Scene...m
on my movie, at the middle of the 3rd scene, goes and plays the sounds on 4 scene...leaving some stuff of the 3rd... then goes blank... then it just gets crazy... no where there in the middle of the scene i gave it a command to go to the next scene... what on earth is going on...

please help...
it never happened before...
mayor deadline/...

urgent care...


thank you in advance:
chesckob

Button Relase; Play Curent Scene And Go (scene)
I need a bit of help, and its hard to explain. I have a menu that consist of 6 buttons on Scene1. I want to be able to click on a button and play scene1,frame37, then after it finishes playing I want it to move over the designated scene from the button pressed.

//This is what I currently have which makes the button play the ending of the scene.
on (release)
{gotoAndPlay( "scene 1", "fadeout");
}

//I need to finish the actionscrip by going to a different scene after it finishes playing the current scene. This is for all the buttons.

Example:
Button1 needs to play "scene 1", "37" then go to scene 3
Button2 needs to play "scene 1", "37" then go to scene 4
(any button) to Play "scene 1", "37" then go to (scnen asign from button)
and so on.

Any feedback is greatly appreciated.

How To Disable The Intro Sound When Switching From 1 Scene To 2nd Scene
hi guys
i got another problem in my project

below is an attacchment
i wanna stop the intro sound from playing when i from scene 3 go to scene 2
how to fix it? T_T


i want the song to autoplay for the scene 1 without adding button to control it.

Buttons Aren't Going To Correct Scene, Just Progresses To Next Scene :(
Anyone ever have the problem when your buttons have the code to jump to a specific scene, they just jump to the next scene on your palette instead?

For instance, I've got 6 buttons that I need to operate as a normal HTML site. So I programmed each button to jump to the corresponding scene with...


Code:

on(release) {
gotoAndPlay("fine, frame1");
}
In this situation, that button needs to jump to the scene "fine", but instead, when I click on it, it simply jumps to the next scene in the scene palette (which isn't "fine").

Interestingly as well, once it scrolls through all 6 scenes (by clicking on any button 6 times), it starts over with the first scene again.

Anybody know what I am doing wrong?

Thanks!

How To Start Play Scene From Movie Located In Another Scene
Please, help,

i need to solve this problem:

what action script i need to put on a button which is located in a movie called "mainmovie" (of scene 2) to play scene 1.

thank you.

therock

Changing Form Preloading Scene Into Main Scene.
hi all,

i've got a problem i can't figure out. i'm working on my website in flash. this is how i will do it:

http://www.auto-i-public.ch/adi/aresthetics.html

now, you see the letters cercling around in the upper left corner. all is well. now i created a preloader (there will be heavy stuff on it...maybe even shockwave files). i chose to do it with a new scene. it's a basic one. bar filling up, a few dynamic texts with the status. this is working too.
but then, when the preloading is done, it jumps into the main scene. everything appears and works. but the circeling letters don't work anymore. they run on a little loop for themselves. it's actually the only loop i have on my mainline. the rest is in mc's. i even tried to put the letters in a mc. didn't work either. it seems as the letters wouldn't initialize anymore. i checked if there are no already set variables coming over from the preloader. negative. i'm out of wisdom. if anyone could help me...i'd send the files, if nothing else helps. it's nothing really to steal.

tnx
adrian

Click, Clear Stage Scene, THEN New Scene
I think this is a common problem, but I haven't found the common solution. We've discussed this a little on a another thread, but we didn't really come up with a solution.

I know a lot of people want to have a button (well, multiple buttons), that when you click on it, it gotoAndPlay()s a scene that clears the stage, and THEN goes to a new scene (or in my case webpage) based on what button was clicked.

I know the answer has to be some use of variables and actionscript, but I haven't been able to puzzle it out, being new to flash.

Does anyone know the solution, or better yet, have a .fla file with the solution (so we can all see greatness in action)?

Thanks!

Button In Scene 1 Loads A Specific Mc In Scene 2?
Unfortunately my brain isn't really designed for understanding or figuring our ActionScript very well... Here's what I'm trying to do and the problem:

The user arrives at a 'splash screen' in Scene 1 which gives them the option to choose to view the demo in 'interactive' or 'autorun' mode (the two modes are slightly different in terms of their content so I'll have two separate scenes, Scene 2 will contain all the 'interactive' movie clips and Scene 3 will contain all the 'autorun' movie clips). The user can then choose whether they'd like to view the demo with the sound on or off. Once they've made this selection they'll be taken to the opening animation of the mode (i.e. interactive or autorun) they selected, with the sound on or off as they specified.

What ActionScript needs to be applied to the sound on or off buttons in Scene 1 to ensure that the correct sound movie clip loads at the beginning of Scene 2 or Scene 3.

If the user initially decided to view the demo in autorun mode they will be able to change to interactive mode at any time... how can I ensure the sound setting they have selected remains unchanged across Scenes (and they can choose to turn the sound on or off at any time)?

I need to create this as a single SWF - I can have as many Scenes and movie clips as is necessary but cannot use loadMovie and multiple SWF's

If anyone has any ideas I'd love to hear them! I just can't figure it out and I'm getting REALLY desperate!

Thanks!

Loader Scene -> Movie Scene Problem
When my preloader finishes loading my movie, and i use gotoandplay ("Movie", 1), something goes wrong. When it is done loading, it continues on to the "Movie" Scene, but keeps switching rapidly between the load scene and movie scene. I need to know how to completely turn off the loader scene when it completes. Thanks

On Release - Finish Scene - Goto Scene?
I have a navigation scene with buttons that is 100 frames but stops to allow navigation at 50.

What is the correct script to add to the buttons that allows me to finish the current scene to frame 100, then go to required scene??

Help is greatly appreciated.
Thanks,
Nick

Playing A Scene When Current Scene Ends
I don't want to come sound like and idiot, but i am stuck on one of the most simplest things.
i have 3 scenes, and in my first scene, i have two buttons.
The first button plays the rest of the first scene and then goes to the 2nd scene.
But!<
the 2nd button is meant to play the rest of the first scene and then go to the 3rd scene, but i don't know how! I've tried the 'and' statement, '+' etc but nothing works.
Any help would be greatly appreciated!

Sound Bleed From Scene To Scene: Newbie Needs Help
im just learning flash mx

i have a simple scene with a background sound looping on a layer continuously.

once that scene is done the next scene loads up with its own back ground sound

my problem is that the first scenes background sound bleeds into the 2nd scene.. and so on..
it does end eventually
but how do i make it stop exactly when that scene is done.??

this must have an easy explanation

please help the newbie

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