Main + External Preloader In Flash Mx 2004
im using mx2004, so im sure its actionscript 2.0 and as far when it comes to actionscripting im a noob. i can manage the basic things. and thats about it.
I need help with a preloader,(actionscript 2.0, a possible listner) it has to be able to preload scene 1& 2 timelines and external SWF´s. all in one preloader at keyframe 1 .
this is my preloader atm, and yes i know it soxxs ass.
-- frame 1 (actions) -- bytes_loaded = Math.round(_root.getBytesLoaded()); bytes_total = Math.round(_root.getBytesTotal()); getPercent = bytes_loaded/bytes_total; _root.loadBar._width = getPercent*100; _root.loadText = Math.round(getPercent*100)+"%"; if (bytes_loaded == bytes_total) { _root.gotoAndStop(3); }
frame 2 loading bar etc.
frame 3 i just have a movieclip that contains the hole movie. inside´that clip i have my "loadMovie" commands.
so what i need help with is a new pro preloader
/www.statnone.com peter schön
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-25-2004, 03:41 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[Flash 8] External Preloader For Main .swf
Hi all,
I just started working with Flash and I'm making my first website www.mayrapicache.com.
I've been reading how to make a preloader on this forum and through other sources, but I can't seem to get mine to work. I tried to make one in my main movie but it seems to start showing when the whole file is already loaded. So I decided I'd try to make a separate loader.swf to display 'Loading..' while the whole website (homepage2.swf - 2.5MB) is loaded into that.
Is there any way one of you could tell me how to structure the loader.swf and provide me with a simple actionscript code for it that loads the homepage2.swf?
Help would be greatly appreciated!
[CS3 AS2] External SWF's And Main Preloader...
How would I go about loading external swf files using one preloader in the main movie so they get cached?...
For Instance….
...loader appears “loading index…”, then as soon as it finished loading the main movie, it then looks at the external files and loads them… “loading 1 of 6, then 2 of 6 and so on…”,
Normally I put preloaders in each external swf file, which then once they need to be activated, the preloader will show and it will load that specific swf, but I came accross afew websites where All external Swf files load before anything occurs, this way, when the user clicks a button for example, they don’t need to go through the loading process again.
Would be interesting to find this out.. Hope you can help.!
Thanks!
External Preloader For Main Menu
Hello:
I need to know on how to make an external preloader that loads the main menu swf. Thanks in advance for anyone who helps
Include External Swf's Into The Main Preloader
OK, I have a couple of external swf's which are loaded into level2.
These have a couple of problems displaying properly on slower connections after loading (which I know why, and can't be worked around)
Instead, this can be solved if I preload all these swf's to begin with - so that there is no waiting, and no display problems later.
So... how do I include these swf's in the preloader of the main movie?
Currently - the preloader reads as such:
Language = "English";
if (_framesloaded>=_totalframes) {
gotoAndStop("English", 1);
}
Preloader Conflict Between Main And External .swf?
Hello,
I've searched the archives for the answer to this particular question, but didn't find anything. Here's my situation:
I have a main.swf file that has its own preloader w/ progress bar. After everything loads, the navigation items appear. ONE of the navigation items loads an external.swf into its own level (as it's a byte-heavy section). The external.swf has its own preloader embedded in it, and loads fine. Both the main.swf and external.swf preloaders read the same way:
ActionScript Code:
myInterval = setInterval(preloader, 10);
function preloader() {
if (getBytesLoaded() >= getBytesTotal()) {
play();
clearInterval(myInterval)
}
bar._xscale = (getBytesLoaded()/getBytesTotal())*100;
// myTextField.text = Math.round(getBytesLoaded()/getBytesTotal()*100)+ "%"
}
HOWEVER, while testing this, if I click on any of the other navigation items WHILE THE EXTERNAL PRELOADER IS STILL VISIBLY LOADING, the main movie starts playing at the beginning (at preloader) and keeps looping back to this after several frames.
(By the way, clicking on any other navigation item unloads the movie from the level.)
I've tried loading the external.swf into a movie clip (instead of a level), and still no difference. I've determined that it might be a preloader conflict, because when I take out the preloader from the external.swf and test it, the above problem doesn't happen.
Any thoughts?
ONE Preloader In Main Swf For SEVERAL External Swfs
hi everyone.
I need a preloader.. that exists in the timeline of a certain main movie that is already loaded.
I want this preloader to be used for loading several external swfs (these swfs do not have a preloader of their own.. )... so I don't have to put the preloader in each external file loaded.
-------------
I am using now a preloader from kirupa thas is very simple.. uses a mc that contains just a text box. the actions are :
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded == bytes) {
gotoAndPlay(2);
this.kirupatxt = "movie loaded";
} else {
gotoAndStop(1);
this.kirupatxt = "loading (" + parseInt(bytes_loaded/1024) + "/" + parseInt(bytes/1024) +" ) ";
}
}
if this helps..
thanks
PS: I would kill for a made example.. !! tell me what actions for the button.. what actions for whatever moviclipe there is there.. everything
Preloader In Main Leads To External? Possible?
HI everyone!
Im working on some external swf files with sound in it, they include preloaders.
I have a theoretical question. Is it possible to crete a preloader which will be in the main movie, and will lead to external ones? (i would assume levels)
File Im working now has 3 swfs with own preloaders, there is a small issue, it occures only when downloading one track, user click other button.
I'm thinking that going "around" that problem could be puting all tracks in 1 external with one preloader, but that would take longer time to hear any music...or on timeline with 1 ppreloader do labels so on each click sound will download own "label"... does it make any sense?
Where i could read about subject options? Thanks!
Preloader For All External Swf's Plus Main Timeline?
I haven't been able to find anything that does a really good job of getting the combined total bytes and the combined loaded bytes of my flash movie along with all the external swf's that I'd like to load.
Where can I find a good script or sample movie that accomplishes this?
Ideally, I'd like have some clipLoader movie clip that I can put in the first frame of my main timeline, have it load everything up with a progress bar and go onto play the next frame when it's done.
I have 4 external swf's that I'd like to preload:
swf_1.swf, swf_2.swf, swf_3.swf, swf_4.swf
I have a movie clip (clipLoader_mc) that I've placed on the first frame of my main timeline.
On the first frame of the clipLoader_mc:
Code:
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
var clipInstance_array = new Array();
externalSWFs = new Array("swf_1.swf","swf_2.swf","swf_3.swf","swf_4.swf")
externalSPath = "swf_import/"
// load all your movies up onto different movie clips
loadAllClips = function () {
for(var i=0; i<externalSWFs.length; i++) {
//create empty clips
clipInstance_array.push("clip_"+i);
this.createEmptyMovieClip(clipInstance_array[i], this.getNextHighestDepth());
//load the clips up
my_mc.loadClip(externalSPath + externalSWFs[i], clipInstance_array[i]);
trace(externalSPath + externalSWFs[i]);
//setProperty(clipInstance_array[i],_alpha,0);
//clips_array[i].getBytesTotal;
}
};
loadAllClips();
This loads everything up nicely, but not sure where to go from here.
Any links or help would be much appreciated.
This is a good link, but there's a lot of extraneous functionality that I'm not sure how to cut out:
http://flash-creations.com/notes/dynamic_loadjpg.php
This link works well, but the bytes are traces and I don't know how to add it together and get it to display properly in my flash.
http://www.tek-tips.com/viewthread.c...1271807&page=7
Thanks
ONE Preloader In Main Swf For SEVERAL External Swfs
hi everyone.
I need a preloader.. that exists in the timeline of a certain main movie that is already loaded.
I want this preloader to be used for loading several external swfs (these swfs do not have a preloader of their own.. )... so I don't have to put the preloader in each external file loaded.
-------------
I am using now a preloader from kirupa thas is very simple.. uses a mc that contains just a text box. the actions are :
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded == bytes) {
gotoAndPlay(2);
this.kirupatxt = "movie loaded";
} else {
gotoAndStop(1);
this.kirupatxt = "loading (" + parseInt(bytes_loaded/1024) + "/" + parseInt(bytes/1024) +" ) ";
}
}
if this helps..
thanks
PS: I would kill for a made example.. !! tell me what actions for the button.. what actions for whatever moviclipe there is there.. everything
Preloader On An External .swf Being Loaded Into The Main Movie
when an external swf is loaded into another one, the preloader on the movie being loaded does not work. how would i make a preloader to show the progress of the movie that is being loaded into the main one? would the preloader have to go on the main flash, or on the swf being loaded?
[CS3] [AS2] Preload ALL External Content In Main Preloader...
Good afternoon, I hope everyone's having a good Sunday...
I've been struggling with this one for a while and despite intense Googling, haven't found anything but unanswered versions of the same question, so I thought I'd ask you guys...
I have a Flash project (CS3 & AS2) that was never intended to go on the net, but I now want to add to my personal portfolio online. It is one main movie that contains the navigation and a whole load of small SWF's that load into the levels above it using "loadMovieNum."
My problem is, is that it is crucial for all these external SWF's to be preloaded when you enter the site, in the main preloader of the main movie. This would mean they would all load instantly when called upon, instead of waiting for an individual preloader on each file.
I've tried combining all the SWF's into one file, which is implausible, and even bodging (with my limited AS skills) a preloader that loads all the movies in the first frame onto their various levels... which doesn't work.
I'm sure this must be a pretty common question and it seems like something that might be either really straight forward, or completely impossible, but any help anyone can offer would be greatly appreciated.
Take it easy,
Kristian
One Main Preloader For Multiple External .swfs
One main preloader for multiple external .swfs
I realize this subject has been covered in numerous ways, but being a newbie to AS hasn't helped my cause as I've scoured the searches for the last two days. I've tried to approach this from several angles, employing several of the tutorials, attachments found in various threads, etc, and nothing has worked. So, please bear me as I ask yet another question regarding this subject.
I need to preload 2 external .swfs, one containing animation and one containing sound, and I need them to start playing at the same time. As of now I have a general preloader on the main timeline, but as you might expect, after the preloader finishes, there is a lag while the .swf's are being loaded. I had someone help me with this and I thought everything was solved, until a friend of mine looked at it in dial-up, and the preloader just kept looping 10 times before the animation started, so now I'm starting over. Part of my complication I believe is that I'm using loadMovieNum into levels as opposed to loading the external .swf's in a separate container MC (that's what I've noticed most people recommend for this problem), but I tried doing that technique several times with no luck. Right now my main movie, index.fla, has a preloader MC in the first frame, with this AS attached to the clip:
ActionScript Code:
onClipEvent (enterFrame) {loading = _parent.getBytesLoaded();total = _parent.getBytesTotal();percent -= (percent-((loading/total)*100))*.25;per = int(percent);percentage = per+"%";loadBar._width = per*2;if (percent>99) {_parent.gotoAndStop(2);}}
The clip contains a loadbar, static text (which just says 'Loading'), dynamic text (which tells the percentage), and a 'stop' in the actions layer. In the actions layer within my main movie, there is a 'stop' on the first frame as well. On the second frame, there is this AS:
ActionScript Code:
var audioOn = false;loadMovieNum("musicfile.swf", 1);loadMovieNum("1movie.swf", 2);stop();
In order that the animation and music starts at the same time, within my animation .swf (1movie.swf), I have this AS on the first frame of the actions layer:
ActionScript Code:
if (_level0.audioOn == true) {gotoAndPlay(2);}
Within my musicfile.swf, there is this AS on the second frame of the mp3:
ActionScript Code:
_level0.audioOn = true;
My main objective is to be able to use my preloader to preload both of these .swf's concurrently in my main movie so that they may start at the same time. I hope my descriptions are clear. Any help would be appreciated.
[CS3] [AS2] Preload ALL External Content In Main Preloader...
Good afternoon, I hope everyone's having a good Monday...
I've been struggling with this one for a while and despite intense Googling, haven't found anything but unanswered versions of the same question, so I thought I'd ask you guys...
I have a Flash project (CS3 & AS2) that was never intended to go on the net, but I now want to add to my personal portfolio online. It is one main movie that contains the navigation and a whole load of small SWF's that load into the levels above it using "loadMovieNum."
My problem is, is that it is crucial for all these external SWF's to be preloaded when you enter the site, in the main preloader of the main movie. This would mean they would all load instantly when called upon, instead of waiting for an individual preloader on each file.
I've tried combining all the SWF's into one file, which is implausible, and even bodging (with my limited AS skills) a preloader that loads all the movies in the first frame onto their various levels... which doesn't work.
I'm sure this must be a pretty common question and it seems like something that might be either really straight forward, or completely impossible, but any help anyone can offer would be greatly appreciated.
Take it easy,
Kristian
One Main Preloader For Multiple External .swfs
One main preloader for multiple external .swfs
I realize this subject has been covered in numerous ways, but being a newbie to AS hasn't helped my cause as I've scoured the searches for the last two days. I've tried to approach this from several angles, employing several of the tutorials, attachments found in various threads, etc, and nothing has worked. So, please bear me as I ask yet another question regarding this subject.
I need to preload 2 external .swfs, one containing animation and one containing sound, and I need them to start playing at the same time. As of now I have a general preloader on the main timeline, but as you might expect, after the preloader finishes, there is a lag while the .swf's are being loaded. I had someone help me with this and I thought everything was solved, until a friend of mine looked at it in dial-up, and the preloader just kept looping 10 times before the animation started, so now I'm starting over. Part of my complication I believe is that I'm using loadMovieNum into levels as opposed to loading the external .swf's in a separate container MC (that's what I've noticed most people recommend for this problem), but I tried doing that technique several times with no luck. Right now my main movie, index.fla, has a preloader MC in the first frame, with this AS attached to the clip:
ActionScript Code:
onClipEvent (enterFrame) {loading = _parent.getBytesLoaded();total = _parent.getBytesTotal();percent -= (percent-((loading/total)*100))*.25;per = int(percent);percentage = per+"%";loadBar._width = per*2;if (percent>99) {_parent.gotoAndStop(2);}}
The clip contains a loadbar, static text (which just says 'Loading'), dynamic text (which tells the percentage), and a 'stop' in the actions layer. In the actions layer within my main movie, there is a 'stop' on the first frame as well. On the second frame, there is this AS:
ActionScript Code:
var audioOn = false;loadMovieNum("musicfile.swf", 1);loadMovieNum("1movie.swf", 2);stop();
In order that the animation and music starts at the same time, within my animation .swf (1movie.swf), I have this AS on the first frame of the actions layer:
ActionScript Code:
if (_level0.audioOn == true) {gotoAndPlay(2);}
Within my musicfile.swf, there is this AS on the second frame of the mp3:
ActionScript Code:
_level0.audioOn = true;
My main objective is to be able to use my preloader to preload both of these .swf's concurrently in my main movie so that they may start at the same time. I hope my descriptions are clear. Any help would be appreciated.
Main Flash Loading External Swf Then Back To Main
SOLVED
Heres a rather complicated situation I am in.
I put together an after effect file and exported it as an swf. Work perfectly. There is no FLA
In my flash file, frame 1 is a preloader. Frame 2 is an Action script that says
loadMovieNum("page1.swf", 1);
And voila, the movie start to play.
Problem is, it doesn't go back to the main on frame 3.
Solution-
Using sorenson squeeze theres an option to load/unload movies that you compress into swfs. There was a stop at the end of my movie with no fla file.
Preloader To Also Preload External F4v Files In Main Movie?
n00b alert... I did search the forum (and several others online), but either the code got too complicated for me to even attempt to adjust it, or I didn't find a relevant answer.
So I really hope someone here can help me out.
I've found a preloader code online that works like a charm. I don't really know what half of it actually means/does, but it preloads and then plays the mainfile.swf . Me happy.
But the "mainfile.swf" calls external f4v files, and the problem is that they do not get preloaded. (And that kinda was why I needed a preloader in the first place...)
I gave all the f4v files instance names within the mainfile (assume: video01.f4v, video02.f4v etc), and the f4v files themselves are in the same folder as the mainfile.swf.
What do I need to add to the code to get it to preload everything?
Thanks in advance!!
ActionScript Code of my preloader is attached.
Attach Code
var l:Loader = new Loader(); l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop); l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("mainfile.swf"));
function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString() + "%";
}
function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}
External Preloader That Opens Main-movie In Html-frame
Howdy scripters!
My site starts loading showing the PRELOADER. It should be shown in a 1-frame browser-window (standard window that is...). Once the MAIN-movie has loaded it should be shown in the middle frame of a 3-frame-browser-window.
Follow me?
=My guess is that it could be done something like this=
Use two .swf:s. The first one is the PRELOADER and the second is the MAIN-movie. Once the PRELOADER has loaded MAIN, MAIN should be shown in another browser-window containing frames. At the same time, the window containing the PRELOADER should be closed. This would give the impression of that the preloader switched from 1-frame-window to a 3-frame-window.
QUESTION: can an external preloader open the loaded file in a new html-document? some nice javascript?
QUESTION 2: do you have any alternative strategies for solving my problems?
All help is MUCH appreciated!!!
THANKS!!
Why Doesn't My External Preloader Work In MX 2004 (look At Code0?¿¿¿
-----------This code is on the empty MC container.
onClipEvent (load) {
loading = true;
}
onClipEvent (enterFrame) {
if (loading) {
if (this.getBytesTotal()>_root.baseSize) {
percent = this.getBytesLoaded()/this.getBytesTotal()*100;
trace (percent);
_root.loadingBar.bar._xscale = percent;
if (percent == 100) {
loading = false;
_root.loadingBar._visible = false;
this.nextFrame();
}
}
}
}
--------------this is the code on the button
on (press) {
container.loadMovie("flash.swf");
_root.loadingBar.bar._xscale = 0;
_root.loadingBar._visible = true;
}
------------this is the code on the load bar
onClipEvent (load) {
this._xscale = 0;
}
-----------------------------------------------
here is a link to my file
link
Thanks, Montara
Conflict Between Main Preloader And Load Movies Inside The Main.
Greetings.
I am able to make preloaders for my individual .swf files and have them loadmovie into target into my main movie, however if I also want to preload my main movie (the parent that contains all the swf files) I get conflict. Essentially I want to preload the main movie, once there the viewer upon clicking certain buttons can view other swf movies each of which have there own preloader. It appears that the preloaders I have tried are "either one or the other" choice i.e. preload main or preload the swf files inside main.
I am sure it's in the coding....anyone have a preloader or a tut' for preload main (with % be nice) and then still able to have preloaded swf inside.
Thanks!
Main Mc Loads External Swf, Then Main Swf Buttons Stop Working
I have a portfolio site that I am building. The main site swf has a navigation menu, and a empty movieclip. Each of the buttons on the menu calls up an external swf to load into the main empty mc. When you click on 'home', the 'home' swf loads.. when you click on 'about', the 'about swf loads, I can switch between them, no problem.
This is where my problem comes in... I just created another external swf that has a gallery in it. The gallery consists of thumbnails and a larger image that are calling from an XML file. When this swf loads into the main mc, everything is fine. But then, the buttons on the main swf menu stop working! The buttons all work going between one another, except when you load the gallery and then you can't go anywhere else. Help!
let me know what code you need, if any. MUCH APPRECIATED in advance :)
example of whats happening:
http://christinevanetten.com/index2.html
Edited: 04/18/2008 at 08:30:55 AM by christineski
Including External Swf File With Preloader In Main Swf File
I'm creating a flash 3d website for a company. The idea is that there is one overall swf file - this holds the navigation and design. Once the user clicks on a button, it goes to frame 10, I have included the following script to load a swf file
loadMovie("deepbartesting.swf", maincontent);
this.onEnterFrame=function(){
if(movieClipName._currentframe==5){
movieClipName.stop();
delete this.onEnterFrame;
}
}
my problem is that this file is around 3mb. I created a preloader with it, with the code
onClipEvent (load) {
total = _root.getBytesTotal();
} onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
percen101 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
;
;
}
}
the preloader works, but instead of going to frame 2 of that swf file, it goes to frame 2 of the overall swf that holds the navigation. Does anyone know how to get around this so that it goes to frame 2 in the same swf file as the preloader?
Thanks for your help
Including External Swf File With Preloader In Main Swf File
I'm creating a flash 3d website for a company. The idea is that there is one overall swf file - this holds the navigation and design. Once the user clicks on a button, it goes to frame 10, I have included the following script to load a swf file
loadMovie("deepbartesting.swf", maincontent);
this.onEnterFrame=function(){
if(movieClipName._currentframe==5){
movieClipName.stop();
delete this.onEnterFrame;
}
}
my problem is that this file is around 3mb. I created a preloader with it, with the code
onClipEvent (load) {
total = _root.getBytesTotal();
} onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
percen101 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
;
;
}
}
the preloader works, but instead of going to frame 2 of that swf file, it goes to frame 2 of the overall swf that holds the navigation. Does anyone know how to get around this so that it goes to frame 2 in the same swf file as the preloader?
Thanks for your help
Including External Swf File With Preloader In Main Swf File
I'm creating a flash 3d website for a company. The idea is that there is one overall swf file - this holds the navigation and design. Once the user clicks on a button, it goes to frame 10, I have included the following script to load a swf file
loadMovie("deepbartesting.swf", maincontent);
this.onEnterFrame=function(){
if(movieClipName._currentframe==5){
movieClipName.stop();
delete this.onEnterFrame;
}
}
my problem is that this file is around 3mb. I created a preloader with it, with the code
onClipEvent (load) {
total = _root.getBytesTotal();
} onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
percen101 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
;
;
}
}
the preloader works, but instead of going to frame 2 of that swf file, it goes to frame 2 of the overall swf that holds the navigation. Does anyone know how to get around this so that it goes to frame 2 in the same swf file as the preloader?
Thanks for your help
Including External Swf File With Preloader In Main Swf File
I'm creating a flash 3d website for a company. The idea is that there is one overall swf file - this holds the navigation and design. Once the user clicks on a button, it goes to frame 10, I have included the following script to load a swf file
loadMovie("deepbartesting.swf", maincontent);
this.onEnterFrame=function(){
if(movieClipName._currentframe==5){
movieClipName.stop();
delete this.onEnterFrame;
}
}
my problem is that this file is around 3mb. I created a preloader with it, with the code
onClipEvent (load) {
total = _root.getBytesTotal();
} onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
percen101 = ""+percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
;
;
}
}
the preloader works, but instead of going to frame 2 of that swf file, it goes to frame 2 of the overall swf that holds the navigation. Does anyone know how to get around this so that it goes to frame 2 in the same swf file as the preloader?
Thanks for your help
Preloader In Flash MX 2004 Pro
I have a preloader with this action script:
onClipEvent (enterFrame) {
loading = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per;
if (percent>99) {
_parent.gotoAndPlay(2);
}
}
also in an "actions" layer for frame 1 & 2 I have stop();
the main script is attached to a MC with a MC inside named loadBar and a dynamic text box with the var percentage. upon playing the movie, the text box displays: 0% and the bar remains at 1 pixel width.
I used to have Flash MX and it worked fine. then I upgraded to 2004 pro and the script won't do anything. It doesn't give any errors, it just sits there.
Is the code different with pro, or am i just being stupid and overlooking something simple?
Preloader For Flash MX 2004
Hello,
for some reason my old preloader stopped working in flash 2004 players...
the following code is now failing to send the loader MC to the right frame number. the preloader it self works.
(i'm sorry, but i'm new and can't find the tags for inserting code...)
_______________________________________
loadedBytes = getBytesLoaded();
totalBytes = getBytesTotal();
loadedKBytes = Math.ceil(loadedBytes/1000);
totalKBytes = Math.ceil(totalBytes/1000);
if (loadedBytes == totalBytes) {
gotoAndPlay("Scene 1", "go");
}
frame = int(loadedbytes/(totalbytes/100));
_root.loader.gotoAndStop(_root.frame);
___________________________________________
I hope someone will help, inspite of this presentation...
Flash 2004 Preloader
I am having trouble getting my preloader to function properly. I created a flash website with a main file for the interface that loads in other external swf files as you navigate the site. I am using flash cs3 and the older actionscripts 1.0 and 2.0 for the code. So far I have created a movie clip with the instance name preloader_mc and the name of the movie clip itself is just preloader. Within the movie clip I have a bar drawn out and a mask that covers it in the layer above. As the movie clip animates the mask layer is moved and the bar is revealed. Also I created a dynamic text field that says 0% loaded with the instance name loaderText_txt. Once I completed the movie clip I returned to the main timeline and moved everything on the timeline back so I could make a new layer and place the preloader movie clip on frame 1 of the main timeline. I want to apply code so the preloader works and the movie clip plays and the mask unveils the bar and the dynamic text shows the correct % loaded. However I do not know what the correct code is and I do not know if that code should be on a separate layer on the main time line before the movie clip? Or should that code be placed on the layer that has the movie clip?
Flash 5 Compatiable Preloader From MX 2004
Howdy,
I've been experimenting with preloaders today. I'm trying to make one that is compatible with Flash 5. I'm using Flash MX2004 to create it and my swf needs to be compatible for Flash 5.
hroughout the day, I've done several things and now I'm to the point where I want to start over so I deleted my dynamic boxes and actionscript but when I publish the file, to make sure it is clean of preloader stuff, I get the following even though I've deleted everything:
**Error** Symbol=Preloader, layer=class, frame=1:Line 1: You must export your movie as Flash 6 to use this action.
#initclip 1
**Error** Symbol=Preloader, layer=class, frame=1:Line 145: You must export your movie as Flash 6 to use this action.
#endinitclip
Total ActionScript Errors: 2 Reported Errors: 2
I don't even know what an initclip is and I don't have a line 145 on frame 1. So, my questions are:
1. How do I get rid of that error?
2. How do I create a Flash 5 compatible preloader. (I did grab one for the FK tutorial but I can't tell if it's working or not becuase of the error)
I'm open to suggestions and code.
Mark
Flash MX 2004 Pro Presentation? Preloader Help
Hello,
I have Macromedia Flash MX2004 Professional. When you chose to make a new document you can select Slide Presentation (which is what we did).
We then created a large slideshow... There are about 50 pictures with text.
I have tired and tired but I have not been able to make a preloader for this, it dosent have to be fancy, just a Loading Screen which plays after its finnished. I am guessin this option was made for actual presentations, not over the web, so they had no need for preloaders.
Please help!! It has slides, not scenes or frames! Can anyone help me out???
Thank you,
Griffe Youngleson
griffedesign@hotmail.com
Flash Mx 2004 Preloader (with Loadbar)
Hi,
I used the loadbar tutorial for my old files in Flash mx now I've changed to 2004 the previous loadbar doesn't work?
I know the actionscript has changed in 2004 but I'm not sure how to inplement this new coding?
The tutorial loadbar preloader doesn't work and now I've go and saved the old files in the new format!
Ant ideas?
Thanks
Spence
Flash Mx 2004 Preloader (with Loadbar)
Hi,
I used the loadbar tutorial for my old files in Flash mx now I've changed to 2004 the previous loadbar doesn't work?
I know the actionscript has changed in 2004 but I'm not sure how to inplement this new coding?
The tutorial loadbar preloader doesn't work and now I've go and saved the old files in the new format!
Ant ideas?
Thanks
Spence
Preloader Problems In Flash MX 2004 Pro
having trouble with preloader in Flash MS 2004 Pro.
here's my code below:
Code:
progress.autoSize = true;
this.onEnterFrame = function() {
var loaded:Number = this.getBytesLoaded();
var total:Number = this.getBytesTotal();
var percent:Number = Math.floor((loaded/total) * 100);
progress.text = "Loading " + percent + "%";
trace(loaded + " - loaded");
trace(total + " - total");
trace(percent + " - percent");
trace(progress.text + " - progress.text");
if(percent >= 100) {
delete this.onEnterFrame;
gotoAndPlay("login", 1);
}
}// end onEnterFrame
stop();
This doesn't update the progress dynamic text that I have. What am I doing wrong?
Thanks.
HOW TO PRELOAD MY MAIN SWF (not External Files But My Main)
I've done a main.swf that i use as a big container for my website, in this main.swf i used the document class, where i import all the classes that i need for my interface and i load all the sections from externals .swf, preload this sections is not a problem, but i have this problem: how can i preload my main.swf if i have to put the code for the preloading into the document class, that is not working till its loading is not complete!?!?!? i mean it is like to say to the same object that i'm loading to check the loading of itself, the methods aren't be instanced, so.. looks not possibile to me.. wich way to follow?
Add External Swf (from Slide.com) In Main Flash
I'm new to actionscript and would like to do something very basic. I'd like to include a slide.com swf in my main swf. I'm using loadMovieNum to add the external swf, but I'm having problems passing the flashvar to the main swf internally. I've read that loadVariableNum is internal to the main swf, while flashvar is external. I've tried this and it doesn't work.
below is a typical source slide.com swf url
src="http://widget-95.slide.com/widgets/slideticker.swf"
flashvars="cy=un&il=1&channel=8528021&site=widget-95.slide.com"
My attempt.
loadMovieNum("http://widget-bf.slide.com/widgets/slideticker.swf",0);
loadVariablesNum("cy=un&il=1&channel=8365247&site= widget-bf.slide.com",0);
any help would be appreciated...
What Happens When The Main Flash Is 25 Fps And An External SWF File Is 12 Fps?
Hello everyone,
I have a Main Flash which is set to 25 fps. This Flash is used to load an external swf file which was created using 12 fps. I would like to know what really happens when the Main Flash loads the external swf file? Does the Main file forces the external file to be run on 25 fps or the swf file is run with its own 12 fps?
Any ways, if someone can take the time and explain this, I would be greatful.
Thank you very much and have a great day.
Khoramdin
Splash Page: Preloader Shows Main Flash Won't
I am hoping someone can help.
I have built a splash page in flash with two scenes. The simple preloader is in one scene and the main flash is in another scene. I have tested the movie and although the scenes don't flow one after in test mode they do work perfectly. I published and loaded the flash online and the preloader shows but the main flash doesn't follow. It is at http://home.earthlink.net/~muse_7. This is my portfolio site and I am preparing for an interview so the sooner I fix the problem the better.
Thanks in advance
Flash MX 2004 Professional Slide Preloader?
Hi...I was just wondering how to code a preloader for Flash MX 2004 Professional slides. Also where do I place the preloader code within a slide presentation? I am a novice in Actionscript, and had been able to script simple preloaders for Flash MX movies, but I know the same code does not apply for Flash MX 2004 Pro slides...
I saw the following thread:
http://www.flashkit.com/board/showth...hreadid=504735 with information on a simple Actionscript 2 preloader that is saved as an external file - could this be used with a Flash MX 2004 Pro slide presentation?
Also, I have seen a few books out on Flash MX 2004 Professional, but not as much on the Flash MX 2004 Professional with information on slide presentations - I would appreciate it if someone could recommend a good book or resource on that subject... thanks in advance!
Preloader/Media Display Help Flash MX 2004
I'm putting some video of my artwork up on display on a website I'm designing for myself (using the flash/dreamweaver combo). I've decided to showcase my work by creating (which I think is pretty common) thumbnails with a media display beside them. I have my video controls and everything working -- it's all very rough and clunky (I wish I really knew what I was doing and could take the rough edge off -- jazz it up a bit -- suggestions would be great) but anyway when I put it on the website, naturally it takes between five and 10 seconds to load the .flv into the media display (with a simple fade command). I've tried numerous times to utilize a simple preloader -- didn't work, then I downloaded a few other preloaders but could not get any of them to work either. I'm also working with slides I believe they're called -- could be that because I'm still experimenting as a newbie that I'm going about this media display thing the wrong way (maybe I shouldn't be working with slides?? but I would have no idea how else to do it and I've probably put a good 30 hours into this already - yeah, I know an experienced flash user could probalby do this with his eyes closed and his hands tied behind his back). In any case, perhaps someone with more knowledge in this area could assist me here... Attached is the .fla file. I did not attach the .flv as I figured it's probably not necessary. Thanks much! Oh, here's a link to the file just in case it didn't upload correctly -
http://www.onlinefilefolder.com/inde...758b2d53d70388
Jason
Flash MX : Can External MC's Control Main Timeline?
Hey quick question...can a movie clip which is loaded from an external source control the main timeline? For example I have a set of buttons contained within a movie clip which is loaded externally onto my main timeline...can those buttons direct the swf to a specific frame on the main timeline? Also...is there any way to load an external movie clip into a specific LAYER rather than Level? Maybe these seem like stupid questions but any one who can gimme a little help to an actionscript noob like me - thanks a lot!
Want To Load Different External Videos Into Main Flash
Hello,
Can anyone tell me how to set up a flash movie so that upon clicking different buttons a different video would load into a target empty movie clip? I'm guessing it's best to have these videos be SWF files. And, I'd like to see how once a video is loaded one can control it (pause, volume, etc) with one set of such controls below the one window where each video will be playing.
Thanks!
Rob
Preloading External SWF's In Main Flash File
I have a main flash file that loads external swf files when the user clicks any button on the navigation. I have a preloader in the main file that preloads the external when the button is clicked, but then it takes quite some time for the external movie to load. Is there a way that I can preload the external swf's in the background while the main page is being displayed (before the actual button is clicked on the navigation to take you to that page?) Right now its taking about 20 seconds for the external swf's to load, which is way to long. Any help would be appreciated.
Thanks,
braves07
Help Load External Mp3-xml Player (swf) Into Main Flash Mov
I have an external mp3-xml player (it's a .swf movie) I need to load into the main .swf movie. All my attempts have failed... It doesn't work! However, if I test the mp3Player.swf independently it works like a charm! I hope someone can help me with this issue.
You can find the source files here:
http://www.natachafernandez.com/downloads/MP3Player/
Adding A Preloader To Image Panning In Flash Mx 2004
Hello,
Does anyone know how to add a preloader to the image panning tutorial????
http://www.kirupa.com/forum/showthread.php?t=225637
I'm only a beginner with flash and would really appreciate your help.
Thanks
Flash MX 2004: Controlling External Swf (Nav)
I am creating a Flash program that consists of a "master" movie file that will call in individual chapters (*.swfs) as needed.
I want to create a single (page) navigation structure that will reside in the master - yet allow the user to go to the next/previous screens in the movie currently being used.
I have created the master movie and have placed an empty movie clip on one of the frames. From the main navigation, I have been successfully able to load the individual *.swfs into the empty movie clip when called from the menu using the following command:
_root.emptymovieclipname.loadMovie("external.swf") ;
I have been unable to figure out the action script that will allow me to control the navigation within the external swf from the main timeline. Any clues?
Also - is it possible to determine the number of frames within each clip as they are called so I can turn on/off the fwd/back buttons when appropriate?
TIA
- Shawn
|