5 Replies Latest reply on Sep 8, 2012 10:49 AM by kglad

    Flash iPhone OS

    Little Ricky Productions Level 1

      I am reworking my website, which is in flash.  I find it terribly slow, due to the fact that i am a photographer and I have WAY too many pictures on the site.  In pulling up flash I noticed there is an option for iPhone OS.  Is anyone familiar with this? 

       

      If I design in this will it allow everyone to see it?

        • 1. Re: Flash iPhone OS
          kglad Adobe Community Professional & MVP

          the publish for iOS is for creating an iPhone application that can be installed on an iPhone.  it does not create something you can put on your website and will be viewed by iPhone users.

           

          p.s.  you can probably improve the performance of your website by enabling cacheAsBitmap for your images (unless they are already bitmaps).

          • 2. Re: Flash iPhone OS
            Little Ricky Productions Level 1

            kglad,

             

            Thank you for the response.  As for the speed of my pages, they are bitmaps.  I used my droid to look at the page and it was really fast.  I do not know what is the deal with my home computer, but I am switching carriers.  Maybe that will make a difference.

             

            Now I have another problem.

             

            I used code to create a photo gallery.  In an effort to make it load quickly I only put 8 images on each page.  You can view it at http://www.richardlearphotography.com and hit current shows.  Choose either show and you will see what I am talking about.  I will post the code below.  Each page calls the gallery.

             

            Everything works seamlessly and beautifully going through it once.  When I get to the end and come back using the buttons I created for next and previous the images get stuck.  I do not know how to begin to fix this. 

             

            Can you help?????

             

            Page Code:

             

            stop();

              

            home_mc.buttonMode = true;

            home_mc.addEventListener(MouseEvent.CLICK, home);

            function home(e){

                      var my_loader:Loader = new Loader();

                      my_loader.load(new URLRequest("/phot/fla/current_show.swf"));

                      addChild(my_loader);

            }

            begin_mc.buttonMode = true;

            begin_mc.addEventListener(MouseEvent.CLICK, beg);

            function beg(e){

                      var my_loader1:Loader = new Loader();

                      my_loader1.load(new URLRequest("/phot/fla/riverVale.swf"));

                      addChild(my_loader1);

            }

            previous_mc.buttonMode = true;

            previous_mc.addEventListener(MouseEvent.CLICK, prev);

            function prev(e){

                      var my_loader2:Loader = new Loader();

                      my_loader2.load(new URLRequest("/phot/fla/riverVale.swf"));

                      addChild(my_loader2);

            }

            next_mc.buttonMode = true;

            next_mc.addEventListener(MouseEvent.CLICK, nex);

            function nex(e){

                      var my_loader3:Loader = new Loader();

                      my_loader3.load(new URLRequest("/phot/fla/riverVale2.swf"));

                      addChild(my_loader3);

            }

            last_mc.buttonMode = true;

            last_mc.addEventListener(MouseEvent.CLICK, las);

            function las(e){

                      var my_loader4:Loader = new Loader();

                      my_loader4.load(new URLRequest("/phot/fla/riverVale4.swf"));

                      addChild(my_loader4);

            }

            face_mc.buttonMode = true;

            face_mc.addEventListener(MouseEvent.CLICK, face);

                      function face(e){

                      navigateToURL( new URLRequest ("http://www.facebook.com/RichardLearPhotography"),"_blank");

            }

            facetext_mc.buttonMode = true;

            facetext_mc.addEventListener(MouseEvent.CLICK, facetext);

                      function facetext(e){

                      navigateToURL( new URLRequest ("http://www.facebook.com/RichardLearPhotography"),"_blank");

            }

            var myLoader:Loader = new Loader();                 

            var url:URLRequest = new URLRequest("/phot/fla/rvcca.swf");

            myLoader.load(url);                                   

            addChild(myLoader);

             

            Page the above code calls:

             

            import mx.transitions.Tween;

            import mx.transitions.easing.*;

             

             

            this.createEmptyMovieClip("container",1);

            var imagesNumber:Number = 8;

            var scrolling:Boolean = true;

             

             

            for (i=1; i<=imagesNumber; i++) {

            container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);

            myThumb_mc = container["thumb"+i+"_mc"];

            myThumb_mc._x = (i-1)*myThumb_mc._width;

            myThumb_mc._y = (Stage.height-myThumb_mc._height)/1.5;

            myThumb_mc._alpha = 50;

            myThumb_mc.largerImage = i;

            myThumb_mc.onRollOver = function() {

            this._alpha = 100;

            };

            myThumb_mc.onRollOut = function() {

            this._alpha = 50;

            };

            myThumb_mc.onRelease = function() {

            this._alpha=50;

            for (i=1; i<=imagesNumber; i++) {

            var myClip = container["thumb"+i+"_mc"];

            myClip.enabled = false;

            }

            scrolling = false;

            _root.attachMovie("image"+this.largerImage,"large_mc",2);

            large_mc._x = (Stage.width-large_mc._width)/2;

            large_mc._y = (Stage.height-large_mc._height)/2;

            new Tween(large_mc, "_alpha", Strong.easeOut, 0, 100, 0.5, true);

            new Tween(container,"_alpha",Strong.easeOut,100,50,0.5,true);

            large_mc.onRelease = function() {

            scrolling = true;

            var myFadeOut = new Tween(large_mc, "_alpha", Strong.easeOut, 100, 0, 0.5, true);

            new Tween(container,"_alpha",Strong.easeOut,50,100,0.5,true);

            myFadeOut.onMotionFinished = function() {

            for (i=1; i<=imagesNumber; i++) {

            var myClip = container["thumb"+i+"_mc"];

            myClip.enabled = true;

            }

            large_mc.removeMovieClip();

            };

            };

            };

            }

             

             

            container.onEnterFrame = function() {

            if (scrolling){

            this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*10;

            if (this._x>0) {

            this._x = 0;

            }

            if (-this._x>(this._width-Stage.width)) {

            this._x = -(this._width-Stage.width);

            }

            }

            };

            • 3. Re: Flash iPhone OS
              kglad Adobe Community Professional & MVP

              i can't read that code very well because your code is unformated (in the forum) but i can see you're nesting functions and you have tweens that are local to functions both of which are potential problems.

               

              but an even greater problem is you're not unloading anything. so, you may be able to get away with simply unloading your loaded galleries.  try:

               

              var swfLoader:Loader = new Loader();

              addChild(swfLoader);

              home_mc.buttonMode = true;

              home_mc.addEventListener(MouseEvent.CLICK, home);

              function home(e){

               

                      swfLoader.load(new URLRequest("/phot/fla/current_show.swf"));

               

              }

              begin_mc.buttonMode = true;

              begin_mc.addEventListener(MouseEvent.CLICK, beg);

              function beg(e){

                         swfLoader.load(new URLRequest("/phot/fla/riverVale.swf"));

               

              }

              previous_mc.buttonMode = true;

              previous_mc.addEventListener(MouseEvent.CLICK, prev);

              function prev(e){

                         swfLoader.load(new URLRequest("/phot/fla/riverVale.swf"));

               

              }

              next_mc.buttonMode = true;

              next_mc.addEventListener(MouseEvent.CLICK, nex);

              function nex(e){

                         swfLoader.load(new URLRequest("/phot/fla/riverVale2.swf"));

               

              }

              last_mc.buttonMode = true;

              last_mc.addEventListener(MouseEvent.CLICK, las);

              function las(e){

                         swfLoader..load(new URLRequest("/phot/fla/riverVale4.swf"));

              }

              • 4. Re: Flash iPhone OS
                Little Ricky Productions Level 1

                I’ll try what you said.  Thank you.

                 

                 

                 

                I am posting my code so you can see it here.

                 

                 

                 

                Photo Page:

                 

                 

                 

                stop();

                 

                 

                 

                 

                 

                home_mc.buttonMode = true;

                 

                home_mc.addEventListener(MouseEvent.CLICK, home);

                 

                function home(e){

                 

                                var my_loader:Loader = new Loader();

                 

                                my_loader.load(new URLRequest("/phot/fla/current_show.swf"));

                 

                                addChild(my_loader);

                 

                }

                 

                begin_mc.buttonMode = true;

                 

                begin_mc.addEventListener(MouseEvent.CLICK, beg);

                 

                function beg(e){

                 

                                var my_loader1:Loader = new Loader();

                 

                                my_loader1.load(new URLRequest("/phot/fla/riverVale.swf"));

                 

                                addChild(my_loader1);

                 

                }

                 

                previous_mc.buttonMode = true;

                 

                previous_mc.addEventListener(MouseEvent.CLICK, prev);

                 

                function prev(e){

                 

                                var my_loader2:Loader = new Loader();

                 

                                my_loader2.load(new URLRequest("/phot/fla/riverVale.swf"));

                 

                                addChild(my_loader2);

                 

                }

                 

                next_mc.buttonMode = true;

                 

                next_mc.addEventListener(MouseEvent.CLICK, nex);

                 

                function nex(e){

                 

                                var my_loader3:Loader = new Loader();

                 

                                my_loader3.load(new URLRequest("/phot/fla/riverVale2.swf"));

                 

                                addChild(my_loader3);

                 

                }

                 

                last_mc.buttonMode = true;

                 

                last_mc.addEventListener(MouseEvent.CLICK, las);

                 

                function las(e){

                 

                                var my_loader4:Loader = new Loader();

                 

                                my_loader4.load(new URLRequest("/phot/fla/riverVale4.swf"));

                 

                                addChild(my_loader4);

                 

                }

                 

                face_mc.buttonMode = true;

                 

                face_mc.addEventListener(MouseEvent.CLICK, face);

                 

                                function face(e){

                 

                                navigateToURL( new URLRequest ("http://www.facebook.com/RichardLearPhotography"),"_blank");

                 

                }

                 

                facetext_mc.buttonMode = true;

                 

                facetext_mc.addEventListener(MouseEvent.CLICK, facetext);

                 

                                function facetext(e){

                 

                                navigateToURL( new URLRequest ("http://www.facebook.com/RichardLearPhotography"),"_blank");

                 

                }

                 

                var myLoader:Loader = new Loader();                 

                 

                var url:URLRequest = new URLRequest("/phot/fla/rvcca.swf");

                 

                myLoader.load(url);                                   

                 

                addChild(myLoader);

                 

                 

                 

                Page it calls:

                 

                 

                 

                import mx.transitions.Tween;

                 

                import mx.transitions.easing.*;

                 

                 

                 

                this.createEmptyMovieClip("container",1);

                 

                var imagesNumber:Number = 8;

                 

                var scrolling:Boolean = true;

                 

                 

                 

                for (i=1; i<=imagesNumber; i++) {

                 

                container.attachMovie("thumb"i,"thumb"i+"_mc",i);

                 

                myThumb_mc = container["thumb"i"_mc"];

                 

                myThumb_mc._x = (i-1)*myThumb_mc._width;

                 

                myThumb_mc._y = (Stage.height-myThumb_mc._height)/1.5;

                 

                myThumb_mc._alpha = 50;

                 

                myThumb_mc.largerImage = i;

                 

                myThumb_mc.onRollOver = function() {

                 

                this._alpha = 100;

                 

                };

                 

                myThumb_mc.onRollOut = function() {

                 

                this._alpha = 50;

                 

                };

                 

                myThumb_mc.onRelease = function() {

                 

                this._alpha=50;

                 

                for (i=1; i<=imagesNumber; i++) {

                 

                var myClip = container["thumb"i"_mc"];

                 

                myClip.enabled = false;

                 

                }

                 

                scrolling = false;

                 

                root.attachMovie("image"+this.largerImage,"largemc",2);

                 

                large_mc._x = (Stage.width-large_mc._width)/2;

                 

                large_mc._y = (Stage.height-large_mc._height)/2;

                 

                new Tween(large_mc, "_alpha", Strong.easeOut, 0, 100, 0.5, true);

                 

                new Tween(container,"_alpha",Strong.easeOut,100,50,0.5,true);

                 

                large_mc.onRelease = function() {

                 

                scrolling = true;

                 

                var myFadeOut = new Tween(large_mc, "_alpha", Strong.easeOut, 100, 0, 0.5, true);

                 

                new Tween(container,"_alpha",Strong.easeOut,50,100,0.5,true);

                 

                myFadeOut.onMotionFinished = function() {

                 

                for (i=1; i<=imagesNumber; i++) {

                 

                var myClip = container["thumb"i"_mc"];

                 

                myClip.enabled = true;

                 

                }

                 

                large_mc.removeMovieClip();

                 

                };

                 

                };

                 

                };

                 

                }

                 

                 

                 

                container.onEnterFrame = function() {

                 

                if (scrolling){

                 

                this._x += Math.cos((-_root._xmouse/Stage.width)Math.PI)10;

                 

                if (this._x>0) {

                 

                this._x = 0;

                 

                }

                 

                if (-this._x>(this._width-Stage.width)) {

                 

                this._x = -(this._width-Stage.width);

                 

                }

                 

                }

                 

                };

                 

                 

                 

                Richard Lear

                 

                President

                 

                Little Ricky Productions, Inc.

                 

                www.littlerickyproductions.com

                 

                917-757-1825

                • 5. Re: Flash iPhone OS
                  kglad Adobe Community Professional & MVP

                  you're welcome.