Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
aistudios webforumsuser@macromedia.com #1
Re: PLEASE HELP - load into levels, not working in browser
I JUST GOT YOUR REPLYS..!!!
THANKS..!!
I've got a stop(); action in frame 1 of the intro because I want to
make sure its totally loaded before I do anything with it.
Then, once I am sure it is totally loaded, I tell _level20 ( intro.swf )
to start playing. It will go to another holding stop frame on its timeline.
Then we start loading the main site ( site.swf ) into _level0.
From the main site ( site.swf ) I tell _level20 ( intro.swf ) to gotoAndPlay it's movie.
Here is the actionscript from the first embedded swf that starts it all.
(This works when played in the player, but not in the htm pg - the problem)
Its a 4 frame movie named - BASELINE.SWF
____________________________________________
FRAME 1
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
// stop();
trace("BASELINE - frame 1");
____________________________________________
FRAME 2
loadMovie("intro.swf", "_level20");
trace("BASELINE - now at frame 2 LOAD intro.swf into _level20");
____________________________________________
FRAME 3
stop();
// _level20._visible = 0;
total_bytesLevel = _level20.getBytesTotal();
loaded_bytes = _level20.getBytesLoaded();
percentLevel = int((loaded_bytes/total_bytesLevel)*100);
//
// percentBox = percentLevel+"%";
// loading = int(_level20.getBytesLoaded())+" of "+int(_level20.getBytesTotal()/1024)+"Kb";
// loading = int(_level20.getBytesLoaded()/1024)+" of "+int(_level20.getBytesTotal()/1024)+"Kb loaded";
// bytesBox = loading;
// bar._xscale = percentLevel;
if (percentLevel == 100) {
this.nextFrame();
_level20.gotoAndPlay("intro_begin");
}
trace("BASELINE - frame 3. _level 20 visible = 0 CHECKING _level20 bytes loader");
____________________________________________
FRAME 4
stop();
// _level20._visible = 1;
loadMovie("site.swf", _level0);
trace("BASELINE - frame 4. LOADING SITE NOW - into _level0");
trace("BASELINE - frame 4. _level0 SITE will start contentFunction");
_____________________________________________
// END OF SWF
Thanks for your help and suggestions..!!!
aistudios webforumsuser@macromedia.com Guest
-
load external text to dynamic text field in levels
Dear Sir I found the Tech Noe Index #16238 is useful in creating dynamically loaded text from external text file. However, the method mentioned... -
Projector.exe not working 8 levels from root
Hi, I got a strange problem. I have an Projector.exe wich fails to execute. I get a Director Player Error: Unable to load movie playlist. Does the... -
what are the pros and cons of using MC's to load .swf files or levels?
what are the pros and cons of using MC's to load .swf files or levels? I have done a site which in some instances uses MC's to load external .swf and... -
Load and unload movie levels not working
Hi everyone. (Iam a newbie) I would appreciate if anyone could help with this. I am trying to replace one movie with another which contains... -
Testing in browser SWFs not loading into levels
Hi, everyone...... I'm working on a project for the company that I'm working with and I'm doing my (gulp) very first Flash project. They sent me... -
_posted.by\(Vern\); #2
Re: PLEASE HELP - load into levels, not working in browser
>>Then we start loading the main site ( site.swf ) into _level0.<<
AH HA!! Once you load something different into _level0, you just UNLOADED
everything else. Leave _level0 alone and see how it works out.
Regards,
--Vern
_posted.by\(Vern\); Guest
-
aistudios webforumsuser@macromedia.com #3
Re: PLEASE HELP - load into levels, not working in browser
Hi... just got your replies... Tues at 11:30am
I think you guys have figured it out..!!!!!
So... just to make sure. Anything that _level0 does, such as loading a swf into another level,
basically gets erased... thrown away... canceled... voided...
if it's replaced by loading another movie into itself. ie: loadMovie(site.swf, "_level0");
Correct..??
So... If I want to make sure intro.swf is fully loaded in _level20
prior to starting the loading for site.swf.... would this be a way to
make sure this happens..??
THE FIRST SWF EMBEDDED IN - inner__jan1304.htm
baseline.swf
baseline.swf loads intro.swf into _level20.
loadMovie(intro.swf, "_level20");
It has a looping frame action of some sort
checking if _level20 is fully loaded.
if _level20 is 100% loaded -
(intro.swf has a couple of stop actions, so as to stop again and not play even though it is fully loaded)
(the second stop action having a FRAME LABEL NAMED - intro_begin )
- it goes to the next frame (we are still in baseline.swf )
which loads site.swf into _level0.
loadMovie(site.swf, "_level0);
Now with site.swf at _level0, I place another action to
loadMovie(intro.swf, "_level20");
Hopefully, since intro.swf was previously loaded with baseline.swf, it would still be in cache, thus loading immediately.
__________________________________
QUESTION
??? Does baseline.swf being replaced with site.swf make calling intro.swf again force site.swf to have to going back up to the server... thus, ruining what I am trying to do here??? - Does this question make sense..??
__________________________________
(continuing)
Unknown to the user, site.swf (now at _level0) is continuing to load itself - (baseline.swf told site.swf to start loading into _level0 after it made sure that intro.swf was fully loaded in _level20) -
as intro.swf (at _level20) is playing it's movie. (this is happening because site.swf told intro.swf, to begin playing...)
_level20.gotoAndPlay("intro_begin");
________________________________
The main question here now, if this does in fact work, is the question from above about cache and calling the same swf to load twice from two different swfs.
THE SAME QUESTION FROM ABOVE:
??? Does baseline.swf being replaced with site.swf make calling intro.swf again force site.swf to have to going back up to the server... thus, ruining what I am trying to do here??? - Does this question make sense..??
_________________________________
QUESTION -
There is probably a smoother way to accomplish what I am trying to do, but I think this may work.
What do you think..??? Any suggestions on a more efficient, cleaner way to accomplish what I am trying to do..??
______________________________
Thanks for your time... I appreciate everyone's input..!!
aistudios webforumsuser@macromedia.com Guest
-
_posted.by\(Vern\); #4
Re: PLEASE HELP - load into levels, not working in browser
To be hones with you, this is confusing. Nothing against YOU! I get
confused when doing things like this myself! I just never had to try and
undertand someone ELSES setup! ANYway ...
loadMovie(site.swf, "_level0");> basically gets erased... thrown away... canceled... voided...
> if it's replaced by loading another movie into itself. ie:YES!>
> Correct..??
even though it is fully loaded)> So... If I want to make sure intro.swf is fully loaded in _level20
> prior to starting the loading for site.swf.... would this be a way to
> make sure this happens..??
> THE FIRST SWF EMBEDDED IN - inner__jan1304.htm
> baseline.swf
>
> baseline.swf loads intro.swf into _level20.
> loadMovie(intro.swf, "_level20");
> It has a looping frame action of some sort
> checking if _level20 is fully loaded.
>
> if _level20 is 100% loaded -
> (intro.swf has a couple of stop actions, so as to stop again and not play> (the second stop action having a FRAME LABEL NAMED - intro_begin )
>
> - it goes to the next frame (we are still in baseline.swf )
> which loads site.swf into _level0.
> loadMovie(site.swf, "_level0);
===============================
HERE is where a problem lies. You have to leave _level0 alone once you
start this process. It seems that you are just trying to get the swf
uploaded to the users machine, then tossing out everything and starting over
again from scratch. Which, frankly, doesn't make sense to me. Do you know
that you can leave any movie on any level parked and blank just sitting
there? No need to unload, replace it, if you dont need or want to. Simply
have the movie stop on a completely empty frame, and it will be there,
waiting for a command, but it will be invisible and functionless until you
tell it to do something. SO... If it were me, I would rethink my strategy
and use different levels, and leave _level0 alone, leaving your initial
movie there and parked on an empty frame, thus being completly invisible.
Does that make sense?
===============================
would still be in cache, thus loading immediately.> Now with site.swf at _level0, I place another action to
> loadMovie(intro.swf, "_level20");
> Hopefully, since intro.swf was previously loaded with baseline.swf, itagain force site.swf to have to going back up to the server... thus,> __________________________________
> QUESTION
> ??? Does baseline.swf being replaced with site.swf make calling intro.swf
ruining what I am trying to do here??? - Does this question make sense..??That would depend on the users machine settings, but for the most part, I> __________________________________
would have to say no, it would not have to reload.
itself - (baseline.swf told site.swf to start loading into _level0 after it>
> (continuing)
> Unknown to the user, site.swf (now at _level0) is continuing to load
made sure that intro.swf was fully loaded in _level20) -because site.swf told intro.swf, to begin playing...)>
> as intro.swf (at _level20) is playing it's movie. (this is happeningfrom above about cache and calling the same swf to load twice from two> _level20.gotoAndPlay("intro_begin");
>
>
>
> ________________________________
>
> The main question here now, if this does in fact work, is the question
different swfs.again force site.swf to have to going back up to the server... thus,>
>
> THE SAME QUESTION FROM ABOVE:
> ??? Does baseline.swf being replaced with site.swf make calling intro.swf
ruining what I am trying to do here??? - Does this question make sense..??I think this may work.>
> _________________________________
>
> QUESTION -
> There is probably a smoother way to accomplish what I am trying to do, butto accomplish what I am trying to do..??_____________> What do you think..??? Any suggestions on a more efficient, cleaner way>
> Thanks for your time... I appreciate everyone's input..!!
As I said earlier, I would rethink my strategy. It seems to me that you are
complicating it alot more than it needs to be.
I usually use a movie I call "init.swf" that the html page calls, so it is
loaded into _level0 by default.
That movie then calls my preloader movie, but before it does, it assigns a
value to a variable I call "request". For example, request = "intro";
The preloader movie loads and calls the next movie to load into _level5 by
using that variable and adding an ".swf" into it. like this:
loadMovieNum(request + ".swf", 5);
From now on, my preloader is responsible for loading any movie that is
requested into _level5. This way, with any button anywhere, I can change
the value of my variable named "request" then command my preloaded to play
again, and it will load a different movie. Make any sense? The preloader
is ALWAYS there, sitting on an empty frame, waiting for a command. No need
to unload it.
You can make this system as complex as you want - using frames (graphics
frames, not html frames), backgrounds, seperate levels for a menu whatever,
but you dont have to unload them ever it you are going to need them again.
In my case, the examples would be for loading different modules (like html
pages) into _level5, and that of course removed the existing movie. But, as
you asked, those movies are indeed in cashe, and come up instantly should
the user revisit a "page" he has already seen.
So if I grasp your setup, leave baseline.swf there on _level0 and load
site.swf into another _level. Seems to me it would simplfy things.
I think I will stop now, not knowing if I have helped or clouded the issue
further.
Regards,
--Vern
_posted.by\(Vern\); Guest



Reply With Quote

