all groups > flash actionscript > november 2007 >
You're in the

flash actionscript

group:

Flash Project not playing when users go to site


Flash Project not playing when users go to site em_shomer
2/28/2007 12:00:00 AM
flash actionscript:
Alright heres my problem. I have a large flash website, that was originally a
template and I added to it. I have been able to upload it to my server, but
there is at least several minutes wait time before the preloader came up. So
in an effort to fix this I created a Master file with 10 frames total. on the
first keyframe I have "Loading Site" in plain letters. I have the actionscript
on keyframe 1 and I have the main movie(masterP.swf) loading into level 20,
preloader.swf loading into level 50 and trigger.swf loading into level 5.
[b]here is the actionscript on frame 1:[/b]
stop();
//-----------------------<MCL>------------------------\\
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

myMCL.addListener(myListener);

myListener.onLoadProgress = function(target_mc:MovieClip,
loadedBytes:Number,totalBytes:Number) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes / totalBytes) *100);
_level50.preloader.gotoAndStop(preloadPercent);
_level50.preloadInfo1.text = preloadPercent + " % loaded";
_level50.preloadInfo2.text = Math.round(loadedBytes/1000) + " k loaded / " +
Math.round(totalBytes/1000) + " k total";
}

myListener.onLoadComplete = function(target_mc:MovieClip) {
_level50._visible = false;
}
//-------------------</MCL>---------------------------\\
//triggers the MCL to load these assets
myMCL.loadClip("trigger.swf", 5);
myMCL.loadClip("preloader.swf", 50);

[b]here is the actionscript on frame 10:[/b]

stop();
myMCL.loadClip("masterP.swf", 20);

The biggest issue is when the user goes to that website it almost seems as
though the movie is sitting on Frame 1"loading Site" and doesnt even reach the
preloader, then when i hit the back button and go foward the preloader is
there, just looping in place not really loading. oh yeah I have two dynamic
fields on the preloader, and it is supposed to have loading info in them, but
they do not even show up. Not sure what I should do. I am uploading with
Dreamweaver MX, I am using Flash 8, the original file was flashmx I believe.



stop();
//-----------------------<MCL>------------------------\\
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

myMCL.addListener(myListener);

myListener.onLoadProgress = function(target_mc:MovieClip,
loadedBytes:Number,totalBytes:Number) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes / totalBytes) *100);
_level50.preloader.gotoAndStop(preloadPercent);
_level50.preloadInfo1.text = preloadPercent + " % loaded";
_level50.preloadInfo2.text = Math.round(loadedBytes/1000) + " k loaded / " +
Math.round(totalBytes/1000) + " k total";
}

myListener.onLoadComplete = function(target_mc:MovieClip) {
_level50._visible = false;
}
//-------------------</MCL>---------------------------\\
//triggers the MCL to load these assets
myMCL.loadClip("trigger.swf", 5);
myMCL.loadClip("preloader.swf", 50);
Re: Flash Project not playing when users go to site kglad
2/28/2007 4:45:54 PM
how would that swf even get to frame 10? and that entire setup is probably an
issue. why do you have to preload your preloader?

that may be an issue for users to watch the load progress of something that
turns out to be a preloader for something else with the thought that the
something else may just be another preloader so they can wait longer.
Re: Flash Project not playing when users go to site em_shomer
2/28/2007 5:12:47 PM
Re: Flash Project not playing when users go to site kglad
2/28/2007 5:15:33 PM
i can see you're loading into _levels. but that doesn't change the issue:
your swf is never going to reach frame 10 and execute:

myMCL.loadClip("masterP.swf", 20);

how large is your preloader.swf? and what's the point of trigger.swf and how
large is it?
Re: Flash Project not playing when users go to site em_shomer
2/28/2007 6:38:20 PM
trigger.swf is small there is nothing there besides a couple elements from the
shared library, that are not on my timeline but never the less have to
load(fonts) it loads at _level 0
preloader is 12KB
my main swf is 5529KB

btw...why wouldnt it reach frame 10( because it dosent on the server but it
does when i stimulate download everything works)
Re: Flash Project not playing when users go to site em_shomer
2/28/2007 7:23:12 PM
ok I think I fixed the problem, but i dont know how, but now I have a new
problem and I need your help on this one, the preloader comes right up and at
about 45% I get an error message: "A script in this movie is causing Adobe
Flash Player 9 to run slowly. If it continues to run your computer may become
unresponsive. Do You want to Abort?" Also the site loads around this time, it
is loaded correctly because when i click on the buttons they go to wrong frame
labels, though once the loading is done they go to the correct one. Any idea of
what I need to do for this


Re: Flash Project not playing when users go to site kglad
2/28/2007 7:30:54 PM
your _level0 swf won't go to its frame 10 because there's not code (shown) that
will cause it to move from frame1.

the code you showed would not cause a time-out error. you must have changed
something in your code.
RE: Flash Project not playing when users go to site Nick
11/8/2007 5:04:06 PM
I'm having the same problem you were having initially.
How did you solve the problem?
Can I see the final actionscript??

by the way - "trigger.swf" has actionscript to make "master.swf" beging playing once it's loaded. that's how it's supposed to get to frame 10.

Help soon please!

From http://www.google.com/search?hl=en&safe=off&client=safari&rls=en&q="trigger.swf"+"preloader.swf"+looping&btnG=Search

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button