View Full Version : Load Movies Sometimes Delay?
Metrov 8
01-19-2001, 10:56 PM
Most of the Flash sites I build use the Load Movie function to bring up menu MCs. I've noticed, however, that sometimes there is a considerable delay before the movie comes up. Most of the time they come up fast, but sometimes there is that delay, and so I think it must be network congestion even though I'm on cable.
I've noticed on 2advanced [he says he uses the same Load Movie method] that his menu MCs seem to come up right away. So my questions are:
1 -- Is there a way to ensure that the Load Movie function will bring up an MC quickly?
2 -- On 2advanced, those sliding doors shut everytime you hit a menu button. They don't open until the MC is loaded behind them. There must a variable that is loaded by the new MC that signals the 'doors' movie to open again. Can anyone verify this? Or does anyone know a better way to do that?
Thanks, metrov
1. Keep your swf's small !
Also preloading is a good idea, whereby the swf's are loaded and kept 'invisible' till they are needed.
2. Yes I would imagine there's a command to open the doors at the end of the mc.
It is worth putting a good deal of thought into how your movie is going to load and give the user something to do while they wait...
~ mgb
Metrov 8
01-20-2001, 12:11 AM
"Also preloading is a good idea, whereby the swf's are loaded and kept 'invisible' till they are needed."
I'm not familiar with this technique. Where would I pre-load the swfs in order to keep them invisible?
And once there, how do I call them up?
P.S. Here's my site: http://fineartwebdesign.com
thanks, m
Just put a blank frame in the start with a stop action and to make it play;
Begin tell target ("_level 1")
Go to and Play (2)
or if your swf is loaded in a higher level target that level.
~ mgb
Metrov 8
01-20-2001, 12:23 AM
Thank you very much. I actually just figured it out while awaiting your response. I'm grateful for your suggestion.
Metrov
Metrov 8
01-20-2001, 03:47 AM
mgb,
After thinking it over, I'm not sure the plan will work afterall. This seems to be a worthwhile issue for everyone, so I will elaborate.
1 -- I have an all Flash site.
2 -- My menu consists of 10 categories; each category is contained in a separate MC.
3 -- According to the plan described in the previous thread, the MCs can be preloaded into level1, with a blank first frame so they remain invisible. [Alternatively, they can be preloaded into their own levels.]
4 -- A menu button will call up a particular MC by using TelTarget to make it go to the next frame which is where the content resides.
5 -- This is where I find a problem: When I call up the next menu item/MC, I want the first MC to disappear. Well, this is easy if I simply use Load Movie. The Load Movie action will unload whatever movie is on level1 and replace it with the new movie. Using TelTarget makes it much more complicated to remove the original movie, doesn't it? I will have no idea which movie the viewer has called up, so the only way to make it go away would be to create a variable action....right? [Well, I don't yet have enough experience to do that.]
Am I making this too complicated? Is there something I'm missing?
m
Put this on the button;
Set variable: "i" =1
Loop while i < = 5
Begin tell target ("_level" & i )
Go to and stop (1)
End tell target
Set variable "i" = i + 1
End Loop
Begin tell target ("_level 3")
Go to and Play (2)
this is presuming you have 5 swf's on levels 1 to 5 and you want to play _level 3
Alternatively you can use the swf's to set a variable on level 0 if you put in frame 2 of each swf;
Begin tell target ("_level 0" )
Set variable: "on" = "_level3"
End tell target
and for the button;
Begin tell target (on )
Go to and stop (1)
End tell target
Begin tell target ("_level 4")
Go to and Play (2)
The variable 'on' would be set to the level you are setting it from.
~ mgb
[Edited by mgb on 01-20-2001 at 07:38 AM]
Metrov 8
01-20-2001, 04:12 AM
That makes sense. Too tired to try it out now, but I'll look into it in the next few days. Thank you very much. m
Metrov 8
01-20-2001, 03:12 PM
Originally posted by mgb
Put this on the button;
Set variable: "i" =1
Loop while i < = 5
Begin tell target ("_level" & i )
Go to and stop (1)
End tell target
Set variable "i" = i + 1
End Loop
Begin tell target ("_level 3")
Go to and Play (2)
this is presuming you have 5 swf's on levels 1 to 5 and you want to play _level 3
mgb, may I ask you a small favor. I'm trying to implement your plan without success. I tried using the above code by pasting it into expert mode. But when I switch to normal mode, Flash tells me there are errors. Obviously, I'm missing a few components. Assuming my .swf is called, 'websites.swf' would you mind altering the above code so that I can paste it directly into my button? That way, with study, I can figure out how it's all working.
Also, if I'm using tell target, don't I need to give my websites.swf an instance name? Well, if that .swf is the only MC in level3, how do I give it an instance name?
Thanks for you help and your patience.
m
Try
Set variable: "i" =1
Loop while i < = 5
Begin tell target (Eval("_level" & i ))
Go to and stop (1)
End tell target
Set variable "i" = i + 1
End Loop
Begin tell target ("_level 3")
Go to and Play (2)
I have not used this myself but give it a try...no need to name the swf because you can target the level it's on.
An alternative is to, in the 2nd. frame of each loaded .swf, put;
Begin tell target ("_level0")
Set variable: "playing" = "_level3" //or what ever level is concerned.
then;
Begin tell target (playing)
Go to and stop (1)
mgb
[Edited by mgb on 01-20-2001 at 01:41 PM]
Metrov 8
01-21-2001, 02:30 AM
mgb,
Thanks so much for your help, but I'm still having no luck with your plan. I can't even write the script you've suggested without getting error messages from Flash, let alone get the script to work. I just don't yet have enough knowledge of AS to get this work.
SUGGESTION: I THINK THIS SUBJECT WOULD MAKE AN EXCELLENT TUTORIAL SINCE IT SEEMS ANYONE MAKING AN ALL FLASH SITE WOULD BENEFIT BY USING THIS METHOD. PERHAPS YOU AND JESSE WOULD CONSIDER WRITING THIS TUTORIAL.
Thanks, m
Send me your fla if you like...
Metrov 8
01-24-2001, 07:56 PM
With much help and patience from mgb, here's the solution we finally arrived at:
on (release) {
i = 1;
while (Number(i)<=3) {
tellTarget ("_level" add i) {
gotoAndStop (1);
}
i = Number(i)+1;
}
tellTarget ("_level1") {
gotoAndStop (2);
}
}
However, the plan has been abandoned because if you clicked a button before an MC was loaded, nothing happened. MGB told me to make sure I kept the buttons unavailable until the MCs were completely loaded, but that would have kept the viewer waiting far too long. [Hillman Curtis' rule of thumb is 8 secs]
So I came up with another solution: The problem began when I realized there was sometimes a delay when 'loading' a movie. Well, I created a very small, preloaded 'INITIALIZING' movie that comes up instantly when you click a button. That way the viewer at least knows that SOMETHING is happening. Then when the menu MC arrives, it carries a command that closes the Initializing MC.
Though I ended up not using the above AS, I learned several things from it [like using tellTarget / level# command, etc.] that allowed me to come up with my present solution.
The solution really only applies to 56k users; that's about the only time you see much. But at least now they will know that SOMETHING IS HAPPENING regardless of any delays that might occur. If you want to see it all in action, check out my web design site [ http://fineartwebdesign.com ]
It's really the same principle behind Eric Jordan's 2advanced site -- those doors of his close, and the logo twirls, and the doors do not open until the movie is loaded -- a fairly entertaining distraction.
So thanks again mgb. Best wishes, Metrov
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.