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




Layers And Preloaders



I am working on a site right now site I have the main layer which loads all the other movies. What I would like to do is build a loader on the main movie that displays how much longer they have to wait for the rest of the movies to load, how can I do this?



FlashKit > Flash Help > Flash General Help
Posted on: 09-22-2003, 02:36 PM


View Complete Forum Thread with Replies

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

Clicking Trough Layers On Other Layers, How To Stop It?
I want to stop Flash from letting users to be able to click on buttons on layers below the top layer when the button is hidden, so not the whole layer, but just what is underneath something else. Is this possible?

Loading Mc 2 After Mc 1 Is Done Using Layers Seperate Layers In The Same Scene..
Hello, I'm wanting to know how to tell a scene to stop and play a mc in layer1 frame1, when its through playing that mc start playing another mc placed in layer 2 frame 2... so on so forth, if theres an easier way of doing this without using seperate frames could someone please tell me.. Thank you much!

Merging Layers Or Scanning Layers Into Image
Hello all. Been awhile since I've been to the FlashKit forums, but I'm learning something new.
Anyway, I've been programming in AS1 and AS2 for awhile and just recently started learning to do AS3. To start my learning progress I'm making a drawing program...
So far I just have draw and erase functions. Every time you "draw" it creates a new Shape object to draw on. This way if I want to add "Undo" I just go through and delete the new Shape object one by one. When you erase it creates a layer above the last draw area with a blend mode of "erase". So pretty simple.
The problem I have so far is that after drawing and erasing a bit it starts to get laggy as all the layers pile up on top of each other. When I add an undo function I will only have 10 steps of undo so to reduce overhead. But even without undo the extra layers are needed to be able to erase part of the drawing and then draw over where you erased.
So this brings me to my question. Is there a way in AS3 to merge together multiple layers or Shape objects? So after so many layers are created by drawing and erasing I can merge them into one flat one to reduce the processing needed.
I was thinking maybe I could do this though scanning the pixels on the clip contaning all the layers? I know I worked with saving images in Flash 8 before, but not sure how this works in AS3. I hear it's faster, hopefully fast enough to not have to wait 5 minutes every so many times you draw in my program.

And here's the code I have so far:

code:
var drawArray:Array=new Array();

var layerClip:MovieClip=new MovieClip();
var drawArea:Shape= new Shape();

this.addChild(layerClip);
layerClip.addChild(drawArea);

layerClip.blendMode=BlendMode.LAYER

drawArray.push(drawArea);

var drawLayer:int=0;
var prevX:int=0;
var prevY:int=0;
var erase:Boolean=false;
function runDraw(event:MouseEvent) {
drawArray[drawLayer].graphics.curveTo(prevX, prevY,(prevX+drawArray[drawLayer].mouseX)/2,(prevY+drawArray[drawLayer].mouseY)/2);
prevX=drawArray[drawLayer].mouseX;
prevY=drawArray[drawLayer].mouseY;
event.updateAfterEvent();
}
function startDraw(event:MouseEvent):void {
if (erase) {
drawArray[drawLayer].blendMode=BlendMode.ERASE
drawArray[drawLayer].graphics.lineStyle(6, 0x990000, .75);
}
else {
drawArray[drawLayer].graphics.lineStyle(2, 0x990000, .75);
}
drawArray[drawLayer].graphics.moveTo(drawArray[drawLayer].mouseX, drawArray[drawLayer].mouseY);
prevX=drawArea.mouseX;
prevY=drawArea.mouseY;
stage.addEventListener(MouseEvent.MOUSE_MOVE, runDraw);
}
function stopDraw(event:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_MOVE, runDraw);
var drawArea:Shape= new Shape();
layerClip.addChild(drawArea);
drawArray.push(drawArea);
drawLayer++;
}
function toggleErase(event:MouseEvent):void {
if (erase) {
erase=false;
}
else {
erase=true;
}
}
stage.addEventListener(MouseEvent.MOUSE_DOWN, startDraw);
stage.addEventListener(MouseEvent.MOUSE_UP, stopDraw);
eraseBut.addEventListener(MouseEvent.CLICK, toggleErase);

Turn Selected Layers Into Guide Layers?
i had 3 layers selected... went to trash them and somehow the were turned into guide layers... this would be great if i could find out how it happened. rather than turning one at a time into a guide.

Anybody know how?

Importing AI Layers As Flash Layers
Is there a way to import Illustrator layers as Flash layers. Most of the time I export my Illustrator file as a swf then import it into flash. Then One by one I have copy an object...delete...then make a new layer and past it in place..

[F8] Layers ... Oh, GOOD LAWD, Layers
Greetings, Flash Gurus and Gurus-to-be,

i am mocking up a site, which can be found at HERE

The only links operational are Catering and King Cakes, and are only operational if you REFRESH the page. i know i am lacking a preloader, i have it built, but am not wasting time with it right now.

As you can see from the example, i have our little Butcher Guy off to the left, and for each "department" of our organization, i would like to dress him for the part. i want our butcher guy to fade in and out, and in the case of the King Cake page, i would like our logo and the Italian flag on the left to change into the traditional Mardi Gras colors in all their gaudy splendor.

My problem lies in the fact that my men seem to be piling up on one another, as does my Italian and Mardi Gras flags.

If i use "index.html" to load "Master.swf" (which is the initial, fade in page), and master.swf has inside of it, actionscript to load "MasterMardiGras.swf", (which is the King Cake page), how would i go about getting control and order in here?

Copies of the swf files are here:
http://img150.imageshack.us/my.php?image=loaderjw0.swf
http://img124.imageshack.us/my.php?image=masterqz4.swf
http://img145.imageshack.us/my.php?i...rdigrashh8.swf
http://img388.imageshack.us/my.php?i...ateringur4.swf
http://img125.imageshack.us/my.php?i...tercafety3.swf

Thanking you, i am, for your great, overflowing keg of knowledge!

Question About Controlling Layers From Other Layers
Is it possbile to create an action in a loaded movie in layer1 that will tell the movie in layer0 to go to a specific frame and start playing?

Another question I have is, can you load a movie into a container or layer and have it start, not at the begininning, but at a specific spot in the loaded movie's timeline?

Hidden Layers Vs Guide Layers
I often have things on a layer that I don't want to see while I'm working on another layer and frequently testing and tweaking and I used to just have those hidden in the timeline and they would publish. And if I didn't want a layer to publish, I'd make it a guide. In CS3 it seems that those hidden layers won't publish (though at times I've had them publish for me in certain files, but I don't know why).

Is there a setting I can choose to make hidden fields publish like they did prior to CS3?

Action Scripted Layers Always Act As Top Layers?
I used this snow effect from kirupa...
<A href="http://http://www.kirupa.com/developer/mx/snow.htm

However, the snow effect always acts like the top layer, ok what i mean is, i have 3 layers, (1)toplayer= a car, (2)middle= snow, (3)low= background.

I want to make the snow to be seen behind the car...i hope you understand what i mean , whenever i put the code from the link above it acts as the top layer and appears in front of everything.

Any help is appreciated...

Oh Layers..layers...I Hate Da Layers
HI!
so there is some hair on the floor, and some bald patches in my head...big deal!
anyways...at the moment my movie is kinda messy, but something is happening that really annoys me!
i have this mc that loads into a target..and then you click button2 and this loads mc2 into the target, ok fine!
BUT, what is buggin´me, is that when you click, say, button3, to load mc3...you see like whats underneat...on the very bottom layer...and i dont want that to happen....i want there to either be nothing...or atleast show the previously loaded mc...but not the very bottom.....
how can i solve this guys??

thanks very mucho! adios

Preloaders, Preloaders Everywhere But Not A One That Fits
I have an introduction for a site that consists of 3 files index.htm intro.swf intro2.swf Index.htm forwards on to intro.swf which contains a preloader (not a percentage on just one I cobbled together) Once intro.swf has loaded it begins to play and on the first content frame of intro.swf is an action to load movie intro2.swf.
Unfortunately intro2.swf loads before intro.swf has finished and starts to play prematurely So what I need if it is possible is a command to load intro2.swf and then get it to sit there and wait for the call from the last frame of intro.swf to play.

The reason I have two swf files is that I needed to change the background color of the movie and the easiest way I could find to do that was make two different movies

Just farting around with this, to see if i can figure it out so any resolution doesnt have to be pretty.
I have no php, asp, cgi support for the hosting space so i need to do it with action script

any help will be greatly appreciated.

How So I Keep Layers From Dissapearing Behind Other Layers?
How do I keep layers from dissapearing behind other layers. I want this layer to be on top of the backround layer - not fall behind it. Any help would be greatly appreciated.

PRELOADERS
can you make preloaders for movies which you ara going to load?? i belive u can can anybody tell me how or just say if this subject has been threaded so i can try to find it.
SO it is, i want to load some swf in some other swf but want to make a preloader
how to do that??

PreloaderS:(
Help! i need to know how to get one! My thing takes so long to load that il;l eed a preloader! Make it simple please!

Preloaders
where's the "end frame loaded" action in 5?

Preloaders
i was wondering if anyone would be as so kind as to give me a fla file with a preloader in it?

Preloaders In Mac?
Im having problems with my preloader when i view it on a mac, im using netscape an internet explorer on the mac and the loading doesnt work. What should i do to meke it work on the mac, in PC works great using netscape and Explorer. If you know what can i do or if you know where can i get one that work on both platforms you will make me very happy!!!

Preloaders
OK. I finally got a preloader working. I tried putting the preloader in the same scene as my movie, so this is how it goes

first ten frames = preloader
11th frame "if frame loaded (current scene), goto and play 13"
12th frame "goto and play 1"

works just fine.

what I'm wondering is, how can I do that with multiple scenes?

I've tried "if frame loaded (main movie), goto and play (putting this action in the preloader scene)

it doesn't work? y?!

Preloaders
Are there any tutorials on pre-loaders? Because I need to find out how to use the one I've made effectively...

Thnx

Preloaders
Hi, just a quick question ..

i have a preloader that works fine with frame labels, i'm trying to do a similar thing with the buttons

putting a go to command to an action saying

ifFrameLoaded ("web") {
gotoAndPlay (75);
}


i've just been reading the posts one saying that flash wont recognise the flag until it comes across it

is there a better way of doing this ??

thx in advance

BP

ps the first loader works but the button (with go to and stop) goes to the waiting frame but ignores the

ifFrameLoaded
gotoAndPlay (75);
}


Mmmmmmmmm

Preloaders......................................
i've got a movie with 10 scenes and i want to load them all before the movie starts. can any body help with a preloader for this? please?

Something Regarding Preloaders...
Just wondering if my preloading animation be placed in a different scene from my main animations, which is in scene 1. Or must my preloader be placed in the same timeline?

Thanx...

About Those Preloaders
Where do u put em?
In front of the film and how do I make em not a part of the film....I meen how do I make em work corecly?
Je I hope u understand
Shorten: Where do I put the preloader?

Preloaders And A Whole Lot More
my web page is set up in two different flash movies. first is the main page, which i have pretty much done. then there are links to another flash page which actually displays the projects and items i want. the second (project page) is set up so that i have a one-frame movie clip on the main timeline for each project i have done. i have the first page set up so that when i click a link it will open a new window. in this new window i want to only call on the frame that has the respective project from the first window. i also believe i will need a preloader for some of these movie clips. first question: how do i call on one specific frame in my second page? second question: how do i preload for just that frame? any help would be friggin awesome right now as i am about to pull out my hair. i hope i explained this well enough, it seems pretty tough for me still to comprehend, ahhh whatever, smoke em if you got em
thanks
SchmidyUC

Preloaders
HI everyone. I've started to make long flash animations to post on my website, the only problem is they take forever to load then there really blocky. I know that preloaders wont solve this problem but at least they'll stop it from being blocky and keep stopping once loaded. I went to the tutorials and i have got all the information on them, great, but im a bit confussed on where the preloader should go. In a new scene, just before my animation, under my animation or anywhere else so its fist to be displayed when i load the animation up.
I hope you can understand what im on about.
Thanks in advance
Tom

Preloaders
How do u do preloaders? Please Explain and dont lead me to a link!

Um..Preloaders?
I'm having trouble making a preloader for my website. The condition goes like this:

(In scene 2)
ifFrameloaded(Scene1,200<number of my frames>) {
gotoandplay(Scene1,2)
}

I have graphics in scene 1. Even though the graphics aren't loaded yet, it still proceeds to scene 2 (the beginning of the presentation).

What should I do?

Kin Preloaders
help

i have done umpteen preloader tutes and added mine to my site but it just wont work properly. My main movie is 96 frames long (scene2) and my preloader 3 frames (scene1).

i have the actions if frame loaded scene2 96
goto and play scene2 1 on frame 2 of my preloader

on frame 3 of my preloader i have the action goto and playscene 1 frame1.

when i use show streaming on test movie it stutters like a pig and even though it shows the preloader for about 3 secs it is as though it is not loading the whole movie before it starts playing . i have tried using frame labels but it seems to make no difference

Preloaders
hello there,

i am currently making a pretty big flash in filesize. around 1 MB. only one preloader at the beginning would take too much time for some ppl and so i would like to insert more preloaders for e.g. my picture gallery inside the main movie.
when i tried that with loadmovie actionscript, the hole movie loaded completely new, but i want only the content of the pic gallery loaded. background and menu.. should keep on screen while the preloader for the gallery is loading and the gallery comes up finally.
how do i have to manage that? maybe any opensources known?

thank you for reading. hopefully someone can help..´

Bori

Preloaders
ok i have a preloader and i know u r supposed to copy your movie and paste it onto the preloader?right?ok. i just wondered wat layer co u paster it onto???or am i wrong about copying and then pasting the movie???

Preloaders Please?
Really need a good preloader tutorial that will help me to make my graphics for a preloader play while I wait and do the countdown thing also. I am using flash 5. Thank you everyone who helps me out in here

Preloaders
Ok, I'm looking for a few opinions on preloaders, personally I love the idea of knowing if I'm going to have to wait a week or a few minutes to see a site. I've been working on a site for some old UO buddies, (MMORPG type game), I'm reasonably new to flash, but I love it so far.
As I expand the site, I've broken parts into dif .swf files, with the belief that it will make it more 'bandwidth friendly'. So far the main/first .swf is up to 160k in size, and the sub .swf files range from 5k to 30k in size. Ok, here's my question:
At what point (file size) do you feel a preloader should be implemented?
Knowing that 99% of my target audience is sporting broadband, im not entirely sure what to do.

I feel I've 'graduated' from pure newbie, to well, pure novice. The site is LAME compared to most of the sites I've looked at in the Flash Site forum, but If you feel you need/want to see it to answer better..... *grimaces*
http://members.cox.net/piaso2/cdtest/

please, tell me should I put up a splash with a preloader in it?

PreLoaders
Hey all,
I'm new to all the flash stuff... Is there anywhere that i can download PreLoaders?

Preloaders
I have looked at the tutorials on this website and on the offisial macromedia flash 5 site, but i cant understand how to make a preloader. Is there a simlple way of making one?

Preloaders
Hi

I'm doing a website for a band, but I'm having trouble with preloaders. Or, well my preloader works, but when
I try accessing the site all I get is a blank flash movie, and after a long time my preloader appears. I want my preloader to appear right away.
My preloader and my mainmovie is on the same scene. I use some actionscript for the prealoder, and labels so the actionsscript now what to loop and so on.
The link to the site is http://www.epicenterband.com/flash/preview.html

Please help me.

Thanx

Jackie

Preloaders
i need help my movie plays befor it is fully loaded and the stops and goes all jumpy half way throught how do i stop this

PRELOADERS
preloaders!!!! If anyone who is reading this knows how to preload their movies..... PLEASE help me... I have tried EVERY tutorial on this site and they all dont work..... I have followed EVERY direction there and nothing ever works. I tried a bar preloader and that one seemed to work but after it preloads and **** it sends you to the last frame of the movie. I have put it to go to the 1st frame on scene 1. I will ONLY go to last frame of the entire movie... PLEASE help me or send me your preloader code.
Thank you

By the way, this is the script:
key frame #2

loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1);
totalkbytes = Math.ceil(totalbytes/1);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}

keyframe #3

gotoAndPlay ("preload", 1);
// loop until last frame if loaded

Where Do Preloaders Fit In....?
Hi all,

i have a movie that contains buttons, when you press a button, it loads an external swf into a blank MC...how do i introduce a (much needed) preloader before the swf loads....

this will be the case for each button, hence, each swf..

cheers!!!!

Help With PRELOADERS ?
1)How to build a preloader with a simple animation, and a moving bar?

2)Can this preloader be reusable, say a movie clip or smart clip?

3)Where do I place the preloader? On the main timeline or at the beginning of an external swf.

I guess I'm just trying to understand how to build and use a preloader correctly. I've looked over tutorials, but have really not found explanations on there use in a fully interactive site.

Preloaders...
Hi all

My preloader never gets past 1% before the movie loads... this is the script:

perc = Math.round((_parent.getBytesLoaded()/_parent.getBytesTotal())*100);
xperc = perc/100;
barlength = 200;
if ((perc == 100) and (bar._width == barlength)) {
_parent.gotoAndPlay(2);
} else {
nperc = perc+"%";
bar._width = barlength*xperc;
bar._x = -100+(bar._width/2);
}


is anything wrong wit it?

Cheers

MX

Preloaders Again
I have a 2 scene movie, 'intro' and 'scene 1'. 'intro' is my preloader for 'scene1' which is a 20mb video clip (this will be on a CD-ROM one day!)

I have built my preloader (Eddie Carrol one and it seems OK) but when I test the movie the movie begins at the start of 'scene1' and not with 'intro'.

'intro' is the first scene in my scene folder and 'scene1' is the 2nd.

Can anyone tell me what I may be doing wrong?

Preloaders
Hey all I am kinda new with flash. If you want to see my site it's http://jcs1287.tripod.com/evidestudios.com . All the turtorials i have been reading on preloaders are to advanced for me. I mean i have been spending the last 2 days on trying to put in action script, exe. Can anyone give me a easy explaining link on how to use preloaders?

Thanks for help

Preloaders 101
From the experienced users of Flash, what are the key concepts involving a preloader and if you wish to use a preloader more than once on a page (I guess that means you would want to use it more than once in the main movie clip?) what are the different techniques / philosophies floating around? I'm assuming that I would create a separate movie clip for the preloader. Thanks!

Rajesh Nakrani
Phil. 4:4

Preloaders
How can i play my preloader, and load my main movie in the background. And when my main movie is loaded, stop play on the preloader. That is the problem i'm having. I have 2 scenes, and once the main movie is loaded it plays the main movie, but as soon as i click on a button in the main movie, it goes back to the preloader!

Thanks!

Preloaders
I want to create a preloader that plays a movie clip, depending on the percentage loaded.
eg.
A simple 10, 9, 8 7 6 5 4 3 2 1 countdown sequence, that plays according to how much is downloaded.
So say the entire file is 100kb, when its on the number 10 on the countdown 10kb would have been downloaded. The number 9 20kbs and so on. So when it gets to number 1 its all downloaded!
Can anyone point me to any movies or tutorials?

Preloaders
Do preloaders have to go inside the swf that is being loaded?

Can I not create a movie that loads another movie into a nested movie clip, and be able to check the load progress of that clip?

Preloaders
how preloaders work?

AS Preloaders?
Looking for an EASY ,preferably all AS, preloader.

Just a simple one where a line gets bigger the closer to being loaded. I dont wanna do a tween where it goes 100 pixels (1 pixel at a time) every kilobyte. Just never made one in all AS.. any adivce?

-whispers-

Preloaders
I saw a lot of sites that loads their link away from the homepage. For example :: 2A

When you enter the site, it loads the home link. When you click on another link, it loads that separately.

How do you code that?

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