2 Replies Latest reply on Aug 13, 2010 12:44 AM by Sean_Wilson

    Autoscroll on #Text Field

    aliandri

      Dear...

       

      I try to make autoscroll on #text field with display normal and framming scroll...

      This my code...

       

      on exitFrame me

      member("isi_txt").scrollTop = 1

        repeat with count = 1 to 500

       

          member("isi_txt").scrollTop = member("isi_txt").scrollTop + 1

       

          repeat with ab=1 to 30*1000 -- use delay time for speed scroll

          end repeat

       

          _movie.updateStage()

       

        end repeat

      end

       

       

      so... i use "repeat... " but i can't interupt for scene cause operate repeat must be finish...

       

      can help me...?

       

      thank you...

        • 1. Re: Autoscroll on #Text Field
          Sean_Wilson Adobe Community Professional

          What's wrong with something like:

          property spriteNum
          property myMember
          
          on beginSprite me
            myMember = sprite(spriteNum).member
            myMember.scrollTop = 0
          end
          
          on enterFrame me
            -- alter + 1 to meet desired speed
            myMember.scrollTop = myMember.scrollTop + 1
          end
          
          • 2. Re: Autoscroll on #Text Field
            aliandri Level 1

            Thank Sean.. but

            if i use that script... i must create along frame for that member or spritenum cause content #text is loading from file like rtf so it's flexible content ...

            i use operate Repeat for slide content on #text fileld until end of line... so if content on end of line ... script or code can to launch another file...

            like this ..

            global ab

             

            on exitFrame me

              sound(1).fadein(1000)

             

              member("isi_txt").scrollTop = 1

              repeat with count = 1 to 500

             

                member("isi_txt").scrollTop = member("isi_txt").scrollTop + 1

             

                repeat with ab=1 to 30*1000

                end repeat

             

                _movie.updateStage()

             

              end repeat

             

              go movie "pedoman"

             

            end