Subscribe to our newsletter:
Page 1
In this tutorial you will learn how to make a 3d preloader with Swift 3d and Flash. I am using Swift 3d version 4.50, but you can use any version. I am using Flash 8 for the flash part but you can use flash MX 2004 as well. You might be able to use previous version but Iâm not sure.
Here is an example of what we will be making.
First of all open swift 3d and make a 100 frame animation for your preloader. Make sure the frame rate is the same as you will be using in flash, otherwise this wonât work. Once you have your animation export it as a .swft file so we can import it into flash.
Now open flash and click File>Import>Import to Library and find the .swft and open it. Drag it onto the stage and give it an instance name of loader. Make a dynamic text box somewhere on the stage and give it a instance and variable name of âploadedâ (without the quotation marks). Now enter this code onto the frame:Line 1: Makes the movie stop on that frame.
Line 2: Means âWhen this frame is entered. So that would be 12 times a second if your frame rate is 12.
Line 3: Makes the dynamic text display the variable loaded which will be rounded off using the Math.round() function. It will also have â%â displayed after the number.
Line 4: Declares a variable called loaded which is equal to the percentage of the bytes loaded. (Bytes Loaded/Total Bytes*100).
Lines 5-9: An if statement. If loaded is not equal to 100, then the MC of the loading animation goes to the frame number equal to loaded. Else the movie will go to the second frame, where you can have a stop button or something.
Here is an example of what we will be making.
First of all open swift 3d and make a 100 frame animation for your preloader. Make sure the frame rate is the same as you will be using in flash, otherwise this wonât work. Once you have your animation export it as a .swft file so we can import it into flash.
Now open flash and click File>Import>Import to Library and find the .swft and open it. Drag it onto the stage and give it an instance name of loader. Make a dynamic text box somewhere on the stage and give it a instance and variable name of âploadedâ (without the quotation marks). Now enter this code onto the frame:
_root.stop();
onEnterFrame = function () {
ploaded = Math.round(loaded)+"%";
loaded = _root.getBytesLoaded()/_root.getBytesTotal()*100;
if (loaded != 100) {
loader.gotoAndStop(Math.round(loaded));
} else {
_root.gotoAndStop(2);
}
};Line 2: Means âWhen this frame is entered. So that would be 12 times a second if your frame rate is 12.
Line 3: Makes the dynamic text display the variable loaded which will be rounded off using the Math.round() function. It will also have â%â displayed after the number.
Line 4: Declares a variable called loaded which is equal to the percentage of the bytes loaded. (Bytes Loaded/Total Bytes*100).
Lines 5-9: An if statement. If loaded is not equal to 100, then the MC of the loading animation goes to the frame number equal to loaded. Else the movie will go to the second frame, where you can have a stop button or something.





help
and feedback
latest
news
latest
forum entries