Preloader Tutorial For MX 2004
Since the "smooth preloader tutorial" doesn't work in MX 2004, I am writting this tutorial for a preloader that works in MX 2004. It be my first so bear with me.
First make a new flash document. On the first frame on the time line put ActionScript Code: stop(); because we don't want the movie to play any further until all of it has loaded-->preloader, right? Next, make a movie clip and put it on the stage. In that movie clip's timeline put this ActionScript Code: //stops the MC from playing right away.stop();//excutes the below code at the frame per second of the movieonEnterFrame = function() {// get the total bytes of the movie totalBytes = _parent.getBytesTotal();//gets the bytes that have been loaded so far. //This number changes because of our onEnterFrame. loadedBytes = _parent.getBytesLoaded();//make a percent out of two numbers and rounds it up. percent = Math.ceil((loadedBytes/totalBytes)*100);//this tweens our display box. I'll talk more about this in a minute. gotoAndStop(percent);//displays the dynamic text box you are going to make the percent loaded info_txt.text = percent+" %";// if fully loaded, play the movie if (percent>=100) {//goes to the frame label "Main" on the main/_root timeline _parent.gotoAndPlay("Main"); }} Okay there is our code. Now create a small rectangle box. 100 frames latter create a similar box but much longer. Now tween thoses boxes using the "shape tween" in the properties. Our code above "gotoAndStop(percent);" animate this when the movie is preloading. See how that works? Great! Now make that dynamic text box and name it "info_txt" The percent loaded will show in that box.
Great ALMOST done. If you use it as is, the preloader wont show up until about 40% so lets fix this.
What happens is all your components have to load before the preloader loads this cause it not to show until about 40%. To fix this:
go to File-->Publish Settings-->Click the tab called Flash. Next to "actionscript version click settings. Now where it says export frame for class choose (for our example) 5. It doesn't matter what number you pick but it must be before you call need the components. So i choose 5 and then have all my info on frame 6 and on (BTW I dont use scenes). Now for the component right click on them in the library and choose linkage. In the 4th box down "uncheck export in first frame" Right, we just change the export classes.
You also need to do this if you use attachMovie. However, you also need to put an instance of it on/off the stage at some point of the movie. Read more about it here senocular's tutorials
Great this is about it. Now you got a great preloader enjoy. Attached is an example. The file is very small to get it to fix on here. To see the preloader work, add a little "weight" to the file. ________________ Additionally, Here is a link to an issue CyanBlue brought up about preloader displaying for a fraction of a second. Oldnewbie shows a solution to make it load directly if cached. http://actionscripts.org/forums/showthread.php3?t=74255 ________________
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 06-02-2005, 02:57 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Help With Tutorial - MX 2004
Hello,
I'm hoping someone might be able to help me modify the script for a tutorial from this site, it's for the slideshow tutorial ( http://www.kirupa.com/developer/mx20..._slideshow.htm ).
What i'm wanting to do is load just the photos from one XML file and just the text from a separate XML file, all while keeping the timing in sync. I'm thinking have one XML file called 'images.xml' and one file called 'text.xml'. I hope this makes sense.
Here's the actionscript:
Code:
delay = 1000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
And here is the current XML:
HTML Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/kresge.jpg</image>
<caption>Kresge</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/medialab.jpg</image>
<caption>Media Lab</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/stata.jpg</image>
<caption>Stata Center</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/stata_lobby.jpg</image>
<caption>Stata Lobby</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/construction.jpg</image>
<caption>Construction</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/dome.jpg</image>
<caption>The Dome</caption>
</pic>
</images>
Thanks!
Help With Tutorial - MX 2004
Hello,
I'm hoping someone might be able to help me modify the script for a tutorial from this site, it's for the slideshow tutorial ( http://www.kirupa.com/developer/mx20..._slideshow.htm ).
What i'm wanting to do is load just the photos from one XML file and just the text from a separate XML file, all while keeping the timing in sync. I'm thinking have one XML file called 'images.xml' and one file called 'text.xml'. I hope this makes sense.
Here's the actionscript:
Code:
delay = 1000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
And here is the current XML:
HTML Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/kresge.jpg</image>
<caption>Kresge</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/medialab.jpg</image>
<caption>Media Lab</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/stata.jpg</image>
<caption>Stata Center</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/stata_lobby.jpg</image>
<caption>Stata Lobby</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/construction.jpg</image>
<caption>Construction</caption>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/dome.jpg</image>
<caption>The Dome</caption>
</pic>
</images>
Thanks!
MX 2004 Tutorial Error?
Hi all --
Has anyone had trouble with MX 2004 Pro's tutorial on creating a simple data integration application? I made their movie step-by-step (loads a dinner menu from an external XML file), but when I run it I get an ActionScript error:
"C:Documents and SettingsAdministratorLocal SettingsApplication DataMacromediaFlash MX 2004enConfigurationClassesmxdata ypesNum.as : Line 13: There is no property with the name 'isInt'.
mx.data.formatters.NumberFormatter( this.formatter ).isInt = this.int; "
This seems totally weird to me, as the file Num.as is not referenced *anywhere* in the FLA.
What's going on?
Mp3 Player Tutorial For Mx 2004
I've seen a few that work for MX but none sofar that are for 2004, i need one with a stop start forward and back button. anyone have any links? thanks a ton.
2004 Chatroom Tutorial ?
I know these are two seperate issues, but is there a tutorial or someone willing to share the basics of a chat room that has users become characters.
-Username/password
-isometric world where user can choose character and walk
-connect to server, room full
Do you think this is easier using Communication Server MX? I know that the character "world" is another issue, but because it's a popular format, I was wondering if someone had a tutorial going over the whole process.
Any info would be helpful, or suggestions.
CSS + Flash MX 2004 Tutorial ?
I made a .swf which includes a dynamic text box. I used the CSS tutorial to format the text. Tested the movie, looked great. No problem there. However, when I loaded the .swf into a Blank Movie Clip in my main .swf (or home page) it still dynamically loaded the text, but didn't retain the CSS formatting.
http://php.indiana.edu/~jboatrig/NewDesign/Resume.html
-Just the Resume.swf file only
http://php.indiana.edu/~jboatrig/NewDesign/main.html
-Resume file dynamically loaded into the main website.
-Click on the "resume" button on the bottom right to load.
Thanks for your help!
Getting MX Tutorial To Work In 2004
I have been trying to get a form like this one working
http://www.kirupa.com/developer/mx/components2.htm
All the things I find online, do not work and I cannot find any good examples of it working in mx 2004. The code works fine but the buttons do not send the data. What code do I need in my submit button to get this to work correctly?
Thanks, Josh
2004 Chatroom Tutorial ?
I know these are two seperate issues, but is there a tutorial or someone willing to share the basics of a chat room that has users become characters.
-Username/password
-isometric world where user can choose character and walk
-connect to server, room full
Do you think this is easier using Communication Server MX? I know that the character "world" is another issue, but because it's a popular format, I was wondering if someone had a tutorial going over the whole process.
Any info would be helpful, or suggestions.
CSS + Flash MX 2004 Tutorial ?
I made a .swf which includes a dynamic text box. I used the CSS tutorial to format the text. Tested the movie, looked great. No problem there. However, when I loaded the .swf into a Blank Movie Clip in my main .swf (or home page) it still dynamically loaded the text, but didn't retain the CSS formatting.
http://php.indiana.edu/~jboatrig/NewDesign/Resume.html
-Just the Resume.swf file only
http://php.indiana.edu/~jboatrig/NewDesign/main.html
-Resume file dynamically loaded into the main website.
-Click on the "resume" button on the bottom right to load.
Thanks for your help!
Good MX 2004 Datagrid Tutorial?
Can anyone point me in the direction of a detailed tutorial or have a .fla of how to simply pull data from a database using ASP or ASP.NET into the DataGrid component?
I just need a tutorial or an example that does this to get me jumpstarted.
Thanks
MX 2004-best Tutorial For Making Games?
whether a book, site, or something existing even in flash kit that maybe i overlooked...just looking for the best tutorial that goes from the basics of making games and builds up from there...don't know how to use actions that well either so if there's a place that defines what they do exactly and how to use them properly that'd help to...thanks for your help : )
Creating A CD-ROM Tutorial In Flash MX 2004
Hello Everyone,
I am currently studying my BSC (hons) degree in computing and have been asked to create an interactive CD-ROM based tutorial for students 16yr+. I will be using Flash MX 2004 to create the software as I have had around 14months experience with the software and enjoy using it, and have around 5-6 months to complete the tutorial.
The idea of the tutorial is to combine a set of either flash mx or microsoft access tutorials which are currently paper-based and are handed out to students. The combined set of tutorials will be implemented into one flash application that I will create, im struggling on thinking of the best way to create this piece of software.
The first idea I had was to fully recreate the flash or microsoft access interface screen in macromedia flash mx 2004, and then to give the user on-screen instructions on how to perform each task, and also to give some form of user feedback to tell the user whether they have completed the task successfully. I was wondering how hard this this type of application would be to create in flash, and whether this would be a good way of creating the tutorials.
The second idea that I had was to take screenshots of the tasks whilst performing them, and then putting the screenshots into flash with instructions on how to complete each task.
The software I need to create needs to be quite extensive due to the module being a double project and the most important module on my course. Any type of feedback would be much appreciated as I am struggling to come up with a good concept. If anyone no's of any links to similar types of software so that I can get a good idea of how to create mine that would be great. Or if anyone thinks thats the ideas I already have could work well please give me some feedback.
Thanks, Kev
Can't Find Tutorial Files MX 2004
I'm trying to complete the Flash MX Tutorial on the Adobe website but can't seem to find the files that it requires. I have Studio MX 2004 and there is no Tutorials folder in my Macromedia/Flash folder. Does anyone know where I can download them? I'm specifically looking for view1.png, view2.png and view3.png, which are supposed to be located in the Assets folder.
Thanks!
Simple MX 2004 Gallery Tutorial
Hello
I am looking for a fairly simple MX 2004 tutorial on creating a photo gallery which would show several thumbnails which, when one of them is clicked, it would show a larger image.
I have looked online and those I have found are not compatible with MX 2004 or the FLA file is not available.
Thanks for any help.
Steve
Motion Tween Tutorial For MX 2004
I noticed that in the tutorial, there is no mention of having to group your object or converting it to a symbol prior to doing a motion tween on the object. Is this step no longer necessary in MX 2004?
Motion Tween Tutorial For MX 2004
I noticed that in the tutorial, there is no mention of having to group your object or converting it to a symbol prior to doing a motion tween on the object. Is this step no longer necessary in MX 2004?
Tsunami Effect Tutorial For MX 2004?
Does anyone know how to update this tutorial so that it works with MX 2004 or V.8? Thanks!
http://www.actionscript.org/tutorial...mi/index.shtml
MX 2004: Difficulty With A Tutorial I Found Ont This Site.
http://www.flashkit.com/tutorials/Ga...1128/index.php
There's the tutorial I'm using.
Here's what I come out with.
It happens to be that I don't want this.
What happens is that when I click the button for it to redraw for me, it just makes line to where my cursor is. The code has been cheacked over and over again, and I even copied and pasted.
Where is the error in my ways?
LF Cascading/Drop Menu Tutorial For MX 2004
I have yet to find a tutorial on how to create a cascading menu like the one featured here for Flash MX 2004. I need to have the bottom buttons move down when buttons above them are clicked and the submenus appear...hope that makes sense.
Any suggestions or words of encouragement?
Thanks!
LF Cascading/Drop Menu Tutorial For MX 2004
I have yet to find a tutorial on how to create a cascading menu like the one featured here for Flash MX 2004. I need to have the bottom buttons move down when buttons above them are clicked and the submenus appear...hope that makes sense.
Any suggestions or words of encouragement?
Maybe I'm using the wrong term for the style of menu...
Thanks!
Macromedia Studio MX 2004 Tutorial Book
I am currently looking for a tutorial book for Macromedia Studio MX 2004 w/ Flash Professional.
Which tutorial book would you recommend from the poll? If others, please recommend. Thanks.
HELP WITH PRELOADER (MX Pro 2004)
Hey there. Some time ago, I had a preloader question for Flash MX. The question involved a 100 frame movie clip that I wanted to use as a preloader....and I followed all the steps correctly and everything worked out very well. Here is the script that I used for Flash MX.
onClipEvent (enterFrame) {
loaded = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
progress = Math.round((loaded/total)*100);
if (loaded == total) {
_parent.nextFrame();
} else {
this.gotoAndStop(progress);
}
}
I attached that to my 100 frame movieclip in the first frame of my main timeline, and also put a stop command in the first frame of my main timeline as well. Everything worked fine.
When I got my copy of MX Pro 2004, the same actionscripting worked just fine for that same file....but now I am doing a new website, with the same 100 frame movie clip, using the same actionscripting...but now, the preloader movie clip wont even start, let alone play my movie. Is there something wrong with the code? Does it need to be changed for the 2004 version? I'd really appreciate it if someone can shed some light for me, because I am really stumped (and I need to get this site done lol)!
FrankieB
Preloader And 2004 Mx
I have made a preloader but i doesnt go to scene "main" after finishing loading. Please help:
this.onEnterFrame = function() {
var total_bytes = this.getBytesTotal();
var loaded_bytes = this.getBytesLoaded();
var frames_loaded = this._framesloaded;
var percent = Math.round((loaded_bytes/total_bytes)*100);
this.bar._xscale = percent;
this.status_tekst.text = "percent loaded: " + percent;
if (frames_loaded > 0 && total_bytes == loaded_bytes) {
this.gotoAndPlay("main",1);
delete this.onEnterFrame;
}
}
stop();
Preloader 2004 Mx Help
hi, i dunno if its mx 2004 or just me, but i get this error when trying to do a preloader
Target not found: Target="undefined" Base="_level0"
can you tell me where i got it wrong?
var loadedbytes:Number= getBytesLoaded();
var totalbytes:Number= getBytesTotal();
var loadedkbytes:Number = Math.ceil (loadedbytes/1000);
totalkbytes:Number =Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
Preloader In Mx 2004
can some one help me with this.
I enter this in the preloader scene
ifFrameLoaded ("Scene 1", 55) {
gotoAndPlay ("Scene 1", 1);
}
everything in the next sence is pushed forward 5 frame. Example button A suppose to tell the movie to play the sence at frame 5, it'll play at frame 10.
is there another way to create a simple preloader (w/o the percentage) in mx 2004? If there is please help me
MX 2004 Preloader
I'm using Flash MX 2004 Professional and am doing some XML binding into a text field on frame one of the main timeline. How do I sneak in a preloader since all of the components seem to only work in frame one?
MX 2004 Preloader
Can someone point me to a preloader that will work in MX 2004. It's been more than a year since I've dabbled in flash and my preloader that I used to use in Flash 5 does not appear to work the same in MX 2004 unlesss of course I just haven't set it up properly. I have a preloader that sits in frame one...very simple and I'm trying to load other flash files in. I do not have the Pro version and it appears they've really separated coding from being able to just addeing things. Unless there is a function that can help me. Guess I need a quick review.
Help
Preloader Mx 2004
I have tried a few different tutorials on the flash mx 2004 preloader, I cannot get it to work. does anyone have any ideas?
Thanks
Mx 2004 Preloader
Hi, I have tried 4 different preload scripts, I am having no luck at all. can someone please help me with a easy preload script that has the percentage.
thanks, Kristen
Preloader....mx 2004
hey guys i need to find a tutorial or example on making preloader via actionscript like ill make the progress bar via drawing api and text field that will display its loading can anyone direct me to a toturial please..........
Preloader In Mx 2004
Hello,
I am new to mx 2004 and internet design as a whole (only a couple of years but not alot of flash) so please bear with me if I dont know all the lingo yet. I am trying to create a preloader for my site and just cant seem to do it correctly. Am I wrong to say that it seems the whole process completly changes with each version of flash and if thats true than thats one of the confusing things ever .
But anyways thats what Im trying to do and I have been doing some research into using flash components and have played with the preloader that comes bundled with flash and its interesting but I could only get that to work with a jpg and not another swf. What do I do? Can someone point me in the direction of a good tutorial or give me some pointers on using the loaderbar and loader component?
thank you very much ahead of time
gary
Preloader...2004
I have looked trough the forum..
Isnt there a easy way to insert a simple minimal preloader to load a .swf...
I use flash MX 2004
Please help me out!
Preloader....mx 2004
hey guys i need to find a tutorial or example on making preloader via actionscript like ill make the progress bar via drawing api and text field that will display its loading can anyone direct me to a toturial please..........
Preloader In Mx 2004
Hello,
I am new to mx 2004 and internet design as a whole (only a couple of years but not alot of flash) so please bear with me if I dont know all the lingo yet. I am trying to create a preloader for my site and just cant seem to do it correctly. Am I wrong to say that it seems the whole process completly changes with each version of flash and if thats true than thats one of the confusing things ever .
But anyways thats what Im trying to do and I have been doing some research into using flash components and have played with the preloader that comes bundled with flash and its interesting but I could only get that to work with a jpg and not another swf. What do I do? Can someone point me in the direction of a good tutorial or give me some pointers on using the loaderbar and loader component?
thank you very much ahead of time
gary
Preloader...2004
I have looked trough the forum..
Isnt there a easy way to insert a simple minimal preloader to load a .swf...
I use flash MX 2004
Please help me out!
MX Pro 2004 Preloader Question
Hey there. Some time ago, I had a preloader question for Flash MX. The question involved a 100 frame movie clip that I wanted to use as a preloader....and I followed all the steps correctly and everything worked out very well. Here is the script that I used for Flash MX.
onClipEvent (enterFrame) {
loaded = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
progress = Math.round((loaded/total)*100);
if (loaded == total) {
_parent.nextFrame();
} else {
this.gotoAndStop(progress);
}
}
I attached that to my 100 frame movieclip in the first frame of my main timeline, and also put a stop command in the first frame of my main timeline as well. Everything worked fine.
When I got my copy of MX Pro 2004, the same actionscripting worked just fine for that same file....but now I am doing a new website, with the same 100 frame movie clip, using the same actionscripting...but now, the preloader movie clip wont even start, let alone play my movie. Is there something wrong with the code? Does it need to be changed for the 2004 version? I'd really appreciate it if someone can shed some light for me, because I am really stumped (and I need to get this site done lol)!
FrankieB
FMX 2004 Preloader Question
Hello,
How can it be that when I load the preloder I have to wait untill the preloader gets visible. When I run the .fla i firt get a black screen and within an couple of seconds my preloader begings to run.
How can I let it work so that it begin directley when I run the. fla
THnx,
Preloader Problem (MX 2004)
Hey!
I don't really know if this is possible? Here goes; I have a site right.. as it is today the whole site is preloaded from start; Info, Contact and the heavy part, the Portfolio.
You can have a look at; www.paperino.se (it's in Swedish)
To the question; Is it possible to first load the site so you only can access the Info (Om oss) & Contact (Kontakt) part while the Portfolio part is getting loaded in the background?
I know that one solution is to make it into two files instead... the portfolio could be named eg. porfolio.swf and have a preloader function of its own. The point is that I would prefer to keep it as one file - with the Portfolio part of the file being preloaded separately in the background.
I would really appreciate any help!
Cheers, Bateman
MX 2004 Pro Slides And Preloader
Hi,
I'm a vetern of Flash 3 and 4 attempting to get up to speed on the new version... I know how to build a prelaoder but am a bit perplexed as to how to do so with a slideshow created with the new screen based format.
Access to the main timeine is limited, my understanding is that it can be targeted, but not modified directly, so I can't put it there. I tried embedding the .SWF of the slideshow in a parent movie and installing the loader in frame 1 but the .SWF showed up as a single frame only. I also tried to load the SWF into a container clip in frame 2 with the loader being in frame 1, but of course it only read the size of the container clip, not the SWF being loaded.
I must be missing something horribly obvious, any help is appreciated. Here's the code from the preloader..
myInterval =setInterval(preloader, 10);
function preloader() {
if (getBytesLoaded() >= getBytesTotal()) {
play();
clearInterval(myInterval)
}
bar._xscale = (getBytesLoaded()/getBytesTotal())*100;
myTextField.text = Math.round(getBytesLoaded()/getBytesTotal()*100)+ "%"
}
Here is that code in action before a non slide-based clip
www.liveeyetv.org
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?
How Use This Preloader (fl 2004 Mx Needed)
How can i use this preloader, can u show me?
In this file is preloader of 2004 an photo to load it.
I will use this preloadre in the future for site loading as normal movie preloader.
Thanks in advance
Bye
Jan
Testing Preloader In MX 2004
I know that in MX, in order to test a preloader when testing movie, you must press ctrl-enter two times. In MX 2004, when you do that, it asks if you want to cancel the test movie. How do you test a preloader in the newest version of flash?
Thanks.
|