5 Replies Latest reply: Mar 10, 2013 5:44 PM by SakreD RSS

    Adobe Flash CS6 Image Filling Preloader not working?

    SakreD

      I'm trying to make a flash preloader using a image that slowly fills up.

       

       

      I used the tutorial on this site:

       

       

      http://flashexplained.com/preloaders/creating-a-preloader-for-your-flash-site-using-the-im age-of-a-bottle-and-a-rectangular-mask/

       

       

      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.

        • 1. Re: Adobe Flash CS6 Image Filling Preloader not working?
          SakreD Community Member

          In this video:

           

           

          You can see that person was able to make it work. The image is used for the preloader to fill up is 25KB, the bottle image in the preloader I tested was 8KB so the size isn't the issue... Again any help is appreciated.

          • 2. Re: Adobe Flash CS6 Image Filling Preloader not working?
            Ned Murphy CommunityMVP

            You'll need to show the code for whatever you did if you want someone to try to help.

            • 3. Re: Adobe Flash CS6 Image Filling Preloader not working?
              SakreD Community Member

              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.

               

              • 4. Re: Adobe Flash CS6 Image Filling Preloader not working?
                SakreD Community Member

                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.

                • 5. Re: Adobe Flash CS6 Image Filling Preloader not working?
                  SakreD Community Member

                  Moderators delete this thread, it got too long and I cant edit my first post so I created a new cleaner one getting straight to the point.