I'm trying to make a flash preloader using a image that slowly fills up.
I used the tutorial on this site:
I tried following the instructions until I finished and saw it wasn't working correctly. When i tried testing by simulating internet speed the screen showed blank for the first few seconds until the image loaded already half-way filled up. It's supposed to load completely transparent and slowly fill up from the bottom.
So, I downloaded the source file from the tutorial link i showed above to see if i had dont something wrong while following the instructions only to find it happens there too... I uploaded a video of my screen on Youtube to show what is happening to me:
Does anybody know why this is happening? Could it maybe be because I'm using the newer Adobe CS6? Any help is appreciated.
The first link shows the source and code I used: http://flashexplained.com/preloaders/creating-a-preloader-for-your-fla sh-site-using-the-image-of-a-bottle-and-a-rectangular-mask/
I tried doing this myself following the instructions with my own picture and content to be loaded but when I tested it didn't work so I downloaded the source to test and see if I had done something wrong but the same thing happened with that source.
The code works because it does what its supposed to but it takes a few seconds for the flash to start.. it shows a blank white page for 2-3 seconds and then when the animation begins to play its already halfway through.. so its like the animation is playing while the screen is blank then when it shows its already halfway through the animation.
I included a link to the source and 2 videos in my main post showing everything that I'm talking about, how you missed it I have no idea.
The code is:
stop();
rectMask_mc._height = 1;
this.onEnterFrame = function():Void {
var loadedData:Number = this.getBytesLoaded();
var allData:Number = this.getBytesTotal();
var percent:Number = Math.round(loadedData/allData*100);
rectMask_mc._yscale = percent;
if (loadedData>=allData) {
gotoAndStop(10);
delete this.onEnterFrame;
}
};
I did a little testing and noticed when I deleted the line "rectMask_mc._height = 1;" it still does the same filling animation I got before that starts halfway.. so I'm guessing that command no longer works in CS6?!
Edit:
I just tried the "rectMask_mc._height = 1;" command by itself and it works...
I'm sorry im just new to Flash, trying to learn the basics and reading up on tutorials but they are all outdated so I'm trying to figure out whats the problem with it not loading with its height at "1" then filling up when I'm using the entire code. The height command only works when I delete the rest of the code.
North America
Europe, Middle East and Africa
Asia Pacific