2 Replies Latest reply on Oct 28, 2007 10:29 AM by ImLearningW3D

    Help! Help! Help!

    ububub
      Hi to all and PLEASE HELP!

      First I'm a total beginner and nonprogrammer.
      I recently started a "must end" project and it's almost finished. But i've got one last problem.

      I want to swap a scrolling text sprite with another scrolling text sprite when user clicks a button.
      But without moving the framehead into another frame. My movie has 7 scrolling texts.

      I'm trying to do it with this primitive method:

      I placed 6 of them out of the stage where no one can see.
      And I inserted these scripts to the button which "swaps" the text sprites (or better to say: relocates them).

      This is the script inserted into the button which shows the sprite textone:

      on mouseUp me
      sprite("textone").locH = 177
      sprite("textone").locV = 460

      sprite("texttwo").locH = -600
      sprite("texttwo").locV = -600

      sprite("textthree").locH = -600
      sprite("textthree").locV = -600

      --note: I wrote the first three. it's actually 7
      end

      And this is the script inserted into the button which shows the sprite texttwo:

      on mouseUp me
      sprite("textone").locH = -600
      sprite("textone").locV = -600

      sprite("texttwo").locH = 177
      sprite("texttwo").locV = 460

      sprite("textthree").locH = -600
      sprite("textthree").locV = -600

      --note: I wrote the first three. it's actually 7
      end

      This script works and changes the positions of my text sprites. AND HERE IS THE PROBLEM:
      After the text sprite positions are changed they don't scroll down or up.
      What is the problem in this case? And I'm sure there are many other ways to swap sprites.
      How do I solve this issue? Sorry for my poor English and thanks for any help.
        • 1. Re: Help! Help! Help!
          SafariTECH Level 1
          Are all the text sprites actually set to scroll ? They are "resizable" by default, not scrollable.

          Yoru idea on how to swap the sprites is basically correct, if you want to swap the physical sprites. There may be more efficient ways to program it, but the concept is sound.

          Another way would be to leave a scrolling sprite on the stage and use a member (or members) to hold the new text. Change the text in the on stage sprite rather than phtsically moving all the individual sprites.

          • 2. Re: Help! Help! Help!
            ImLearningW3D
            Before u switch the positions of them, set them to boxtype to #fixed then, then set the new positions. Once the new position is set, set the boxtype back to #scroll. That ought to work.

            on mouseUp me
            sprite("textone")..member.boxtype = #fixed
            sprite("textone").locH = 177
            sprite("textone").locV = 460
            sprite("textone")..member.boxtype = #scroll
            end