11 Replies Latest reply on Dec 24, 2006 7:32 PM by Sketchsta

    I need some sugestions

    Sketchsta
      Hi guys, im working on this website where theres afew pages with ALOT of info and pics.
      I have it working the way i want it to, but it seems to struggle while it's scrolling. So im hoping for some other suggestions on how to fix it, or if theres a better way to do this.

      Basically what i've done is, made a movie clip 500 by 2000, which just changes it's _y position as a scrolling effect.
      this seems to struggle only abit on the first scroll, and gets worse after the second n third scroll.

      Heres the page im working on.

      Thanx in advance.
        • 1. Re: I need some sugestions
          dr.Evol Level 1
          Try to use ScrollPane component and do some skinning and styling to adjust the visual interface...

          place a scrollpane component on the stage and then in the properties panel point the contentPath property to the movieclip linkage id you want to scroll.


          • 2. Re: I need some sugestions
            Sketchsta Level 1
            hey Dr.Evol, just wondering, can scroll panes import HTML files?

            i dont know how to use them. I never have.

            I tried to import a swf, and it works, but it still seems like it's struggling around the mid section.
            • 3. Re: I need some sugestions
              dr.Evol Level 1
              Hi

              No, flash cannot display html pages as a browser do. However, you can use html for text, what is actually enough. You can format text, create a href links, display images and use CSS. But, you cannot use tables, divs etc.
              If you locate your flash installation on your comp, you can find a nice example on how to use html - its somewhere in program files/macromedia/flash/samples and tutorials and there somewhere you have Text Enhancements (I cant say exactly because I dont have flash installed on the machine im currently on).. anyway check it out and you'll quickly get the point.

              But anyway - your flash struggels a little.. but at the moment Im using a 6 year old P3 laptop with 265MB Ram (and XP on it), and I didnt notice any heavy disfuncionallity of your site. However, I would consider redesigning it because I dont see the point of having all the Titles placed in one document... why dont you just put a nice horizontal menu and let users switch to particular part of interest...that will solve all your scrolling problems...

              • 4. Re: I need some sugestions
                Sketchsta Level 1
                well actually thats a whole page. Just one article on the same topic.

                I originaly thought of doing what you suggested, and place links to every title next to the pics. But because it's the same article, i chose to stick evrything on the same page.

                and I asked about the HTML import because i had hoped to make the page as HTML, then improt it into the scroll pane.

                But thanx for the info on text enhancement, i'll have a look into that. might prove to be just what im looking for.

                Thanx .
                • 5. Re: I need some sugestions
                  Peter Lorent Level 2
                  Well, if your html is valid xml you can write a parser for the html files. Or use a component that does the work... see http://www.flashrelief.com
                  Still with restrictions but a nice component.
                  • 6. Re: I need some sugestions
                    Sketchsta Level 1
                    Thanx LuigiL, i'll have a look into making a parser, right now i don't even know what that is =)

                    but i thought of another way.. im gonna use PhotoShop to make the whole "article" i need for the page into a .jpg
                    that should scroll just fine.
                    I just have to make the file size as small as possible, im quite sure i'll be able to keep it under 100kb

                    and Thanx for the Flashrelief site, i'll have to check back there when i get some money for this site im doing. =)
                    being christmas n all, im kind of strict on my budget at the moment. =(


                    MERRY CHRISTMAS TO EVERYONE WHO SEES THIS !!! =)
                    • 7. Re: I need some sugestions
                      kglad Adobe Community Professional & MVP
                      you could enable the cacheAsBitmap property of your movieclip and see it "scroll" more smoothly, too.
                      • 8. Re: I need some sugestions
                        dr.Evol Level 1

                        Your scrolling is not smooth because you have too much graphics on the movieclip you are scrolling. Remove any uneccessary graphics, including background colors.
                        Then, maybe try to put a mask on the layer above - draw a rectangle and set the layer to be a mask - maybe this will convince the flash player to render only the visible area of the movieclip. Another thing - when you set the _y property with your code, ensure you are positioning it to the integer pixel - means _y=230 not _230.4 - to do this just use int
                        If all that wont help, increase the size of the visible area, your flash is targeted to 640x480 if I see it rigth and users wont need to scroll that much... who uses this resoluiton this days anyway?!

                        And yes.. just crosse my mind.. use a interval function ... that will slow down the calculations and give flash player more time to render the graphics..

                        Its something like this:

                        var scrollStep:Number;
                        var clock:Number;
                        var ref=this;
                        function scroll(obj:Object) {
                        obj.myMC._y=int(obj.myMC._y + obj.scrollStep);
                        }

                        btnUp.onPress=function() {
                        scrollStep=10;
                        clock=setInterval(scroll,50,ref);
                        }
                        btnDn.onPress=function(){
                        scrollStep=-10;
                        clock=setInterval(scroll,50,ref);
                        }
                        btnUp.onRelease=function() {
                        clearInterval(clock);
                        }
                        btnDn.onRelease=function() {
                        clearInterval(clock);
                        }

                        ..where btnUp and btnDn are the buttons, myMC is the movieclip you want to scroll.

                        cheers
                        • 9. Re: I need some sugestions
                          dr.Evol Level 1
                          And MARRY XMAS from me too!

                          grrr.. having a flu on the XMAS.. sucks... im behind a computer on a xmas evening.. shame on me!

                          • 10. Re: I need some sugestions
                            Sketchsta Level 1
                            the whole movieclip has nothing on it except text and 7 pics. No background other than the canvas which i changed to 550 by 380.

                            and on the canvas im using a mask to show just whats in the window.

                            i cant change the size of this, because this is just one window in the template. this is my main window where the info is going to show.

                            I've changed the interval rate from 1 to 20, that seems to have helped abit. although it's not as smooth as before, it's not really noticeable. Thanx for that suggestion.



                            HOPE
                            • 11. I need some sugestions
                              Sketchsta Level 1
                              the whole movieclip has nothing on it except text and 7 pics. No background other than the canvas which i changed to 550 by 380.

                              and on the canvas im using a mask to show just whats in the window.

                              i cant change the size of this, because this is just one window in the template. this is my main window where the info is going to show.

                              I've changed the interval rate from 1 to 20, that seems to have helped abit. although it's not as smooth as before, it's not really noticeable. Thanx for that suggestion.



                              HOPE YOU ALL HAVE A GREAT CHRISTMAS!! =)